<?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>

    <groupId>io.gitee.h8778</groupId>
    <artifactId>test2</artifactId>
    <version>2.0.0</version>

    <name>test2</name>
    <url>https://gitee.com/h8778/test2</url>


    <description>
        test2测试测试
    </description>

    <developers>
        <developer>
            <id>h8778</id>
            <name>h8778</name>
            <roles>
                <role>Project Manager</role>
                <role>Developer</role>
            </roles>
            <email>hiiso_apple@163.com</email>
            <url>https://gitee.com/h8778</url>
        </developer>
    </developers>

    <issueManagement>
        <system>Gitee</system>
        <url>https://gitee.com/h8778/test2/issues</url>
    </issueManagement>

    <inceptionYear>2024</inceptionYear>

    <packaging>jar</packaging>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://gitee.com/h8778/test2.git</connection>
        <developerConnection>scm:git:git@gitee.com:h8778/test2.git</developerConnection>
        <url>https://gitee.com/h8778/test2</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <repositories>
        <repository>
            <id>nexus-aliyun</id>
            <name>Nexus Aliyun</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        </repository>
    </repositories>

    <!--<distributionManagement>
        <repository>
            <id>rdc-releases</id>
            <url>https://packages.aliyun.com/maven/repository/2223213-release-5Y5OZQ/</url>
        </repository>
        <snapshotRepository>
            <id>rdc-snapshots</id>
            <url>https://packages.aliyun.com/maven/repository/2223213-snapshot-xTMMxm/</url>
        </snapshotRepository>
    </distributionManagement>-->

    <dependencies>

    </dependencies>

    <build>
        <plugins>
            <!--jdk配置-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <!-- Source -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.1.0</version>
                <inherited>true</inherited>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludeResources>true</excludeResources>
                    <useDefaultExcludes>true</useDefaultExcludes>
                </configuration>
            </plugin>
            <plugin>
                <!-- mvn  -N versions:update-child-modules 更新版本号 -->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <generateBackupPoms>false</generateBackupPoms>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <configuration>
                            <!-- 改成你自己的路径 -->
                            <executable>D:\tools\GnuPG\bin\gpg.exe</executable>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <useAgent>true</useAgent>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                    <!--<gpgArguments>
                                        <arg>&#45;&#45;batch</arg>
                                        <arg>&#45;&#45;pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>-->
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.4.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <!-- 这里的serverId是之前在settings.xml中配置的 -->
                            <publishingServerId>center</publishingServerId>
                            <tokenAuth>true</tokenAuth>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>