赞
踩
jvm 1 | 2017-07-21 15:48:19,615+0800 INFO [pxpool-1-thread-1] admin org.sonatype.nexus.index.NexusScanningListener - Scanning of repositoryID="central" started.
jvm 1 | 2017-07-21 15:53:18,583+0800 INFO [pxpool-1-thread-1] admin org.sonatype.nexus.index.NexusScanningListener - Scanning of repositoryID="central" finished
依次打开apache-maven-3.3.9->conf->settings.xml
添加服务验证
- <server>
- <id>nexus</id>
- <username>admin</username>
- <password>admin123</password>
- </server>
添加镜像
- <mirror>
- <id>nexus-mirror</id>
- <mirrorOf>maven-central</mirrorOf>
- <url>http://192.168.2.190:8081/nexus/content/repositories/central/</url>
- </mirror>
做构件的配置
- <profile>
- <id>nexuesProfile</id>
- <repositories>
- <repository>
- <id>maven-central</id>
- <name>maven-central</name>
- <url>http://192.168.2.190:8081/nexus/content/repositories/central/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- </repositories>
- </profile>
激活构件
- <activeProfiles>
- <activeProfile>nexuesProfile</activeProfile>
- </activeProfiles>
下面贴上完整的settings.xml代码
- <?xml version="1.0" encoding="UTF-8"?>
-
- <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
-
- <pluginGroups>
- </pluginGroups>
-
- <proxies>
- </proxies>
-
- <servers>
- <server>
- <id>nexus</id>
- <username>admin</username>
- <password>admin123</password>
- </server>
- </servers>
-
- <mirrors>
- <mirror>
- <id>nexus-mirror</id>
- <mirrorOf>maven-central</mirrorOf>
- <url>http://192.168.2.190:8081/nexus/content/repositories/central/</url>
- </mirror>
- </mirrors>
-
- <profiles>
- <profile>
- <id>nexuesProfile</id>
- <repositories>
- <repository>
- <id>maven-central</id>
- <name>maven-central</name>
- <url>http://192.168.2.190:8081/nexus/content/repositories/central/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- </repositories>
- </profile>
- </profiles>
- <activeProfiles>
- <activeProfile>nexuesProfile</activeProfile>
- </activeProfiles>
-
- </settings>
关于settings.xml的详细介绍请移步http://blog.csdn.net/Dynamic_W/article/details/77483311
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。