1.有源码的情况下

首先需要在要deploy的项目pom中添加私服地址

<distributionManagement>
<repository>
<id>nexus-xxxx-release</id>
<url>
http://ip/repository/xxxx-repo-release/
</url>
</repository>
<snapshotRepository>
<id>nexus-xxxx-snapshot</id>
<url>
http://ip/repository/xxxx-repo-snapshot/
</url>
</snapshotRepository>
</distributionManagement>

私服一般都是需要用户名/密码认证才能部署jar的,需要在setting.xml中添加 私服用户名和密码

<servers>
<server>
<id>nexus-abcdw-snapshot</id>
<username>abcdw-cc-snapshot</username>
<password>abcdw123</password>
</server>
<server>
<id>nexus-abcdw-release</id>
<username>abcdw-cc-release</username>
<password>abcdw123</password>
</server>
</servers>

然后 mvn clean deploy 就可以了

2.直接部署第三方jar包

经测试,不能从本地仓库部署,要把jar包copy 到仓库外面再执行以下命令

mvn deploy:deploy-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -Dfile=ojdbc6-11.2.0.3.jar -Durl=http://host/repository/haha-repo-release/ -DrepositoryId=nexus-haha-release

3.向本地maven repository install jar 包

mvn install:install-file "-DgroupId=auth-tools" "-DartifactId=auth-tools" "-Dversion=1.0-SNAPSHOT" "-Dpackaging=jar" "-Dfile=auth-tools-1.0-SNAPSHOT.jar"

最新文章

  1. 打印自己的C代码
  2. SQL Server 数据缓存
  3. python基础语法(2)
  4. 分布式Hadoop安装(一)
  5. htpasswd 详解
  6. iOS - Swift NSTimeZone 时区
  7. android listview 使用checkbox问题
  8. Code First研究学习2_基本的错误及解决方法
  9. &lt;Programming Collective Intelligence&gt; Chapter2:Making Recommendations
  10. 使用异步HTTP提升客户端性能(HttpAsyncClient)
  11. cronolog 对 tomcat 7 进行日志切割
  12. [Java]LeetCode141. 环形链表 | Linked List Cycle
  13. Groovy学习笔记-使用多赋值
  14. 学习ApiCloud遇到的问题
  15. 2019.01.02 poj1322 Chocolate(生成函数+二项式定理)
  16. WinForm1
  17. 20165207 Exp3 免杀原理与实践
  18. QWidget背景(透明)问题
  19. linux系统编程之进程(五):exec系列函数(execl,execlp,execle,execv,execvp)使用
  20. 中间件(WAS、WMQ)运维 9个常见难点解析

热门文章

  1. python 练习题:请利用Python内置的hex()函数把一个整数转换成十六进制表示的字符串
  2. 通过SharpZipLib实现文件夹压缩以及解压
  3. 第一个APP上架IOS审核相关的记录
  4. HTML+CSS学习笔记整理二
  5. dotnet学习系列
  6. 写一个TimeUI显示的函数,上代码
  7. 关于在linux上部署scrapy的爬虫
  8. linux sed、awk、grep同时匹配多个条(并且 or 或者)
  9. 用QT 还是MFC
  10. Linux C 后台服务程序单进程控制