<?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>cn.aifei</groupId>
    <artifactId>aifei-enjoy</artifactId>
    <version>5.2.2</version>
    <packaging>jar</packaging>

    <name>aifei-enjoy</name>
    <description>Aifei Enjoy 模板引擎.</description>
    <url>https://gitee.com/jfinal/aifei-enjoy</url>

    <properties>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <issueManagement>
        <system>Git Issue</system>
        <url>https://gitee.com/jfinal/aifei-enjoy/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>aifei</id>
            <name>James</name>
            <email>zhanbocn@126.com</email>
            <url>https://gitee.com/jfinal/aifei-enjoy</url>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@gitee.com:jfinal/aifei-enjoy.git</connection>
        <developerConnection>scm:git:git@gitee.com:jfinal/aifei-enjoy.git</developerConnection>
        <url>git@gitee.com:jfinal/aifei-enjoy.git</url>
    </scm>

    <!-- id 与 maven 配置相关 id 保持一致
         https://central.sonatype.org/publish/publish-maven/#distribution-management-and-authentication
     -->
    <distributionManagement>
        <snapshotRepository>
            <id>aifei</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>aifei</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                    <compilerArgs>
                        <!-- java8 保留参数名编译参数 -->
                        <arg>-parameters</arg>
                        <!-- 输出详细信息 -->
                        <arg>-verbose</arg>
                        <!--<arg>-Xlint:all,-options,-path</arg>-->
                    </compilerArgs>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <!-- 解决 java8  发布到 maven 异常 -->
                    <additionalparam>-Xdoclint:none</additionalparam>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </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-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- 发布方式改为 Central Portal: https://central.sonatype.org/publish/publish-portal-maven/ -->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.7.0</version>
                <extensions>true</extensions>
                <configuration>
                    <!-- 对应 maven settings.xml 中的 server 配置 -->
                    <publishingServerId>aifei</publishingServerId>
                    <autoPublish>true</autoPublish>
                    <!-- <waitUntil>published</waitUntil> -->
                </configuration>
            </plugin>

        </plugins>
    </build>

</project>
