maven的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">

	<localRepository>E:\myEclipseGuilf\workspace\demo-maven\repository</localRepository>
	<pluginGroups>
	</pluginGroups>

	<proxies>
	</proxies>

	<profiles>
		<profile>
        <id>nexus</id>
        <repositories>
            <repository>
              <id>public</id>
              <url>http://192.168.88.134:8081/nexus/content/groups/public/</url>
              <releases><enabled>true</enabled></releases>
              <snapshots><enabled>false</enabled></snapshots>
            </repository>
            <repository>
              <id>public-snapshots</id>
              <url>http://192.168.88.134:8081/nexus/content/repositories/snapshots/</url>
              <releases><enabled>false</enabled></releases>
              <snapshots><enabled>true</enabled></snapshots>
            </repository>
      </repositories>
      <pluginRepositories>
          <pluginRepository>
            <id>public</id>
            <url>http://192.168.88.134:8081/nexus/content/groups/public/</url>
            <releases><enabled>true</enabled></releases>
            <snapshots><enabled>false</enabled></snapshots>
          </pluginRepository>
          <pluginRepository>
            <id>public-snapshots</id>
            <url>http://192.168.88.134:8081/nexus/content/repositories/snapshots/</url>
            <releases><enabled>false</enabled></releases>
            <snapshots><enabled>true</enabled></snapshots>
          </pluginRepository>
      </pluginRepositories>
      </profile>
	</profiles>
	
	<mirrors>
     <!--1021-->
        <mirror>
			<id>nexus-public</id>
			<mirrorOf>*</mirrorOf>
			<url>http://192.168.88.134:8081/nexus/content/groups/public/</url>
		</mirror>
        <mirror>
			<id>nexus-public-snapshots</id>
			<mirrorOf>Snapshots</mirrorOf>
			<url>http://192.168.88.134:8081/nexus/content/groups/public/</url>
		</mirror>
	</mirrors>
  
  <servers>
	<server>
		<id>repo</id>
		<username>admin</username>
		<password>admin123</password>
    </server>
    <server>
      <id>Snapshots</id>
      <username>admin</username>
      <password>admin123</password>
    </server>
  </servers>

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

</settings>

 这是放本地仓库的位置

<localRepository>E:\myEclipseGuilf\workspace\demo-maven\repository</localRepository>

这是私服里面仓库所放的位置

http://192.168.88.134:8081/nexus/content/groups/public/
http://192.168.88.134:8081/nexus/content/repositories/snapshots/

mirror镜像,如果本地和私服里面都没有要找的包,就到第三方仓库去找然后放到私服和本地来
最后admin admin123 是用户名和密码

猜你喜欢

转载自www.cnblogs.com/guilf/p/9266551.html
今日推荐