content-aws-devops-pro-2020 icon indicating copy to clipboard operation
content-aws-devops-pro-2020 copied to clipboard

Add compiler version to fix error in build output and failed build

Open davidhullster opened this issue 2 years ago • 0 comments

Fixes this error in CodeBuild output, Maven defaults to version java 1.5,

[StackOverflow Question](https://stackoverflow.com/questions/59685437/java-maven-project-source-option-5-is-no-longer-supported-use-6-or-later)
[ERROR] COMPILATION ERROR :
[INFO] ------------------------------------------------------------- 
[ERROR] Source option 5 is no longer supported. Use 6 or later. 
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.

================================================== After update to version 11 (1.8 also works)

Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar (12 kB at 791 kB/s) 
[INFO] Installing /codebuild/output/src913801100/src/target/messageUtil-1.0.jar to /root/.m2/repository/org/example/messageUtil/1.0/messageUtil-1.0.jar [INFO] Installing /codebuild/output/src913801100/src/pom.xml to /root/.m2/repository/org/example/messageUtil/1.0/messageUtil-1.0.pom 
[INFO]
------------------------------------------------------------------------ 
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time:  6.650 s
[INFO] Finished at: 2022-09-27T13:46:10Z
[INFO] ------------------------------------------------------------------------

davidhullster avatar Sep 27 '22 13:09 davidhullster