Maven默认不拉取快照包,需要添加以下配置:
<profiles>
<profile>
<id>OpenSNAPSHOT</id>
<repositories>
<repository>
<id>nexusshot</id>
<name>Repository for Snapshot</name>
<url>https://nexus.example.com/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>OpenSNAPSHOT</activeProfile>
</activeProfiles>
- 注意: 必须在<activeProfiles>中添加profile.id ,而且一定要对应上
网友评论