0
点赞
收藏
分享

微信扫一扫

maven发布到nexus常见问题集

笑望叔叔 2022-04-02 阅读 92
mavenxmljava

maven发布到nexus常见问题集: 1.出现:Cannot deploy artifacts when Maven is in offline mode 错误 解决办法: 原因是intellij IDEA14 默认为offline模式,进入Settings,把Work offline的勾去除即可。

maven发布到nexus常见问题集_xml

2.出现: Return code is: 401, ReasonPhrase: Unauthorized. 解决办法: 1.检查pom.xml、setting.xml 对应nexus账号密码是否错误。 2.检查pom.xml、setting.xml 对应url地址是否正确。 maven发布到nexus常见问题集_xml_02


3.出现: Return code is: 400, ReasonPhrase: Repository does not allow updating assets: maven-releases. 解决办法:在nexus的maven-releases设置为 Allow redeploy(可重复提交)即可 maven发布到nexus常见问题集_maven_03

4.出现:Compilation failure: Compilation failure (编译失败) 解决办法: 因为jdk版本的升级导致一些api已经失效,解决的办法有很多,最好的办法是在pom.xml文件中加入如下配置(通过配置maven-compiler-plugin插件解决此问题): < ​plugin​ > < ​groupId​ > org.apache.maven.plugins </ ​groupId​ > < ​artifactId​ > maven-compiler-plugin </ ​artifactId​ > < ​configuration​ > < ​source​ > 1.8 </ ​source​ > < ​target​ > 1.8 </ ​target​ > < ​testSource​ > 1.8 </ ​testSource​ > < ​testTarget​ > 1.8 </ ​testTarget​ > < ​encoding​ > utf-8 </ ​encoding​ > < ​compilerArguments​ > < ​verbose ​ /> < ​bootclasspath​ > ${java.home}/lib/rt.jar;${java.home}/lib/jce.jar </ ​bootclasspath​ > </ ​compilerArguments​ > </ ​configuration​ > </ ​plugin​ >

对文章有什么疑问或者想要看更多文章可以加我订阅号,欢迎大家的踩踩~

maven发布到nexus常见问题集_maven_04




举报

相关推荐

0 条评论