Project scenario:
As soon as the Maven project changes the POM file, the language level automatically becomes 5
Problem Description:
question 1: the Tomcat plug-in under move starts with an error
[error] the source option 1.5 is no longer supported. Please use version 1.6 or later
[error] target option 1.5 is no longer supported. Please use version 1.6 or later
idea error: error: Java does not support release version 5. This error
Cause analysis:
Maven is a project management tool. If you don’t tell it what JDK version to use for code compilation, it will be handled with the default JDK version of the compilation plug-in Maven compi ler plugin, which is prone to version mismatch, which may lead to failure of compilation
Solution:
to avoid this situation, the first step when building a maven project is to configure the Maven compiler plugin in the project POM XML file specifies the JDK version of the project source code, the compiled JDK version, and the encoding method
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>9</source>
<target>9</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
Read More:
- IDEA-Error java error release version 5 not supported (How To Fix)
- [Solved] IntelliJ idea error: error: Java does not support release 5
- IDEA Create Web Project with maven Error: The desired archetype does not exista…
- IDEA Create maven project error: Error running‘[org.apache.maven.pluginsmaven-archetype-pluginRELEASE
- [Solved] IDEA Add maven Project Error: Error:(3,21)java: Package javax.servletdoes not exist
- [Solved] ‘build.plugins.plugin.version‘ for org.springframework.boot:spring-boot-maven-plugin is missing.
- IDEA Maven Fail to Download Dependencies Error: ERROR – #org.jetbrains.idea.maven – Cannot reconnect.
- [Solved] IDEA Start Maven Project Error: “Error starting ApplicationContext. To display the conditions report …”
- MVN compile Error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin…
- [Solved] Idea Failed to recognize Maven and Project Error
- Spring Security Upgrade to Version 5.5.7, 5.6.4 or Above to Startup Error (Version incompatibility)
- IDEA pom.xml dependency version error [How to Solve]
- [How to Solve] Idea prompt does not support Lombok
- Maven Project Right-Click -update project Error [How to Solve]
- Fatal error compiling: invalid target release: 1.8 [How to Solve]
- [Solved] IDEA Import springboot Project Error: Cannot resolve plugin org.springframework.boot:spring-boot-maven-plugin:<unknown>
- [Solved] O2oa compile error: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin
- IDEA Package Error: No valid Maven installation found.
- [Solved] SpringBoot Pack Project: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources