Failed to execute goal org.sonatype.plugins

本贴最后更新于 2549 天前,其中的信息可能已经时移世异

这段时间在 Maven 中央仓库又发布了几个项目,本来一直好好的,昨天开始对版本进行更新的时候,发现开始报错:[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.3:deploy (injected-nexus-deploy) on project certificate-generator: Could not perform action: there are failing staging rules! Staging rules failure! -> [Help 1]

有图有真相

首先已经上传了的 Maven 项目一览:

3.pic_hd.jpg

如上图,红线框的几个项目最近执行

mvn deploy -Dmaven.test.skip=true -e 

进行更新版本,会报文章摘要和标题的错误信息。

我登陆了 Nexus Repository Manager 检查过情况,相关的错误信息如下图所示:

1.pic_hd.jpg

上图说这个项目缺少权限,当然,肯定不会是因为本地项目目录没有执行权限或者写权限之类的问题(因为我已经试过了)。

2.pic_hd.jpg

这个错误报的很奇怪,没看懂。

所以...求助大神,这个问题怎么解。

不要说百度谷歌了...我都试过实在没找到才来发帖求助的

猜你不会看的详细错误日志

Waiting for operation to complete……………

[ERROR] 
[ERROR] Nexus Staging Rules Failure Report
[ERROR] ==================================
[ERROR] 
[ERROR] Repository "comliumapp-1030" failures
[ERROR]   Rule "RepositoryWritePolicy" failures
[ERROR]     * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/liumapp/certificate/certificate-generator/v1.0.0/certificate-generator-v1.0.0.pom'
[ERROR]     * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/liumapp/certificate/certificate-generator/v1.0.0/certificate-generator-v1.0.0-javadoc.jar'
[ERROR]     * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/liumapp/certificate/certificate-generator/v1.0.0/certificate-generator-v1.0.0-sources.jar'
[ERROR]     * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/liumapp/certificate/certificate-generator/v1.0.0/certificate-generator-v1.0.0.jar'
[ERROR] 
[ERROR] 
[INFO] ————————————————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————————————————
[INFO] Total time: 04:02 min
[INFO] Finished at: 2017-11-26T17:27:17+08:00
[INFO] Final Memory: 36M/450M
[INFO] ————————————————————————————————————
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.3:deploy (injected-nexus-deploy) on project certificate-generator: Could not perform action: there are failing staging rules! Staging rules failure! -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.3:deploy (injected-nexus-deploy) on project certificate-generator: Could not perform action: there are failing staging rules!
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	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:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	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:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	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:498)
	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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not perform action: there are failing staging rules!
	at org.sonatype.nexus.maven.staging.deploy.strategy.StagingDeployStrategy.releaseAfterClose(StagingDeployStrategy.java:202)
	at org.sonatype.nexus.maven.staging.deploy.strategy.StagingDeployStrategy.finalizeDeploy(StagingDeployStrategy.java:162)
	at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute(DeployMojo.java:213)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	… 20 more
Caused by: com.sonatype.nexus.staging.client.StagingRuleFailuresException: Staging rules failure!
	at com.sonatype.nexus.staging.client.internal.StagingWorkflowV3ServiceImpl.monitorRepositoryTransition(StagingWorkflowV3ServiceImpl.java:273)
	at com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl.monitorRepositoryTransition(StagingWorkflowV2ServiceImpl.java:430)
	at com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl$10.perform(StagingWorkflowV2ServiceImpl.java:282)
	at com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl$10.perform(StagingWorkflowV2ServiceImpl.java:277)
	at com.sonatype.nexus.staging.client.internal.ExceptionConverter.runAndReturn(ExceptionConverter.java:39)
	at com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl.releaseStagingRepositories(StagingWorkflowV2ServiceImpl.java:276)
	at com.sonatype.nexus.staging.client.internal.StagingWorkflowV3ServiceImpl.releaseStagingRepositories(StagingWorkflowV3ServiceImpl.java:92)
	at org.sonatype.nexus.maven.staging.deploy.strategy.StagingDeployStrategy.releaseAfterClose(StagingDeployStrategy.java:187)
	… 24 more
[ERROR] 
[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/MojoExecutionException

解决办法

经过博主个人坚(xia)持(mao)不(peng)懈(shang)的(si)尝(hao)试(zi),终于解决了这个问题。

解决办法:

登陆自己在 Nexus Repository Manager 平台的帐号,点击 Staging Repositories,在出来的列表里面,把所有自己先前上传的有错误的项目全部删除,然后重新上传的过程中,一个一个上传,不要同时上传,就可以通过编译成功发布。

  • Java

    Java 是一种可以撰写跨平台应用软件的面向对象的程序设计语言,是由 Sun Microsystems 公司于 1995 年 5 月推出的。Java 技术具有卓越的通用性、高效性、平台移植性和安全性。

    3187 引用 • 8213 回帖
  • Maven

    Maven 是基于项目对象模型(POM)、通过一小段描述信息来管理项目的构建、报告和文档的软件项目管理工具。

    186 引用 • 318 回帖 • 302 关注

相关帖子

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...
  • 88250

    赞一个,好记性不如烂笔头 👍

  • 其他回帖
  • someone34810

    就很 XD

  • someone
    作者

    时隔两年在谷歌上搜到自己的这篇文章,然后解决问题

    1 回复