用maven执行mvn clean compile的时候遇到这个问题哦

wave900309 2013-03-05 03:20:54
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.658s
[INFO] Finished at: Tue Mar 05 15:18:29 CST 2013
[INFO] Final Memory: 7M/107M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project hello-world: Execution default-clean
of goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean failed: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its depend
encies could not be resolved: Could not find artifact org.codehaus.plexus:plexus-utils:jar:2.0.5 in central (http://repo.maven.apache.org/maven2) -> [
Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
H:\hello-world>




更详细的debug
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project hello-world: Execution default-clean
of goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean failed: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its depend
encies could not be resolved: Failure to find org.codehaus.plexus:plexus-utils:jar:2.0.5 in http://repo.maven.apache.org/maven2 was cached in the loca
l repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean)
on project hello-world: Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean failed: Plugin org.apache.maven.plugi
ns:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failure to find org.codehaus.plexus:plexus-utils:jar:2.0.5 in http://rep
o.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or u
pdates are forced
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean f
ailed: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failure to find org.codehaus.plexus:
plexus-utils:jar:2.0.5 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are forced
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:82)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies coul
d not be resolved: Failure to find org.codehaus.plexus:plexus-utils:jar:2.0.5 in http://repo.maven.apache.org/maven2 was cached in the local repositor
y, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:215)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:353)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:321)
at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:175)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:78)
... 20 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failure to find org.codehaus.plexus:plexus-utils:jar:2.0.5 in http://repo.maven
.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates
are forced
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:358)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:207)
... 24 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to find org.codehaus.plexus:plexus-utils:jar:2.0.5 in http://repo.maven.apa
che.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are
forced
at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:230)
at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:204)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:427)
... 27 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

请问有人知道吗
...全文
58790 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
laodagewo 2015-10-26
  • 打赏
  • 举报
回复
感谢lvzg_005,解决这个问题用了一个下午,以看到你的就马上解决了
hxhazx 2014-12-08
  • 打赏
  • 举报
回复
删掉重下载一般就可以 不行自己下载,安装到本地仓库去
灵觉橙子 2013-08-21
  • 打赏
  • 举报
回复
我是关掉eclipse就能成功编译。
zhu19774279 2013-03-14
  • 打赏
  • 举报
回复
引用 3 楼 wave900309 的回复:
引用 1 楼 lvzg_005 的回复:Could not find artifact org.codehaus.plexus:plexus-utils:jar:2.0.5 少这个包,没下载下来? 果然是,我到C:\Users\Ken\.m2\repository\org\codehaus\plexus\plexus-utils\2.0.5看了一下 plexus-u……
没错,Maven不管下没下成功,都会有一个.lastupdate文件,一旦出现了这个文件,而你指定远程仓库的方式是mirror,而不是profile里的repository,那么Maven默认不会去更新这个文件,个人以为Maven的这个设定很愚蠢。
lvzg_005 2013-03-05
  • 打赏
  • 举报
回复
对的,删掉,重现下载就没事了
wave900309 2013-03-05
  • 打赏
  • 举报
回复
引用 1 楼 lvzg_005 的回复:
Could not find artifact org.codehaus.plexus:plexus-utils:jar:2.0.5 少这个包,没下载下来?
果然是,我到C:\Users\Ken\.m2\repository\org\codehaus\plexus\plexus-utils\2.0.5看了一下 plexus-utils-2.0.5.jar是plexus-utils-2.0.5.jar.lastupdate,能告诉我为什么会这样吗?网络问题?
wave900309 2013-03-05
  • 打赏
  • 举报
回复
引用 1 楼 lvzg_005 的回复:
Could not find artifact org.codehaus.plexus:plexus-utils:jar:2.0.5 少这个包,没下载下来?
我是看《maven实战》上的一个例子的,作者都没有这一步操作
lvzg_005 2013-03-05
  • 打赏
  • 举报
回复
Could not find artifact org.codehaus.plexus:plexus-utils:jar:2.0.5 少这个包,没下载下来?

67,550

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧