maven nexus 私仓配置

<?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>
 	<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>   
  </pluginGroups>
  <servers>
	  <server>
		<id>nexus-releases</id>
		<username>admin</username>
		<password>xxxxx</password>
	  </server>
	  
	  <server>
		<id>nexus-snapshots</id>
		<username>admin</username>
		<password>xxxxxx</password>
	  </server>
  </servers>
  <mirrors>
		<mirror>
			<id>nexus</id>
			<mirrorOf>*</mirrorOf>
			<name>Nexus Mirror.</name>
			<url>http://maven.xxxx.cn:6081/content/groups/public/</url>
		</mirror>

	 <mirror>
         <id>alimaven</id>
       <name>aliyun maven</name>
         <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
         <mirrorOf>central</mirrorOf>
      </mirror>
  <mirror>
                        <id>alimaven</id>
                         <name>center maven</name>
                         <url>http://repo.maven.apache.org/maven2/</url>
                         <mirrorOf>central</mirrorOf>
                </mirror>
  </mirrors>

  <profiles>
		<profile>
			<id>nexus</id>
			<repositories>
			  <repository>
				<id>nexus</id>
				<name>Nexus</name>
				<url>http://maven.xxxx.cn:6081/content/groups/public/</url>
				<releases><enabled>true</enabled></releases>
				<snapshots><enabled>true</enabled></snapshots>
			  </repository>
			</repositories>
			<pluginRepositories>
			  <pluginRepository>
				<id>nexus</id>
				<name>Nexus</name>
				<url>http://maven.xxx.cn:6081/content/groups/public/</url>
				<releases><enabled>true</enabled></releases>
				<snapshots><enabled>true</enabled></snapshots>
			  </pluginRepository>
			</pluginRepositories>
		</profile>
    <!--覆盖maven中央仓库设置开启releases和snapshots版本的下载-->
	<profile>
		<id>central</id>
		<repositories>
			 <repository>
				<id>central</id>
				<url>http://central</url>
				<releases><enabled>true</enabled></releases>
			    <snapshots><enabled>true</enabled></snapshots>
			</repository>
		</repositories>
		<pluginRepositories>
			<pluginRepository>
				<id>central</id>
				<url>http://central</url>
				<releases><enabled>true</enabled></releases>
			    <snapshots><enabled>true</enabled></snapshots>
			</pluginRepository>
		</pluginRepositories>
    </profile>
<profile>
 <id>sonar</id>
 <properties>
  <sonar.host.url>
   http://192.168.x.x:9000
  </sonar.host.url>
 </properties>
</profile> 
    
  </profiles>

  <activeProfiles>
	    <activeProfile>nexus</activeProfile>
		<activeProfile>central</activeProfile>
		<activeProfile>sonar</activeProfile>
  </activeProfiles>

</settings>

posted @ 2020-12-02 16:57  Done、  阅读(0)  评论(0编辑  收藏  举报