Maven error – invalid target release: 17

We upgraded the project from Java 11 to Java 17, and mvn test hits the Fatal error compiling: error: invalid target release: 17 pom.xml <properties> <java.version>17</java.version> </properties> Terminal mvn test [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project spring-boot-hello: Fatal error compiling: error: invalid target release: 17 -> [Help 1] The Java version is …

Read more

Maven error – invalid target release: 1.11

Maven compiles and hits the following fatal error messages: Terminal mvn compile Fatal error compiling: error: invalid target release: 1.11 pom.xml <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>1.11</source> <target>1.11</target> </configuration> </plugin> Solution For maven-compiler-plugin, the correct JDK version is 1.8, 1.9, 1.10, 10, 11, 12 … 17 … pom.xml <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> <source>11</source> <target>11</target> …

Read more

Maven – The POM for maven-compiler-plugin:jar:3.8.1 is missing

Maven compiles and hits the following maven-compiler-plugin error? The POM for org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1 is missing, no dependency information available pom.xml <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> Terminal > mvn compile [INFO] Scanning for projects… [INFO] [INFO] ——————–< com.mkyong.core:junit5-maven >——————– [INFO] Building junit5-maven 1.0 [INFO] ——————————–[ jar ]——————————— [WARNING] The POM for org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1 is …

Read more

mvn site : java.lang.ClassNotFoundException: org.apache.maven.doxia.siterenderer.DocumentContent

Generating a Maven report with mvn site, but hits the following errors java.lang.NoClassDefFoundError: org/apache/maven/doxia/siterenderer/DocumentContent Caused by: java.lang.ClassNotFoundException: org.apache.maven.doxia.siterenderer.DocumentContent [INFO] ———————————————————————— [INFO] BUILD FAILURE [INFO] ———————————————————————— [INFO] Total time: 28.280 s [INFO] Finished at: 2018-11-19T13:20:14+08:00 [INFO] ———————————————————————— [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project maven-static-code-analysis: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed: A required class …

Read more