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.
Read More:
- Error in pom.xml file of sub module of Maven aggregation project
- How to solve the problem that the project module turns grey in Maven
- Application of IntelliJ idea in Maven project pom.xml Add dependency
- The spring boot project was first created, pom.xml The error is Maven configuration problem. How to solve it?
- The common module of idea Maven parent-child project packages and reports an error
- Solve the problem of error running xxxapplication command line is too long when compiling and running IntelliJ idea
- Error resolving version for plugin ‘org.apache.maven.plugins:maven-compiler-plugin’ from the repo…
- Error in publishing project with Maven in idea. Git directory is not found! Please specify a valid
- Plugin Error: Plugin “Android Code Generator“ is incompatible (supported only in IntelliJ IDEA)
- Solve the problem of Chinese garbled code of actibpm plug-in in idea
- How can IntelliJ idea completely delete a project
- Attributeerror: ‘module’ object has no attribute ‘handlers’ — Python sub module import problem
- The import Maven project appears http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Solutions
- Idea Maven project uses package to package and report error (package does not exist)
- Error in Maven packaging web project: webxml attribute is required (or pre existing WEB-INF)/ web.xml if executing in update)
- Upgrade to IntelliJ idea 2021.2 and start the project with an error
- Solve the error of POM file failed to read artifact descriptor for XXX under IntelliJ idea
- Git uploads local IntelliJ idea project to GitHub
- [solved] error: module not specified (IntelliJ idea)
- Solve the problem of flash back in VS2010