<?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.dqcer</groupId>
    <artifactId>mcdull</artifactId>
    <version>0.2.0</version>
    <name>mcdull</name>
    <packaging>pom</packaging>

    <description>mcdull</description>
    <url>https://gitee/dqcer/mcdull</url>

    <modules>
        <module>mcdull-bussiness</module>
        <module>mcdull-framework</module>
        <module>mcdull-support</module>
    </modules>

    <properties>
        <maven.compiler.target>17</maven.compiler.target>
        <maven.compiler.source>17</maven.compiler.source>
    </properties>

    <build>
        <!-- maven渲染配置文件 -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <!-- springboot打包(可以启动的子模块需显式引入) -->
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>3.2.4</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>repackage</goal>
                                <goal>build-info</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>17</source>
                    <source>17</source>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <!-- sonatype插件，发布使用-->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.7.0</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <!-- 生成源码包 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- 生成java doc文档 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.4.0</version>
<!--                <configuration>-->
<!--                    <show>private</show>-->
<!--                    <nohelp>true</nohelp>-->
<!--                    <charset>UTF-8</charset>-->
<!--                    <encoding>UTF-8</encoding>-->
<!--                    <docencoding>UTF-8</docencoding>-->
<!--                </configuration>-->
                <configuration>
                    <failOnError>false</failOnError>
                    <doclint>none</doclint>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
<!--                        <configuration>-->
<!--                            <additionalparam>-Xdoclint:none</additionalparam>-->
<!--                        </configuration>-->
                    </execution>
                </executions>
            </plugin>

            <!-- 工程文件自动签名-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
            </plugin>
        </plugins>
    </build>

<!--    <repositories>-->
<!--        <repository>-->
<!--            <id>central</id>-->
<!--            <url>https://maven.aliyun.com/repository/central</url>-->
<!--            <releases>-->
<!--                <enabled>true</enabled>-->
<!--            </releases>-->
<!--            <snapshots>-->
<!--                <enabled>true</enabled>-->
<!--            </snapshots>-->
<!--        </repository>-->
<!--    </repositories>-->

    <!--打包到sonatype的maven仓库中去-->
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <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>
        <url>https://gitee.com/dqcer/mcdull</url>
        <connection>https://gitee.com/dqcer/mcdull.git</connection>
        <developerConnection>scm:git:ssh://git@gitee.com:dqcer/mcdull.git</developerConnection>
    </scm>
    <developers>
        <developer>
            <name>dqcer</name>
            <email>dqcer@sina.com</email>
            <organization>https://gitee.com/dqcer</organization>
            <timezone>+8</timezone>
        </developer>
    </developers>
</project>