<?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>xyz.lglg</groupId>
    <artifactId>java-maven-package</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>

    <name>jay test maven package publish</name>
    <description>jay test maven package publish</description>
    <url>https://lijianguo1211.github.io/java-maven-package</url>

    <repositories>
        <repository>
            <id>aliyun</id>
            <name>aliyun</name>
            <url>https://maven.aliyun.com/repository/public</url>
        </repository>
    </repositories>

<!--    遵守的开源协议-->
    <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>
<!--    作者信息-->
    <developers>
        <developer>
            <name>jay.li</name>
            <email>153985330@qq.com</email>
            <organization>lglg xyz</organization>
            <organizationUrl>https://www.lglg.xyz/</organizationUrl>
        </developer>
    </developers>
<!--    项目信息-->
    <scm>
        <connection>scm:git@github.com:lijianguo1211/java-maven-package.git</connection>
        <developerConnection>scm:ggit@github.com:lijianguo1211/java-maven-package.git</developerConnection>
        <url>https://github.com/lijianguo1211/java-maven-package</url>
    </scm>

    <distributionManagement>
<!--        上传到github打开-->
<!--        <repository>-->
<!--            <id>local-repo-release</id>-->
<!--            <name>GitHub Release</name>-->
<!--            <url>file://${project.basedir}/maven-repo</url>-->
<!--        </repository>-->

        <snapshotRepository>
            <id>sonatype</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

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

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.alibaba.fastjson2</groupId>
            <artifactId>fastjson2</artifactId>
            <version>2.0.19</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.0</version>
                        <configuration>
                            <encoding>UTF-8</encoding>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.18.1</version>
                        <configuration>
                            <skipTests>true</skipTests>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <configuration>
                            <attach>true</attach>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.4.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!--Release -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                    </plugin>
                    <!--                     GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${gpg.rename}</keyname>
                                    <passphraseServerId>${gpg.rename}</passphraseServerId>
                                </configuration>
                            </execution>
                        </executions>
                    </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>
                                                <autoReleaseAfterClose>true</autoReleaseAfterClose>
                                            </configuration>
                                        </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>




</project>