我有一个包含多个项目的扁平项目结构.我使用Nexus作为内部存储库,使用SVN进行源代码管理.我能够部署SNAPSHOT我的项目的构建.
在我的父pom中,我添加了maven release插件:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.1</version>
</plugin>
Run Code Online (Sandbox Code Playgroud)
和分发信息:
<distributionManagement>
<repository>
<id>releases</id>
<url>http://localhost:8081/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Internal Snapshots</name>
<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
Run Code Online (Sandbox Code Playgroud)
当我这样做时mvn release:prepare,发布版本的工件不会被部署到repo.因此,如果我有一个项目A依赖于项目B.项目A无法使用发布版本获取B的工件.