After creating a maven project using the eclipse version integrated with maven, errors will appear in the configuration file pom.xml in the project and the referenced XSD file (errors are reported in the first and second lines)
One example of error reporting:
Multiple annotations found at this line:
– Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (execution: default-compile, phase: compile)
– CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Could not transfer
artifact org.codehaus.plexus:plexus-compiler-javac:jar:1.8.1 from/to central ( http://repo.maven.apache.org/maven2 ): connection timed out to http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/1.8.1/plexus-compiler-javac-1.8.1.jar
– Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins :maven-compiler-plugin:2.3.2:testCompile (execution: default-testCompile, phase: test-compile)
Wait, the error information is similar
The reason is that there is a problem with the Maven integrated by eclipse (version problem or website access problem), and the newly installed Maven was not successfully added to the M2e plug-in
The solution is as follows:
step. 1 download the appropriate version of Maven from the official website and store it in the appropriate path (or read which jar package file is missing in the error report – the corresponding error report information will provide the website to download the missing file – copy to the corresponding path of the local warehouse)
step. 2 Open eclipse preferences – > Maven-> Usersettings change global settings and user settings to conf/settings.xml under Maven just downloaded
Step.3 Eclipse preferences – > Maven-> Installations click Add to add the Maven folder you just downloaded, and then check the version you downloaded instead of the built-in version.
step. 4 after the above two steps, you have successfully integrated your downloaded Maven version with eclipse. At this time, right-click the item that reported an error before and right-click run as – > Maven clean and run as – > Maven install.
step. 5 (if not already available): right click – > Maven-> Update Project This step takes a little time. You can see whether the update is completed by looking at the lower right corner of the interface
Similar Posts:
- Maven warnning: ‘build.plugins.plugin.version’ is missing [How to Solve]
- [Solved] Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central
- [Solved] Spring Boot Package Error: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0
- Maven Error: Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:3.0.0-M1 [How to Solve]
- How to Solve IDEA maven Error:Perhaps you are running on a JRE rather than a JDK
- [Solved] Dynamic Web Module 3.0 requires Java 1.6 or newer
- [Solved] Error:java: error: release version 5 not supported & Switch Unrecognized String
- Automatic version change of IntelliJ idea language level and Java compiler
- Maven Jetty Error: No plugin found for prefix ‘jetty’ in the….
- Solve the error in Maven project packaging: error injecting constructor