首页 > 学院 > 开发设计 > 正文

maven配置发布仓库

2019-11-06 06:06:09
字体:
来源:转载
供稿:网友
首先,在工程的pom.xml中添加仓库信息
<distributionManagement>    <repository>        <id>releases</id>        <name>releases repo</name>        <url>http://192.168.253.128:8081/nexus/content/repositories/releases/</url>    </repository>    <snapshotRepository>        <id>snapshots</id>        <name>snapshots repo</name>        <url>http://192.168.253.128:8081/nexus/content/repositories/snapshots/</url>    </snapshotRepository></distributionManagement>然后,在%maven_home%/conf/settings.xml中配置仓库授权信息
<servers>    <server>        <id>releases</id>        <username>admin</username>        <passWord>admin123</password>    </server>    <server>        <id>snapshots</id>        <username>admin</username>        <password>admin123</password>    </server></servers>最后,在项目根目录运行deploy命令
mvn deploy -Dmaven.test.skip=true
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表