Recently, I encountered the problem that the target code version of Maven sub module in IntelliJ idea has been rolled back. On the first day, in the idea setting, set the target code version of all sub modules to 1.8, and on the second day, roll back to 1.5, 1.6 and other versions.
The way to search online is to add the following plug-in information to Maven’s POM file:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.0</version> <configuration> <encoding>UTF-8</encoding> <source>1.8</source> <target>1.8</target> </configuration> </plugin>
We did, but the problem still recurred. After several struggles, we finally found the existence of the problem.
In my project, the design of each sub module pom.xml In the file, either the parent information is not specified, or the parent of its own sub module pom.xml The target version is defined by myself, so the modification added in the parent POM can’t affect the setting of the sub module. The problem still exists.
Now, after sorting out the parent-child relationship of each module, this problem never appears again.
- Error resolving version for plugin ‘org.apache.maven.plugins:maven-compiler-plugin’ from the repo…
- Maven invalid source release 11
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)
- How to select the jar package version for Maven package when the jar package versions referenced by multiple modules are inconsistent
- appear Error:java : javacTask: source release 1.7 requires target release 1.7
- javac Task Error source release 1.7 requires target release
- The import Maven project appears http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Solutions
- Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (default-cli) on project Hello
- Maven compilation error: package does not exist jar package does not exist
- Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build Exception caught: basedir src/mai
- Maven skip unit test- maven.test.skip And skipstests
- MVN error: @ param not found
- Update project manually_ Solution of too large jar package in springboot
- Error parsing lifecycle processing instructions
- Idea Maven project uses package to package and report error (package does not exist)
- Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test)
- Spring boot problem 1: error reporting life processing instructions for building a spring boot project
- Maven skip unit test
- org.apache.jasper . jasperexception: unable to compile class for jsp: error resolution
- Failed to execute goal