配置maven从私服上下载构件
maven 本地setting.xml配置
<!--配置maven从私服上下载构件 --> <profiles> <profile> <repositories> <repository> <id>nexus</id> <name>Team Nexus Repository</name> <url>http://192.168.1.2:8081/nexus/content/groups/public</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <name>Team Nexus Repository</name> <url>http://192.168.1.2:8081/nexus/content/groups/public</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <!--激活nexus的profile --> <activeProfiles> <activeProfile>nexus</activeProfile> </activeProfiles> <!--创建匹配任何仓库的镜像,镜像的地址为私服,这样maven对任何仓库的构建下载请求都会转到私服中--> <mirrors> <mirror> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>http://192.168.1.2:8081/nexus/content/groups/public</url> </mirror> </mirrors> <!-- 部署构件至nexus,需要设置认证信息 --> <servers> <server> <id>nexus-releases</id> <username>admin</username> <password>admin123</password> </server> <server> <id>nexus-snapshots</id> <username>admin</username> <password>admin123</password> </server> </servers>
看完打开支付宝扫一扫领个红包吧!