Pau*_*est 23 deployment nexus maven
如何配置maven项目以将快照和发布部署到Nexus?
<distributionManagement>
<repository>
<id>InternalReleases</id>
<name>Internal Releases</name>
<url>http://192.168.16.232:8081/nexus/content/repositories/releases/</url>
</repository>
<repository>
<id>InternalSnapshots</id>
<name>Internal Snapshots</name>
<url>http://192.168.16.232:8081/nexus/content/repositories/snapshots/</url>
</repository>
</distributionManagement>
Run Code Online (Sandbox Code Playgroud)
此配置在Eclipse 3.8中使用m2e 1.2创建错误
Project build error: Non-parseable POM D:\Workspaces\W\Parent\pom.xml: Duplicated tag: 'repository' (position: START_TAG
seen ...
Run Code Online (Sandbox Code Playgroud)
当pom的版本以-SNAPSHOT为后缀并在RELEASE时部署到InternalReleases存储库时,我希望将工件部署到InternalSnapshots存储库.这应该使用相同的pom.xml文件并执行相同的mvn deploy命令.
nab*_*cos 36
您需要区分版本和快照存储库.<distributionManagement>只允许<repository>一个<snapshotRepository>孩子和一个孩子.
http://maven.apache.org/pom.html#Distribution_Management
Pau*_*est 26
pom.xml配置示例
<!-- http://maven.apache.org/pom.html#Distribution_Management -->
<distributionManagement>
<snapshotRepository>
<id>InternalSnapshots</id>
<name>Internal Snapshots</name>
<url>http://192.168.16.232:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>InternalReleases</id>
<name>Internal Releases</name>
<url>http://192.168.16.232:8081/nexus/content/repositories/releases/</url>
</repository>
</distributionManagement>
Run Code Online (Sandbox Code Playgroud)
用于默认Nexus安装的.m2/settings.xml片段
<server>
<id>thirdparty</id>
<username>deployment</username>
<password>deployment123</password>
</server>
<server>
<id>InternalReleases</id>
<username>deployment</username>
<password>deployment123</password>
</server>
<server>
<id>InternalSnapshots</id>
<username>deployment</username>
<password>deployment123</password>
</server>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
40328 次 |
| 最近记录: |