maven setting.xml文件配置

官网文档:http://maven.apache.org/ref/3.2.5/maven-settings/settings.html

下面是我个人的配置

<?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:apache
epository</localRepository>

  <pluginGroups/>
  <proxies/>

  <servers>
    <server>
      <id>tomcat7</id>
      <passphrase></passphrase>
      <username>tomcat</username>
      <password>210019</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> maven-net-cn</id>
    <name> Maven China Mirror</name>
    <url> http://maven.net.cn/content/groups/public/</url>
    <mirrorOf>central</mirrorOf>
   </mirror>
  </mirrors>

  <profiles>
    <!--配置jdk的版本-->
    <profile>
      <id>jdk-1.8</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <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>

</settings>
--------------- 我每一次回头,都感觉自己不够努力,所以我不再回头。 ---------------
原文地址:https://www.cnblogs.com/zjw-blog/p/13583610.html