如何解决Maven异常:[错误]无法执行目标org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean

时间:2018-09-10 08:14:17

标签: java maven

PFB命令的完整错误日志:mvn -U clean-

[错误]无法在项目bDartCustom上执行目标org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean(默认清除):执行目标org.apache.maven的默认清除。 lu clean-plugin:2.6.1:clean失败:插件org.apache.maven.plugins:maven-clean-plugin:2.6.1或其依赖项之一无法解析:找不到工件org.codehaus.pl -utils:jar:1.1,位于中央(http://dummy_repo/repository/public)-> [帮助1] org.apache.maven.lifecycle.LifecycleExecutionException:无法在项目bDartCustom上执行目标org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean(default-clean) lt-clean of目标org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean失败:插件org.apache.maven.plugins:maven-clean-plugin:2.6.1或其依赖项之一不是 在中央(http://dummy_repo/repository/public)中找不到工件org.codehaus.plexus:plexus-utils:jar:1.1     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)     在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)     在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)     在org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)     在org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)     在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)     在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)     在org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)     在org.apache.maven.cli.MavenCli.execute(MavenCli.java:955)     在org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)     在org.apache.maven.cli.MavenCli.main(MavenCli.java:194)     在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处     在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:497)     在org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)     在org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)     在org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)     在org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 引起原因:org.apache.maven.plugin.PluginExecutionException:目标org.apache.maven.plugins的执行默认清除:maven-clean-plugin:2.6.1:clean失败:插件org.apache.mave aven-clean-plugin:2.6.1或其依赖项之一无法解析:在中央(http://dummy_repo/rep中找不到工件org.codehaus.plexus:plexus-utils:jar:1.1 lic)     在org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)     在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)     在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)     在org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)     在org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)     在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)     在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)     在org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)     在org.apache.maven.cli.MavenCli.execute(MavenCli.java:955)     在org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)     在org.apache.maven.cli.MavenCli.main(MavenCli.java:194)     在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处     在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:497)     在org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)     在org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)     在org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)     在org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 由以下原因引起:org.apache.maven.plugin.PluginResolutionException:插件org.apache.maven.plugins:maven-clean-plugin:2.6.1或其依赖项之一无法解析:无法 ct org.codehaus.plexus:plexus-utils:jar:1.1(位于中央(http://dummy_repo/repository/public)     在org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:218)     在org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:149)     在org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:403)     在org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:374)     在org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:231)     在org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:102)     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)     在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)     在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)     在org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)     在org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)     在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)     在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)     在org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)     在org.apache.maven.cli.MavenCli.execute(MavenCli.java:955)     在org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)     在org.apache.maven.cli.MavenCli.main(MavenCli.java:194)     在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处     在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:497)     在org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)     在org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)     在org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)     在org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 由以下原因引起:org.eclipse.aether.resolution.ArtifactResolutionException:在中央(http://dummy_repo/reposit

中找不到工件org.codehaus.plexus:plexus-utils:jar:1.1
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:422)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:224)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies (DefaultRepositorySystem.java:338)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal (DefaultPluginDependenciesResolver.java:210)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve (DefaultPluginDependenciesResolver.java:149)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm (DefaultMavenPluginManager.java:403)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm (DefaultMavenPluginManager.java:374)
at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm (DefaultBuildPluginManager.java:231)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:102)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

由以下原因引起:org.eclipse.aether.transfer.ArtifactNotFoundException:在中央(http://dummy_repo/repository/中找不到工件org.codehaus.plexus:plexus-utils:jar:1.1     在org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:48)     在org.eclipse.aether.connector.basic.BasicRepositoryConnector $ TaskRunner.run(BasicRepositoryConnector.java:365)     在org.eclipse.aether.util.concurrency.RunnableErrorForwarder $ 1.run(RunnableErrorForwarder.java:75)     在org.eclipse.aether.connector.basic.BasicRepositoryConnector $ DirectExecutor.execute(BasicRepositoryConnector.java:583)     在org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:259)     在org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:498)     在org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:399)     在org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:224)     在org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:338)     在org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:210)     在org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:149)     在org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:403)     在org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:374)     在org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:231)     在org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:102)     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)     在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)     在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)     在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)     在org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)     在org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)     在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)     在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)     在org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)     在org.apache.maven.cli.MavenCli.execute(MavenCli.java:955)     在org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)     在org.apache.maven.cli.MavenCli.main(MavenCli.java:194)     在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处     在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:497)     在org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)     在org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)     在org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)     在org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [错误] [错误] [ERROR]有关错误和可能的解决方案的详细信息,请阅读以下文章: [错误] [帮助1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

2 个答案:

答案 0 :(得分:0)

似乎您已配置了自定义存储库或代理。 (http://dummy_repo/repository/)。当maven尝试查找所有必需的依赖项时,它会通过检查配置的存储库来进行查找。如果未配置,它将使用Maven Central。删除您的自定义存储库,这可能会起作用。

答案 1 :(得分:0)

似乎plexus-utils:jar不在您的存储库中。如果您拥有存储库中的权限,则可以对其进行检查。

此外,您可以更改settings.xml以添加包含缺少的工件的新存储库。

<repositories>
    <repository>
        <id>org.codehaus</id>
        <url>https://repo1.maven.org/maven2/org/codehaus/</url>
    </repository>
</repositories>

编辑:旧的nexus.codehaus的新URL为https://oss.sonatype.org/content/repositories/codehaus-snapshots/