我遇到了maven和ant的问题。我将jar从repo拉到我的计算机上,并将repo上所需的所有jar和refs添加到pom文件中。当我尝试运行clover2:setup时,我得到了一个错误
Downloading: http://remoteRepo/nexus/content/groups/xxxx/org/apache/ant/ant/1.8.4/ant-1.8.4.jar
1896K downloaded (ant-1.8.4.jar)
[INFO] --------------------------------------------------------------------- ---
[ERROR] FATAL ERROR
[INFO] --------------------------------------------------------------------- ---
[INFO] The plugin descriptor for the plugin Plugin [org.apache.ant:ant] was not
found. Please verify that the plugin JAR C:UsersxxxxDocumentslocalrepoor
gapacheantant1.8.4ant-1.8.4.jar is intact.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.IllegalStateException: The plugin descriptor for the plugin Plugin [or
g.apache.ant:ant] was not found. Please verify that the plugin JAR C:UsersxxxxDocumentslocalrepoorgapacheantant1.8.4ant-1.8.4.jar is intact.
at org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginM
anager.java:360)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(De
faultPluginManager.java:224)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPlug
inManager.java:184)
at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(Def
aultPluginManager.java:1642)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Defa
ultLifecycleExecutor.java:1540)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor
(DefaultLifecycleExecutor.java:1787)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy
AggregationNeeds(DefaultLifecycleExecutor.java:462)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:175)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Wed Oct 28 05:37:02 CDT 2015
[INFO] Final Memory: 7M/122M
[INFO] ------------------------------------------------------------------------
我提取了jar文件并检查了Manifest.MF文件,它的pom和我的pom中的ref是相同的。
有什么理由不认为罐子完好无损?
URL中的远程repo只是隐藏实际URL指向的位置,但保留下来以显示它在拉罐子,而不是代理问题。此外,我已经多次清除本地回购
org.apache.ant:ant
不太可能是Maven插件。检查pom.xml中是否存在不正确的插件声明。