美文网首页
2023-03-28 Maven400, reason phra

2023-03-28 Maven400, reason phra

作者: ForestPei | 来源:发表于2023-03-27 17:00 被阅读0次
 [INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project common: Failed to deploy artifacts: Could not transfer artifact cn.xxx.xxx:common:jar:0.0.1.1 from/to releases ([http://nexus.lcops.xyz/repository/maven-releases/](http://nexus.xxxxx.xyz/repository/maven-releases/)): status code: 400, reason phrase: Repository does not allow updating assets: maven-releases (400) -> [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/MojoExecutionException](http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException)

[ERROR]

[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <args> -rf :common

这里将 version 内容修改为 : 0.0.1-SNAPSHOT 即可正常使用。

扩展补充

maven中的仓库分为两种,snapshot快照仓库和release发布仓库。

snapshot快照仓库用于保存开发过程中的不稳定版本,release正式仓库则是用来保存稳定的发行版本。定义为快照版本,只需要在pom文件中在该模块的 version 后加上 -SNAPSHOT 即可(注意这里必须得是大写)

————————————————

maven在部署(deploy)时候抛的异常,存储库不允许更新资产,这个就是和私有maven库更新策略有关。

具体设置(nexus oos-3.6.2)步骤:

1.访问私有库管理界面http://xxx.xxx.xxx.xxx:8081

2.登录管理员账号(默认:xxx/xxx)

3.进入设置界面->repository->repositories->trd3-part(自己需要部署的目标库)->setting->Deployment pollcy(Allow redeploy)允许更新

相关文章

网友评论

      本文标题:2023-03-28 Maven400, reason phra

      本文链接:https://www.haomeiwen.com/subject/ejyzrdtx.html