发布Maven项目到nexus中
来源:互联网 发布:python scrapy 教程 编辑:程序博客网 时间:2024/05/23 16:55
1.在pom.xml文件中配置需要发布的工厂
如果想把项目发布到nexus中,需要在pom.xml中配置releases和snapshots版本发布的具体repository
<distributionManagement>
<!-- 两个ID必须与setting.xml中的<server><id>nexus-releases</id></server>保持一致-->
<repository>
<id>nexus-releases</id>
<name>Nexus Release Repository</name>
<url>http://localhost:8081/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
2.给用户授权,让其有权发布项目
在Maven的conf中的setting.xml文件中,找到servers标签,添加相应的用户。进行授权
这里的id需要和pom.xml中的id一样
<servers>
<server>
<id>nexus-releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>nexus-snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
这里配置的是admin用户,因为admin是管理员用户。是有权限发布的。
假如你配置的是deploy用户,需要给deploy用户授权。
3.发布到nexus中
使用mvn:deploy 命令发布到nexus中
发布成功后,可以在repositories中的releases或者snapshots中看到刚刚发布的项目
转载:http://www.cnblogs.com/meet/p/5060896.html
0 0
- 3.发布Maven项目到nexus中
- 发布Maven项目到nexus中
- 3.发布Maven项目到nexus中
- maven项目发布到nexus
- Maven项目的发布,发布到Nexus
- 将Maven项目发布到Nexus私服
- 将Maven项目发布到Nexus私服
- 将maven项目发布到nexus
- Maven项目连接&发布到Nexus私服
- 将Maven项目发布到本地Maven私服Nexus
- eclipse中发布项目到nexus私服
- maven构建的项目 发布jar到nexus上
- Android Studio发布项目到Maven私有库(Nexus)
- 发布项目到Nexus私服
- 07、发布项目到nexus
- 自己的maven项目jar包发布到nexus修改maven/settings.xml
- maven 发布jar到 nexus 中央仓库
- Maven打包自动发布到nexus私服
- iOS攻防
- web移动端Fixed在Input获取焦点时ios下产生的BUG及处理
- js中创建正则表达式的两种方式
- 谈谈秒杀场景
- java虚拟机GC是这样回收对象的吗?
- 发布Maven项目到nexus中
- OVER(PARTITION BY)函数用法
- C#用代码创建的Button大小为什么不对?
- Windows下安装Git
- 【Java基础】Java异常处理
- 03编程上机练习
- Mybatis-Spring
- H. Streets of Working Lanterns----思维题
- 解决Sublime Text 2中文显示乱码问题