Maven倉庫配置

配置公司私有庫和使用阿里云作為中央倉庫

<?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">
  <servers>
    <!-- 下載和部署庫的服務器驗證信息 -->
    <server>
      <id>slimcloud-releases</id>
      <username>******</username>
      <password>******</password>
    </server>
    <server>
      <id>slimcloud-snapshots</id>
      <username>******</username>
      <password>******</password>
    </server>
  </servers>
  <mirrors>
    <!-- 鏡像庫 -->
    <mirror>
      <id>aliyun</id>
      <mirrorOf>!slimcloud-releases,!slimcloud-snapshots</mirrorOf>
      <url>http://maven.aliyun.com/repository/public</url>
    </mirror>
  </mirrors>
  <profiles>
    <profile>
      <id>slimcloud</id>
      <repositories>
        <repository>
          <!-- 中央倉庫 -->
          <id>central</id>
          <url>https://maven.aliyun.com/repository/public/</url>
          <releases>
            <enabled>true</enabled>
            <!-- 一周檢查一次更新 -->
            <updatePolicy>interval:604800</updatePolicy>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
        <repository>
          <id>snapshots</id>
          <url>http://maven.aliyun.com/repository/public</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
        <repository>
          <!-- slimcloud 澤元releases庫 -->
          <id>slimcloud-releases</id>
          <url>http://repo.slimcloud.io/content/repositories/releases/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
        <repository>
          <!-- slimcloud 澤元snapshots庫 -->
          <id>slimcloud-snapshots</id>
          <url>http://repo.slimcloud.io/content/repositories/snapshots/</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <!-- 插件庫 -->
        <pluginRepository>
          <id>central</id>
          <url>http://maven.aliyun.com/repository/public</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </pluginRepository>
        <pluginRepository>
          <id>snapshots</id>
          <url>http://maven.aliyun.com/repository/public</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </pluginRepository>
        <pluginRepository>
          <id>slimcloud-plugin</id>
          <url>http://repo.slimcloud.io/content/repositories/public/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
      <properties>
        <downloadSources>true</downloadSources>
        <downloadJavadocs>false</downloadJavadocs>
        <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>
      <activation>
        <activeByDefault>true</activeByDefault>
        <jdk>1.8</jdk>
      </activation>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>slimcloud</activeProfile>
  </activeProfiles>
</settings>