CodeBuild throwing exit status 127

43 Views Asked by At
version: 0.2

phases:
  build:
    commands:
      - mvn compile dependency:copy-dependencies -DincludeScope=runtime -U
      - echo Logging into Amazon ECR...

My code is throwing the error

[Container] 2023/12/17 08:33:51.664005 Running command mvn compile dependency:copy-dependencies -DincludeScope=runtime -U
/codebuild/output/tmp/script.sh: line 4: mvn: command not found

[Container] 2023/12/17 08:33:51.671239 Command did not exit successfully mvn compile dependency:copy-dependencies -DincludeScope=runtime -U exit status 127
[Container] 2023/12/17 08:33:51.675957 Phase complete: BUILD State: FAILED
[Container] 2023/12/17 08:33:51.675975 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: mvn compile dependency:copy-dependencies -DincludeScope=runtime -U. Reason: exit status 127

I have tried giving ECR permissions to the codebuild

0

There are 0 best solutions below