setting.xml

2017-12-06  本文已影响0人  liuyiyou

<?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>

<!-- Another sample, using keys to authenticate.
<server>
  <id>siteServer</id>
  <privateKey>/path/to/private/key</privateKey>
  <passphrase>optional; leave empty if not used.</passphrase>
</server>
-->

<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>

<mirrors>

<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>nexus-releases</id>
<mirrorOf></mirrorOf>
<url>http://192.168.0.200:8081/repository/maven-releases</url>
</mirror>
<mirror>
<id>nexus-snapshots</id>
<mirrorOf>
</mirrorOf>
<url>http://192.168.0.200:8081/repository/maven-snapshots/</url>
</mirror>
</mirrors>

<profiles>

  <activation>
    <jdk>1.4</jdk>
  </activation>

  <repositories>
    <repository>
      <id>jdk14</id>
      <name>Repository for JDK 1.4 builds</name>
      <url>http://www.myhost.com/maven/jdk14</url>
      <layout>default</layout>
      <snapshotPolicy>always</snapshotPolicy>
    </repository>
  </repositories>
</profile>
-->

<profile>
<id>nexus</id>
<repositories>
<repository>
<id>nexus</id>
<name>Team Nexus Repository</name>
<url>http://192.168.0.200:8081/repository/maven-public/</url>
</repository>
<repository>
<id>nexus-snapshots</id>
<name>Team Nexus Repository</name>
<url>http://192.168.0.200:8081/repository/maven-snapshots/</url>
</repository>
<repository>
<id>nexus-releases</id>
<name>Team Nexus Repository</name>
<url>http://192.168.0.200:8081/repository/maven-releases</url>
</repository>

</repositories>

</profile>

<!--
 | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
 | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
 | might hypothetically look like:
 |
 | ...
 | <plugin>
 |   <groupId>org.myco.myplugins</groupId>
 |   <artifactId>myplugin</artifactId>
 |
 |   <configuration>
 |     <tomcatLocation>${tomcatPath}</tomcatLocation>
 |   </configuration>
 | </plugin>
 | ...
 |
 | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
 |       anything, you could just leave off the <value/> inside the activation-property.
 |
<profile>
  <id>env-dev</id>

  <activation>
    <property>
      <name>target-env</name>
      <value>dev</value>
    </property>
  </activation>

  <properties>
    <tomcatPath>/path/to/tomcat/instance</tomcatPath>
  </properties>
</profile>
-->

<profile>
<id>jdk8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>

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

上一篇下一篇

猜你喜欢

热点阅读