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

maven发布到nexus常见问题集

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


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

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常见问题集



相关文章:

  • 2021-06-26
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-07
  • 2021-10-10
  • 2022-12-23
  • 2022-02-06
  • 2022-03-10
  • 2022-01-24
相关资源
相似解决方案