[b]1.配置项目发布到仓库的位置(配置SNAPSHOT和release工厂)[/b]
在超级POM.xml中配置发布管理
[b]
2.配置Release仓库的发布特性
[/b]
在nexus的管理页面中,打开release版本的发布:
点击release仓库-->Configuration-->Access Settings-->Deployment Policy: AllowRedeploy
[b]
3.配置发布权限
[/b]
用户settings.xml中的server标签进行权限配置,即当发布相应版本的时候,通过指定的用户账号进行发布。(账号使用nexus中默认的deployment账户)
:arrow: :arrow: :arrow: :arrow: :arrow: :arrow: :arrow: :arrow:
在超级POM.xml中配置发布管理
<!-- 配置项目发布到私服的哪个仓库中 -->
<distributionManagement>
<!-- 配置SNAPSHOT版本发布的目标仓库 -->
<snapshotRepository>
<id>user-SNAPSHOT</id>
<name>User project release</name>
<url>http://localhost:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
<!-- 配置release版本发布的目标仓库 -->
<repository>
<id>user-release</id>
<name>User project release</name>
<url>http://localhost:8081/nexus/content/repositories/releases/</url>
</repository>
</distributionManagement>
[b]
2.配置Release仓库的发布特性
[/b]
在nexus的管理页面中,打开release版本的发布:
点击release仓库-->Configuration-->Access Settings-->Deployment Policy: AllowRedeploy
[b]
3.配置发布权限
[/b]
用户settings.xml中的server标签进行权限配置,即当发布相应版本的时候,通过指定的用户账号进行发布。(账号使用nexus中默认的deployment账户)
<server>
<!--id必须与pom.xml中的distributionManagement配置的id一致-->
<id>user-SNAPSHOT</id>
<username>deployment</username>
<password>deployment123</password>
</server>
<server>
<!--id必须与pom.xml中的distributionManagement配置的id一致-->
<id>user-release</id>
<username>deployment</username>
<password>deployment123</password>
</server>
:arrow: :arrow: :arrow: :arrow: :arrow: :arrow: :arrow: :arrow: