<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>
    <properties>
        <java.version>1.8</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!--ljjun added to support jna-->
        <jna.version>5.8.0</jna.version>
        <jna-platform.version>5.8.0</jna-platform.version>
        <!--ljjun end to support jna-->
    </properties>

    <dependencies>
        <!--ljjun added to support jna-->
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>${jna.version}</version>
        </dependency>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna-platform</artifactId>
            <version>${jna-platform.version}</version>
        </dependency>
        <!--ljjun end to support jna-->

        <!--ljjun added other support libraries-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.26</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-json</artifactId>
            <version>5.8.32</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.3</version>
        </dependency>
        <!--ljjun end other support libraries-->
    </dependencies>

    <build>
        <plugins>
            <!-- 编译插件，设置源码以及编译的jdk版本 -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
            <!-- Source -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</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>2.9.1</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Javadoc -->
            <!-- Gpg Signature -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>com.GRG.GRGCR6WebSDK.test.TestMain</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <!-- ljjun added to assembly jar with dependencies-->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>com.GRG.GRGCR6WebSDK.test.TestMain</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- 老账号的配置：Gpg Signature -->
            <!--将组件部署到OSSRH并将其发布到Central Repository-->
            <!--<plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>${serverId}</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>-->
            <!--新账号的配置：将组件部署到OSSRH并将其发布到Central Repository-->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.4.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <tokenAuth>true</tokenAuth>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <distributionManagement>
        <snapshotRepository>
            <!-- 与settings.xml的server.id保持一致 -->
            <id>${serverId}</id>
            <url>https://central.sonatype.com/</url>
        </snapshotRepository>
        <!-- 老账号配置
        <snapshotRepository>
            &lt;!&ndash;这个id和settings.xml中servers.server.id要相同，因为上传jar需要登录才有权限&ndash;&gt;
            <id>${serverId}</id>
            <name>OSS Snapshots Repository</name>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            &lt;!&ndash;这个id和settings.xml中servers.server.id要相同，因为上传jar需要登录才有权限&ndash;&gt;
            <id>${serverId}</id>
            <name>OSS Staging Repository</name>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>-->
    </distributionManagement>
    <groupId>io.github.gdtegex</groupId>
    <artifactId>GRGCRXProtocol</artifactId>
    <!-- 发布到这个上OSSRH:项目中的version,不要带上SNAPSHOT，这样就可以直接发布到中央仓库
         如果带上了，会发布到私服的snapshots下面，可以搜索进行查看,
         但是发布到Maven Central的新版本是不支持SNAPSHOT会被校验这个的，如果带来SNAPSHOT则推送失败，所以需要去掉version这个SNAPSHOT。 -->
    <version>1.0.1</version>
    <packaging>jar</packaging>
    <!--描述一定要有-->
    <description>GRGCRXProtocol</description>

    <!--项目访问url -->
    <url>https://github.com/gdtegex/GRGPayment</url>
    <scm>
        <!--项目访问url -->
        <url>https://github.com/gdtegex/GRGPayment</url>
        <!--项目访问url.git结尾 -->
        <connection>scm:git:https://github.com/gdtegex/GRGPayment.git</connection>
        <!--项目访问url.git结尾 -->
        <developerConnection>scm:git:https://github.com/gdtegex/GRGPayment.git</developerConnection>
    </scm>

    <developers>
        <developer>
            <id>gdtegex</id>
            <name>gdtegex</name>
            <email>gdtegex@163.com</email>
            <!--项目访问url -->
            <url>https://github.com/gdtegex/GRGPayment</url>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
</project>

