《maven》從私服上下載jar到本地倉庫
1:在maven目錄下conf/settings中配置模板
<profile> <id>dev</id> <repositories> <repository> <id>nexus</id> <url>http://localhost:8081/nexus/content/groups/public/</url> <!--是否下載releases構件--> <releases> <enabled>true</enabled> </releases> <!--是否下載snapshots構件--> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>public</id> <name>Public Repositories</name> <url>http://localhost:8081/nexus/content/groups/public/</url> </pluginRepository> </pluginRepositories> </profile>
2:啟用模板
<activeProfiles> <activeProfile>dev</activeProfile> </activeProfiles>