Error when package or clean after loading maven.
[WARN]
[WARN] Some problems were encountered while building the effective model
[WARN] ‘build.plugins.plugin.version’ is missing fororg.apache.maven.plugins:maven.compiler.plugin
It is highly recommended to fix these problems because they threaten the stability of your build.
For this reason, future Maven versions might no longer support building such malformed projects.
org.apache.maven.plugins:maven.compiler.
The plugin is a plugin that can be added by “Add Denpendency”.
Add a new dependency in pom.xml:
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<type>maven-plugin</type>
</dependency>
Add to the build.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven.compiler.plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<verbal>true</verbal>
</configuration>
</plugin>
</plugins>
</build>
</project>
But there is still an error, error message: build.plugins.plugin.version
As you can see, there is no <version> under <build> in pom.xml. So we need to add an extra version.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven.compiler.plugin</artifactId>
<version>2.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<verbal>true</verbal>
</configuration>
</plugin>
</plugins>
</build>
</project>
Done!
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
</dependency>
Similar Posts:
- [Solved] Spring Boot Package Error: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0
- [Solved] Dynamic Web Module 3.0 requires Java 1.6 or newer
- [Solved] Error:java: error: release version 5 not supported & Switch Unrecognized String
- [Solved] SpringBoot Package Error: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-res
- [Solved] Spring Start Error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project gulimall-coupon: There are test failures. Please refer to D:\m1\0613\mall-coup
- Maven no main manifest attribute when generate jar for project
- Automatic version change of IntelliJ idea language level and Java compiler
- Solve the error in Maven project packaging: error injecting constructor
- How to Solve IDEA maven Error:Perhaps you are running on a JRE rather than a JDK
- Dynamic Web Module 3.1 requires Java 1.7 or newer