报错
配置私服之后,pom文件报错
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (execution: default-compile, phase:
compile)
- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be
resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Failure to transfer
org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from http://localhost:8081/nexus/content/groups/public/ was cached in the local repository, resolution
will not be reattempted until the update interval of nexusMirror has elapsed or updates are forced. Original error: Could not transfer artifact
org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to nexusMirror (http://localhost:8081/nexus/content/groups/public/): The operation was cancelled.
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (execution: default-testCompile,
phase: test-compile)
问题原因
无法下载maven插件或没有配置插件
解决办法
在pom.xml中添加如下配置,然后右键工程,选择“maven”-->‘Update ProjectConfiguration...’
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>resources</goal>
<goal>testResources</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>