1 我将maven-clean-plugin:2.6.1.jar添加到我的本地存储库中。我没有指定一个pom,所以它生成了一个名为mavin-plugin并给我错误信息
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.6.1 is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for org.apache.maven.plugins:maven-clean-plugin:2.6.1
[ERROR] Invalid packaging for parent POM org.apache.maven.plugins:maven-clean-plugin:2.6.1, must be "pom" but is "maven-plugin" @
[FATAL] The parents form a cycle: org.apache.maven.plugins:maven-clean-plugin:2.6.1 -> org.apache.maven.plugins:maven-clean-plugin:2.6.1 @
2] 我还尝试通过将jar和pom.xml放入jar包装中来添加2.4.1但是收到了错误消息:
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for org.apache.maven.plugins:maven-clean-plugin:2.4.1
[ERROR] Invalid packaging for parent POM rg.apache.maven.plugins:maven-clean-plugin:2.4.1, must be "pom" but is "jar" @
[FATAL] The parents form a cycle: org.apache.maven.plugins:maven-clean-plugin:2.4.1 -> org.apache.maven.plugins:maven-clean-plugin:2.4.1 @
第3]
我还尝试更新jar文件,但没有指定pom.xml并出现错误
Downloading: https://mvnrepository.com/artifact/org.apache.maven.plugins/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[DEBUG] Writing resolution tracking file C:\Users\xxx\.m2\repository\org\apache\maven\plugins\maven-clean-plugin\2.4.1\maven-clean-plugin-2.4.1.pom.lastUpdated
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.300s
[INFO] Finished at: Tue Dec 13 13:22:06 CST 2016
[INFO] Final Memory: 6M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1:
Could not find artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 in central (http://xxxxzero1.dev.deodiaus.com:8081/artifactory/plugins-release) -> [Help 1]
org.apache.maven.plugin.PluginResolutionException:
Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:129)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:152)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:139)
4 我还尝试手动更改〜/ repository /.../pom.xml文件中的pom.xml