<?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>

    <!--  祖宗 独有的信息： 为什么要引入这个依赖呢？我懒不想去维护管理这写版本，就叫我祖宗管理了！在儿子的儿子可以直接导包使用。   -->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.6</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <!--  我是爸爸 独有的信息   -->
    <groupId>io.gitee.ground-gun</groupId>
    <artifactId>wutunan-java-jar</artifactId>
    <version>1.0.4</version>
    <name>wutunan-java-jar</name>
    <!--描述一定要有-->
    <description>say hello world!</description>
    <packaging>pom</packaging>
    <!--  子模块的名字  -->
    <modules>
<!--        <module>helloword</module>-->
        <module>tunan-web-lib</module>
    </modules>
    <!--    项目的属性 -->
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
        <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
        <java.version>1.8</java.version>
        <serverId>central</serverId><!-- 服务id 也就是setting.xml中的servers.server.id -->


        <!-- 相关jar包的依赖 -->


        <lombok.version>1.18.30</lombok.version>
    </properties>


    <!--项目访问url -->
    <url>https://gitee.com/ground-gun/wutunan-java-jar</url>
    <scm>
        <!--项目访问url -->
        <url>https://gitee.com/ground-gun/wutunan-java-jar</url>
        <!--项目访问url.git结尾 -->
        <connection>scm:git:https://gitee.com/ground-gun/wutunan-java-jar.git</connection>
        <!--项目访问url.git结尾 -->
        <developerConnection>scm:git:https://gitee.com/ground-gun/wutunan-java-jar.git</developerConnection>
    </scm>
    <developers>
        <developer>
            <name>wutunan</name>
            <id>wutunan</id>
            <email>19970694323@163.com</email>
            <!-- 项目访问url -->
            <url>https://gitee.com/ground-gun/wutunan-java-jar</url>
            <!-- 角色 -->
            <roles>
                <role>Developer</role>
            </roles>
            <!-- 时区 -->
            <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>

    <!--管理仓库信息-->
    <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>

    <!--   打包工具  -->
    <build>
        <finalName>wutunan-java-jar</finalName>
        <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插件，用于生成Javadoc文档-->
            <!-- Javadoc    start  -->
            <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   end -->


            <!-- Gpg Signature GPG签名插件 -->
            <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>

            <!--新账号的配置：将组件部署到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>


</project>