<?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>com.admin4j</groupId>
    <artifactId>admin4j-parent</artifactId>
    <version>0.5.0</version>
    <description>用于业务框架的父工程</description>
    <packaging>pom</packaging>
    <name>admin4j-parent</name>
    <url>https://github.com/admin4j/admin4j-framework</url>
    <properties>
        <admin4j-dependencies.version>0.5.0</admin4j-dependencies.version>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.admin4j</groupId>
                <artifactId>admin4j-dependencies</artifactId>
                <version>${admin4j-dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.7.12</version>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.1</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- 开源签名证书 -->
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <!-- 仓库信息 -->
    <scm>
        <connection>scm:git@github.com:admin4j/admin4j-framework</connection>
        <developerConnection>scm:git@github.com:admin4j/admin4j-framework</developerConnection>
        <url>https://github.com/admin4j/admin4j-framework</url>
    </scm>
    <!-- 开发人员信息 -->
    <developers>
        <developer>
            <name>admin4j</name>
            <email>1218853253@qq.com</email>
            <organization>https://github.com/admin4j</organization>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <distributionManagement>
        <repository>
            <id>${repository.releases.id}</id>
            <name>nexus-releases</name>
            <url>${repository.releases.url}</url>
        </repository>
        <snapshotRepository>
            <id>${repository.releases.id}</id>
            <name>nexus-snapshot</name>
            <url>${repository.snapshots.url}</url>
        </snapshotRepository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>ossrh</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <repository.releases.id>ossrh</repository.releases.id>
                <repository.releases.url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
                </repository.releases.url>
                <repository.snapshots.url>https://s01.oss.sonatype.org/content/repositories/snapshots
                </repository.snapshots.url>
            </properties>
            <build>
                <plugins>
                    <!-- 生成java source.jar -->
                    <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>
                            <show>private</show>
                            <nohelp>true</nohelp>
                            <charset>UTF-8</charset>
                            <encoding>UTF-8</encoding>
                            <docencoding>UTF-8</docencoding>
                            <!-- TODO 临时解决不规范的javadoc生成报错,后面要规范化后把这行去掉 -->
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <version>2.7.12</version>
                        <configuration>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                                <exclude>
                                    <groupId>org.springframework.boot</groupId>
                                    <artifactId>spring-boot-autoconfigure-processor</artifactId>
                                </exclude>
                                <exclude>
                                    <groupId>org.springframework.boot</groupId>
                                    <artifactId>spring-boot-autoconfigure</artifactId>
                                </exclude>
                                <exclude>
                                    <groupId>org.springframework.boot</groupId>
                                    <artifactId>spring-boot-configuration-processor</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoDropAfterRelease>true</autoDropAfterRelease>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>