<?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>
    <packaging>pom</packaging>
    <modules>
        <module>class-winter-core</module>
        <module>class-winter-maven-plugin</module>
    </modules>
    <groupId>com.idea-aedi</groupId>
    <artifactId>class-winter</artifactId>
    <version>2.6.5</version>

    <!-- 配置项目的基础信息 -->
    <name>class-winter</name>
    <url>https://gitee.com/JustryDeng/class-winter</url>
    <description>Obfuscate encryption .class file</description>


    <properties>
        <java.version>1.8</java.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <!--licenses信息-->
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <!--scm信息-->
    <scm>
        <url>https://gitee.com/JustryDeng/class-winter</url>
        <connection>https://gitee.com/JustryDeng/class-winter.git</connection>
    </scm>

    <!--开发者信息-->
    <developers>
        <developer>
            <name>JustryDeng</name>
            <email>13548417409@163.com</email>
        </developer>
    </developers>

    <distributionManagement>
        <!-- 要发布到的snapshot仓库 -->
        <snapshotRepository>
            <!-- 通过此id定位maven配置文件settings.xml中配置的用户名密码，以登录指定的url -->
            <id>ossrh</id>
            <!--
                特别注意: 其中地址s01.oss.sonatype.org是你在jira中提issue后，审核员告诉你的，
                对应部分原文是:
                com.idea-aedi has been prepared, now user(s) JustryDeng can:
                Publish snapshot and release artifacts to s01.oss.sonatype.org
                Have a look at this section of our official guide for deployment instructions:
                https://central.sonatype.org/publish/publish-guide/#deployment

                Please comment on this ticket when you've released your first component(s), so we can activate the sync to Maven Central.
                Depending on your build configuration, this might happen automatically. If not, you can follow the steps in this section of our guide:
                https://central.sonatype.org/publish/release/
                可知，这个地址要根据它给的指引来填
             -->
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <!-- 要发布到的仓库 -->
        <repository>
            <!-- 通过此id定位maven配置文件settings.xml中配置的用户名密码，以登录指定的url -->
            <id>ossrh</id>
            <!--
                特别注意: 其中地址s01.oss.sonatype.org是你在jira中提issue后，审核员告诉你的，
                对应部分原文是:
                com.idea-aedi has been prepared, now user(s) JustryDeng can:
                Publish snapshot and release artifacts to s01.oss.sonatype.org
                Have a look at this section of our official guide for deployment instructions:
                https://central.sonatype.org/publish/publish-guide/#deployment

                Please comment on this ticket when you've released your first component(s), so we can activate the sync to Maven Central.
                Depending on your build configuration, this might happen automatically. If not, you can follow the steps in this section of our guide:
                https://central.sonatype.org/publish/release/
                可知，这个地址要根据它给的指引来填
             -->
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <plugins>
            <!-- 打包源码 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- 打包javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <!-- 解决(因javadoc写得不规范导致的)报错 -->
                    <additionalOptions>
                        <additionalOption>-Xdoclint:none</additionalOption>
                    </additionalOptions>
                    <!--
                    解决乱码:
                       在IDEA中，打开File | Settings | Build, Execution, Deployment | Build Tools | Maven | Runner
                       在VM Options中添加-Dfile.encoding=GBK，切记一定是GBK。即使用UTF-8的话，依然是乱码，这是因为Maven的
                       默认平台编码是GBK（通过mvn -version可看见）。
                     -->
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- nexus流程处理插件 实现自动（deploy、release...）发布等 -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <!-- 通过此id定位maven配置文件settings.xml中配置的用户名密码，以登录指定的url -->
                    <serverId>ossrh</serverId>
                    <!--
                        特别注意: 其中地址s01.oss.sonatype.org是你在jira中提issue后，审核员告诉你的，
                        对应部分原文是:
                        com.idea-aedi has been prepared, now user(s) JustryDeng can:
                        Publish snapshot and release artifacts to s01.oss.sonatype.org
                        Have a look at this section of our official guide for deployment instructions:
                        https://central.sonatype.org/publish/publish-guide/#deployment

                        Please comment on this ticket when you've released your first component(s), so we can activate the sync to Maven Central.
                        Depending on your build configuration, this might happen automatically. If not, you can follow the steps in this section of our guide:
                        https://central.sonatype.org/publish/release/
                        可知，这个地址要根据它给的指引来填
                     -->
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <!-- 发布到release仓库的部署插件 -->
            <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>

            <!-- gpg签名认证 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <!--
                            注: 如果不主动指定gpg.exe的话，那么可能(因为和idea内部发生了未知冲突)报错
                            Cannot run program "gpg.exe": CreateProcess error=2, 系统找不到指定的文件。
                            注: 当然，如果你直接用的git bash之类的工具执行mvn，而不是用idea提供的maven功能
                                的话，你也可以不指定executable。
                         -->
                        <configuration>
                            <executable>C:/Program Files (x86)/GnuPG/bin/gpg.exe</executable>
                            <!--
                                指定GPG 代表公钥的密钥id
                                注:因为我们可能拥有多个GPG密钥对，所以我们需要指定使用哪一个
                            -->
                            <passphrase>F4A9FB7A887DCB32F185DBEF3D8B00493FAFC7F9</passphrase>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
