maven连接私服配置m2 setting 文件

<?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.mortbay.jetty</pluginGroup>
  </pluginGroups>

  <proxies>
  </proxies>

  <servers>
    <server>
      <id>nexus-releases</id>
      <username>username</username>
      <password>password</password>
    </server>
    <server>
      <id>nexus-snapshots</id>
      <username>username</username>
      <password>password</password>
    </server>
  </servers>

  <mirrors>
    <mirror>
      <id>nexus</id>
      <mirrorOf>*</mirrorOf>
      <name>Nexus.</name>
      <url>http://192.168.1.2:8081/nexus/content/groups/public/</url>
	  <!--
	   <url>http://ip:8081/nexus/content/groups/public/</url>
	   -->
    </mirror>
  </mirrors>
  
  <profiles>
    <profile>
      <id>nexus</id>
      <repositories>
        <repository>
          <id>central</id>
          <name>central</name>
          <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>
  </profiles>

  <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>
</settings>


你可能感兴趣的:(maven连接私服配置m2 setting 文件)