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