本文適用于,maven和nexus都已經(jīng)正常配置,但是依賴包只能依賴RELEASE不能依賴SNAPSHOT
<mirror>
<id>Nexus</id>
<url>http://192.168.xxx.xxx/content/groups/public/</url>
<mirrorOf>*</mirrorOf>
</mirror>
<mirror>
<id>Nexus2</id>
<url>http://192.168.xxx.xxx/content/groups/public/</url>
<mirrorOf>public-snapshots</mirrorOf> // 對snapshots有效
</mirror>
</mirrors>```
===========================================(娛樂分割線)
``` <profiles> //定義public-snapshots profile
<profile>
<id>public-snapshots</id>
<repositories>
<repository>
<id>public-snapshots</id>
<url>http://public- snapshots
</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public-snapshots</id>
<url>http://public-snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles> ```
===========================================(娛樂分割線)
```<activeProfiles>
<activeProfile>public-snapshots</activeProfile>
</activeProfiles> //使profile生效。 ```
相關(guān)指令:```mvn eclipse:eclipse```
