<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

<!--    <parent>-->
<!--        <groupId>cn.bugstack</groupId>-->
<!--        <artifactId>xfg-dev-tech-micro-service-a</artifactId>-->
<!--        <version>0.0.6</version>-->
<!--    </parent>-->

    <groupId>cn.allms</groupId>
    <artifactId>dev-tech-api</artifactId>
    <version>2.0.2</version>

    <!--
    1. 阿里云发包，打开 parent 注释掉单独的 groupId、version
    2. maven 中心仓库发包，保留目前的结构
    3. 阿里云发包 不需要下面的 gpg 等配置操作，可以注释掉。
    -->

    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <retrofit2.version>2.9.0</retrofit2.version>
        <slf4j.version>2.0.6</slf4j.version>
        <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
        <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
        <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
        <maven-checksum-plugin.version>1.10</maven-checksum-plugin.version>
        <project.author.github>https://github.com/qfmx</project.author.github>
    </properties>

    <name>dev-tech-api</name>
    <description>maven 中心仓库发包</description>
    <url>${project.author.github}/xfg-dev-tech-micro-service-a</url>

    <licenses>
        <license>
            <name>Apache License</name>
            <url>https://opensource.org/license/apache-2-0/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>Xichujun</id>
            <name>Xichujun</name>
            <email>1125438556@qq.com</email>
            <url>${project.author.github}</url>
            <organization>xfg-dev-tech-micro-service-a</organization>
            <organizationUrl>${project.author.github}/xfg-dev-tech-micro-service-a</organizationUrl>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
            <timezone>Asia/Shanghai</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:${project.author.github}/xfg-dev-tech-micro-service-a.git</connection>
        <developerConnection>scm:git:${project.author.github}/xfg-dev-tech-micro-service-a.git</developerConnection>
        <tag>HEAD</tag>
        <url>${project.author.github}/xfg-dev-tech-micro-service-a</url>
    </scm>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12.4</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <aggregate>true</aggregate>
                    <charset>UTF-8</charset>
                    <docencoding>UTF-8</docencoding>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <javadocExecutable>
                                C:\\Program Files\\java\\jdk1.8.0_201\\bin\\javadoc
                            </javadocExecutable>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.nicoulaj.maven.plugins</groupId>
                <artifactId>checksum-maven-plugin</artifactId>
                <version>${maven-checksum-plugin.version}</version>
                <executions>
                    <execution>
                        <id>create-checksums</id>
                        <goals>
                            <goal>artifacts</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.5.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central-xcj</publishingServerId>
                </configuration>
            </plugin>
        </plugins>
    </build>

<!--    <distributionManagement>-->
<!--        <snapshotRepository>-->
<!--            <id>ossrh</id>-->
<!--            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>-->
<!--        </snapshotRepository>-->
<!--        <repository>-->
<!--            <id>ossrh</id>-->
<!--            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>-->
<!--        </repository>-->
<!--    </distributionManagement>-->

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <additionalparam>-Xdoclint:none</additionalparam>
                                    <javadocExecutable>
                                        C:\\Program Files\\java\\jdk1.8.0_201\\bin\\javadoc
                                    </javadocExecutable>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>