一.出现:Cannot deploy artifacts when Maven is in offline mode -> [Help 1]

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project acpe-common: Cannot deploy artifacts when Maven is in offline mode -> [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/MojoFailureException

解决办法:原因是intellij IDEA 默认为offline模式,进入Settings,把Work offline的勾去除即可。

二.Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project acpe-common: Failed to deploy artifacts: Could not transfer artifact com.****0.1-20181217.122106-8.jar. Return code is: 401, ReasonPhrase: Unauthorized. -> [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

解决办法:
1.检查pom.xml、setting.xml 对应nexus账号密码是否错误。
2.检查pom.xml、setting.xml 对应url地址是否正确。

三.出现: Return code is: 400, ReasonPhrase: Repository does not allow updating assets: maven-releases.

搜集一些报400的原因:
1.nexus的repository分三种类型:Hosted、 Proxy和Virtual,另外还有一个repository group(仓库组)用于对多个仓库进行组合。部署的时候只能部署到Hosted类型的仓库中,如果是其他类型就会出现这个400错误。
2.默认情况下部署构件到Releases仓库中有时也会出现400错误,这个原因就像上面提到的那样,Nexus中 Releases仓库默认的Deployment Policy是“Disable Redeploy”,
所以无论你在settings.xml文件中将server的username设置为deployment还是使用admin都是无 法部署的,就会出现这个400错误。
3.Nexus中 Releases仓库Respository PolicySnapshot是“Release”
Snapshot仓库Respository PolicySnapshot是“Snapshot” 如果设置反了或错了也是无法部署的。
4.如果你Snapshot可以发布,但是releases却发布不了,可能是1.0-SNAPSHOT类似这样的,version中包含了-SNAPSHOT,所以release发布不了, 也会返回400错误。


解决办法:在nexus的maven-releases设置为Allow redeploy(可重复提交)即可

4.出现:Compilation failure: Compilation failure (编译失败)

解决办法:
因为jdk版本的升级导致一些api已经失效,解决的办法有很多,最好的办法是在pom.xml文件中加入如下配置(通过配置maven-compiler-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>

`

将jar deploy到私服nexus常见问题相关推荐

  1. 从maven私服(nexus)拉取jar文件,解析项目pom依赖信息

    一.前言 关于pom解析的方式,常见的我认为有两种: 一种是利用dom tree的结构特性,利用dom4j提供的xml解析工具将pom文件读取为dom tree结构,再层层解析出内容. 第二种方式更为 ...

  2. 解决从自建的私服nexus中下载不下来需要的jar包的问题

    在日常工作中,公司都会搭建自己的私服nexus,经常有时候明明在私服上有想要的jar包,确一直下载不下来,即使你maven中的settings和idea上的maven配置都是正确的还是下载不下来. 下 ...

  3. 使用Nexus添加jar包到私服里

    1. 登录后你可以在左侧修改登录信息: 2.接下来,我们配置一下maven的代理服务器(前提是你的电脑不能连接外网,如果可以上外网,这里也没有意思,只是介绍一下) 在左侧菜单找到如图: 点击查看右边有 ...

  4. Maven私服Nexus搭建

    Maven私服Nexus搭建 一.目的 私服是一台独立的服务器,用于解决团队内部的资源共享与资源同步问题 二.搭建流程 2.1 软件安装 2.1 环境准备: Sonatype公司的一款maven私服产 ...

  5. 第8章 私服nexus

    第8章 私服nexus 本章详细介绍了nexus的安装过程,设置maven从私服下载构件,以及发布构件至nexus. 8.1 什么是nexus nexus是一个web版的仓库管理软件 8.2 nexu ...

  6. 【Maven】高级应用:私服(nexus)搭建及使用、自定义项目骨架(archtype)

    当我们执行 Maven 构建命令时,Maven 开始按照以下顺序查找依赖的库: Maven版本: version(SNAPSHOT):快照版本.随时更新不稳定的,每个版本都只是特定时间点的快照.同时, ...

  7. 搭建私服环境及私服的使用-将第三方jar上传私服

    背景 回顾下maven的构建流程,如果没有私服,我们所需的所有jar包都需要通过maven的中央仓库或者第三方的maven仓库下载到本地,当一个公司或者一个团队所有人都重复的从maven仓库下载jar ...

  8. 配置maven私服nexus

    1.Nexus简介 1.1 Nexus概述 Nexus是一个强大的Maven仓库管理器,它极大地简化了自己内部仓库的维护和外部仓库的访问. 利用Nexus你可以只在一个地方就能够完全控制访问和部署在你 ...

  9. Jenkins CI服务器搭建及Maven私服Nexus

    Jenkins CI服务器搭建及Maven私服Nexus 一:Jenkins持续集成(CI)1 1.1:Jenkins简介及特性1 1.2:Jenkins安装1 1.3:Jenkins配置1 1.4: ...

最新文章

  1. [实现] 利用 Seq2Seq 预测句子后续字词 (Pytorch)
  2. javascript中的事件冒泡、事件捕获和事件执行顺序
  3. 【转】简单的java缓存实现
  4. MySQL 开发日志 -- 性能调优
  5. 【译】Construction of a Plasma Chain 0x1
  6. Spring Boot 内置Tomcat——集成JSP解决方案
  7. JAVA 文件编译执行与虚拟机(JVM)简单介绍
  8. Asp.net core应用在 Kubernetes上内存使用率过高问题分析
  9. Vue源码: 关于vm.$watch()内部原理
  10. 飞鸽传书最新源码类都要复杂的多
  11. bat转exe工具 Bat To Exe Converter v2.4.7 绿色版
  12. 启动和停止mysql服务器_MySQL服务器的启动与关闭方法
  13. linux java Cannot allocate memory
  14. 为什么我们需要更注重源代码安全?
  15. matlab 无穷级数求和,数项级数的求和方法.doc
  16. 产品画的Axure原型图打不开解决办法
  17. kd718和kb688参数_GJK SPP 5BGK AEC F04A tB9 D4 RMP
  18. Eclipse的Debug调试技巧大全
  19. 数据恢复工具winhex教程
  20. 单芯片无线供电IC 无线充电芯片 无线输电芯片FS68001

热门文章

  1. Python面对对象编程——公有与私有
  2. java jmx连接不上_JMX连接服务端失败
  3. liferay7.0 mysql_Liferay7 BPM门户开发之6: Activiti数据库换为mysql
  4. elasticsearch: 权威指南_你还不会Elasticsearch的CUD?
  5. apk转换ipa在线转换工具_gif转换工具
  6. element ui分页怎么做_elementUI实现分页
  7. android 百度地图zoomtospan,android百度地图:MapController
  8. php 函数 变量,PHP函数中变量的说明
  9. python基础学习22----协程
  10. 因Facebook帖子涉嫌包含仇恨言论 德国警方突击搜查36名用户住所