<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.2.2.RELEASE</version>
  </parent>

  <groupId>org.shaneking</groupId>
  <artifactId>org.shaneking</artifactId>
  <version>0.13.7</version>
  <packaging>pom</packaging>

  <name>Maven Top Project for ShaneKing</name>
  <description>Maven Top Project For ShaneKing</description>
  <url>https://github.com/ShaneKing/org.shaneking</url>
  <inceptionYear>2011-2020</inceptionYear>

  <organization>
    <name>Azolla</name>
    <url>https://github.com/Azolla</url>
  </organization>
  <licenses>
    <license>
      <name>Apache-2.0</name>
      <url>https://opensource.org/licenses/Apache-2.0</url>
      <distribution>repo</distribution>
      <comments>ShaneKing is released under Apache-2.0 License.</comments>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>ShaneKing</id>
      <name>ShaneKing</name>
      <email>github@azolla.org</email>
      <url>https://github.com/ShaneKing</url>
      <organization>Azolla</organization>
      <organizationUrl>https://github.com/Azolla</organizationUrl>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>+8</timezone>
      <properties>
        <dept>No</dept>
      </properties>
    </developer>
  </developers>
  <contributors>
    <contributor>
      <name>Maogu</name>
      <email>git@azolla.org</email>
      <url>https://github.com/Maogu</url>
      <organization>Azolla</organization>
      <organizationUrl>https://github.com/Azolla</organizationUrl>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>+8</timezone>
      <properties>
        <dept>No</dept>
      </properties>
    </contributor>
  </contributors>

  <scm>
    <connection>scm:git:git@github.com:ShaneKing/org.shaneking.git</connection>
    <developerConnection>scm:git:git@github.com:ShaneKing/org.shaneking.git</developerConnection>
    <url>git@github.com:ShaneKing/org.shaneking.git</url>
  </scm>
  <issueManagement>
    <system>Github</system>
    <url>https://github.com/ShaneKing/org.shaneking/issues</url>
  </issueManagement>
  <ciManagement>
    <system>Travis-CI</system>
    <url>https://travis-ci.org/ShaneKing/org.shaneking</url>
  </ciManagement>

  <distributionManagement>
    <repository>
      <id>oss</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
  </distributionManagement>
  <properties>
    <!-- dependencies : updated 2019 -->
    <com.belerweb_pinyin4j_version>2.5.1</com.belerweb_pinyin4j_version>
    <com.github.jsqlparser_jsqlparser_version>3.1</com.github.jsqlparser_jsqlparser_version>
    <com.google.guava_guava_version>28.1-jre</com.google.guava_guava_version>
    <com.google.zxing_version>3.4.0</com.google.zxing_version>
    <commons-io_commons-io_version>2.6</commons-io_commons-io_version>
    <commons-net_commons-net_version>3.6</commons-net_commons-net_version>
    <!-- build plugins -->
    <org.jacoco_jacoco-maven-plugin_version>0.8.5</org.jacoco_jacoco-maven-plugin_version>
    <sh.tak.appbundler_appbundle-maven-plugin_version>1.2.0</sh.tak.appbundler_appbundle-maven-plugin_version><!-- g2048 -->
    <!-- profile plugins -->
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
  </properties>

  <!-- mvn -N versions:set -DgenerateBackupPoms=false -DnewVersion=0.13.7 -->
  <!-- Unused : mvn -N versions:update-child-modules -->
  <modules>
    <module>../org.shaneking.skava</module>
    <module>../org.shaneking.test</module>
    <module>../org.shaneking.codec</module>
    <module>../org.shaneking.jackson</module>
    <module>../org.shaneking.jsqlparser</module>
    <module>../org.shaneking.sql</module>
    <module>../org.shaneking.skavax</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.belerweb</groupId>
        <artifactId>pinyin4j</artifactId>
        <version>${com.belerweb_pinyin4j_version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.jsqlparser</groupId>
        <artifactId>jsqlparser</artifactId>
        <version>${com.github.jsqlparser_jsqlparser_version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${com.google.guava_guava_version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.zxing</groupId>
        <artifactId>core</artifactId>
        <version>${com.google.zxing_version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.zxing</groupId>
        <artifactId>javase</artifactId>
        <version>${com.google.zxing_version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io_commons-io_version}</version>
      </dependency>
      <dependency>
        <groupId>commons-net</groupId>
        <artifactId>commons-net</artifactId>
        <version>${commons-net_commons-net_version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <!-- mvn clean install -->
  <!-- mvn clean deploy -DskipTests -P release -Dgpg.passphrase=分享为shaneking在上海 -->
  <build>
    <pluginManagement>
      <plugins>
        <!--compile-->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <parameters>true</parameters>
            <source>${maven.compiler.source}</source>
            <target>${maven.compiler.target}</target>
          </configuration>
        </plugin>
        <!--test-->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <!-- 使用 maven-surefire-plugin来执行单元测试。 将surefireArgLine赋值给argLine参数，以保证在测试执行时Jacoco agent处于运行状态。 -->
            <argLine>${surefireArgLine}</argLine>
            <useManifestOnlyJar>false</useManifestOnlyJar>
            <useSystemClassLoader>true</useSystemClassLoader>
          </configuration>
        </plugin>
        <!--test:coverage-->
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${org.jacoco_jacoco-maven-plugin_version}</version>
          <executions>
            <execution>
              <!-- 在maven的initialize阶段，将Jacoco的runtime agent作为VM的一个参数 传给被测程序，用于监控JVM中的调用。 -->
              <id>default-prepare-agent</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
              <configuration>
                <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
                <propertyName>surefireArgLine</propertyName>
              </configuration>
            </execution>
            <execution>
              <!-- 在程序的verify阶段，执行report测试的程序。 文件的输入为perpare-agent阶段中设置或者默认的jacoco.exec. 参数 includes和excludes可用来选定report中过滤的类。 -->
              <id>default-report</id>
              <phase>test</phase>
              <goals>
                <goal>report</goal>
              </goals>
              <configuration>
                <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
                <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <!-- mvn clean deploy -P release -Dgpg.passphrase=分享为shaneking在上海 -->
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- GPG:-Dgpg.passphrase=分享为shaneking在上海 -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Javadoc -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Source -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
