<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>cn.com.zhaoweiping</groupId>
  <artifactId>alpha-framework</artifactId>
  <version>${alpha-framework.version}</version>

  <name>α-framework</name>
  <description>「CURD」开发框架</description>
  <!-- Invalid POM: /cn/com/zhaoweiping/alpha-framework/1.0.0-RELEASE/alpha-framework-1.0.0-RELEASE.pom: Project URL missing -->
  <url>https://www.zhaoweiping.com.cn/</url>

  <packaging>jar</packaging>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>

    <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.test.skip>true</maven.test.skip>

    <!-- spring boot -->
    <spring.boot.version>2.4.5</spring.boot.version>
    <!-- framework version -> spring.boot.version.(x).release - x 为在当前 spring boot 版本上面的版本升级(feat) -->
    <!-- publish oss(x) -->
    <alpha-framework.version>2.4.5.1.RELEASE</alpha-framework.version>

    <lombok.version>1.18.10</lombok.version>
    <guava.version>20.0</guava.version>
    <groovy.version>3.0.3</groovy.version>
    <hutool.version>5.0.5</hutool.version>
    <commons-beanutils.version>1.9.4</commons-beanutils.version>
    <junit.version>4.13</junit.version>

    <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
    <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
  </properties>

  <dependencies>
    <!-- 代码 -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-jpa</artifactId>
      <version>${spring.boot.version}</version>
    </dependency>

    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${lombok.version}</version>
    </dependency>

    <!-- 源码 -->
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy</artifactId>
      <version>${groovy.version}</version>
    </dependency>

    <!-- 工具 -->
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>

    <dependency>
      <groupId>cn.hutool</groupId>
      <artifactId>hutool-all</artifactId>
      <version>${hutool.version}</version>
    </dependency>

    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>${commons-beanutils.version}</version>
    </dependency>

    <!-- 测试 -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <version>${spring.boot.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${spring.boot.version}</version>
      </plugin>
    </plugins>
  </build>

  <licenses>
    <license>
      <name>GNU General Public License version 3</name>
      <url>https://opensource.org/licenses/GPL-3.0</url>
    </license>
  </licenses>

  <scm>
    <tag>master</tag>
    <url>https://gitee.com/zhaoweiping/alpha-framework.git</url>
    <connection>scm:git:https://gitee.com/zhaoweiping/alpha-framework.git</connection>
    <developerConnection>scm:git:git@gitee.com:zhaoweiping/alpha-framework.git</developerConnection>
  </scm>

  <developers>
    <developer>
      <id>zwp</id>
      <name>zhaoweiping</name>
      <email>308044203@qq.com</email>
      <url>https://gitee.com/zhaoweiping</url>
    </developer>
  </developers>

  <profiles>
    <profile>
      <id>release-oss</id>
      <build>
        <plugins>
          <!-- Source -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven-source-plugin.version}</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Javadoc -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven-javadoc-plugin.version}</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <doclint>none</doclint>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- GPG -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <configuration>
              <useAgent>false</useAgent>
            </configuration>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- 自动完成 oss 上面的项目关闭/发布 -->
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
              <!-- serverId 要与setting.xml server id一致 -->
              <serverId>oss</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <!-- deploy skip test -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <snapshotRepository>
          <!-- id 要与setting.xml server id一致 -->
          <id>oss</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
          <!-- id 要与setting.xml server id一致 -->
          <id>oss</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
    </profile>
    <!-- 本地私服上传 -->
    <profile>
      <id>release-nexus</id>
      <build>
        <plugins>
          <!-- Source -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</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>
                <configuration>
                  <doclint>none</doclint>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- GPG -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <configuration>
              <useAgent>false</useAgent>
            </configuration>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <snapshotRepository>
          <id>nexus</id>
          <url>http://124.200.189.98:20000/repository/introns-hosted-snapshot/</url>
        </snapshotRepository>
        <repository>
          <id>nexus</id>
          <url>http://124.200.189.98:20000/repository/introns-hosted-release/</url>
        </repository>
      </distributionManagement>
    </profile>
  </profiles>

  <repositories>
    <repository>
      <id>introns-center</id>
      <name>INTRONS Maven私服</name>
      <url>http://124.200.189.98:20000/repository/introns-center/</url>
    </repository>
  </repositories>
</project>