0
点赞
收藏
分享

微信扫一扫

maven 配置 settings

心存浪漫 2022-04-13 阅读 38
maven
<?xml version="1.0" encoding="UTF-8"?>

  **<localRepository>D:\maven\maven-repository</localRepository>**
<!-- 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>
-->
alimaven * aliyun maven https://maven.aliyun.com/nexus/content/repositories/central/ nexus-aliyun * Nexus aliyun https://maven.aliyun.com/nexus/content/groups/public repo1 central Human Readable Name for this Mirror. https://repo1.maven.org/maven2/ repo2 central Human Readable Name for this Mirror. https://repo2.maven.org/maven2/ jdk-1.8 true 1.8
  <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
 | Specifies a set of introductions to the build process, to be activated using one or more of the
 | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
 | or the command line, profiles have to have an ID that is unique.
 |
 | An encouraged best practice for profile identification is to use a consistent naming convention
 | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
 | This will make it more intuitive to understand what the set of introduced profiles is attempting
 | to accomplish, particularly when you only have a list of profile id's for debug.
 |
 | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
<profile>
  <id>jdk-1.4</id>

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

<!--
 | 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>
-->
举报

相关推荐

0 条评论