<?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.github.vwenx</groupId>
    <artifactId>wen-plugin-parent</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <name>wen-plugin-parent</name>
    <description>许文的JAVA插件包父POM</description>
    <url>https://gitee.com/VwenX</url>


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


    <licenses>
        <license>
            <name>Mulan Permissive Software License，Version 2</name>
            <url>https://license.coscl.org.cn/MulanPSL2</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>XuWen</name>
            <email>VWenXu@aliyun.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git@gitee.com:VwenX/wen-plugin-for-java.git</connection>
        <developerConnection>scm:git@gitee.com:VwenX/wen-plugin-for-java.git</developerConnection>
        <url>https://gitee.com/VwenX/wen-plugin-for-java</url>
    </scm>


    <build>
        <plugins>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>false</autoReleaseAfterClose>
                    <autoDropAfterRelease>true</autoDropAfterRelease>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- 仅在发布正式版时才有必要执行部分步骤 -->
        <profile>
            <id>releaseVersion</id>
            <build>
                <plugins>
                    <!-- 生成源码包 -->
                    <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>
                    <!-- 生成javadoc文档 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- GPG签名 -->
                    <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>
                </plugins>
            </build>
        </profile>
    </profiles>


    <!-- 快照版发到sonatype快照仓库 正式版由插件发到sonatype存储库 -->
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
    <!-- 快照版依赖使用sonatype快照仓库 -->
    <repositories>
        <repository>
            <id>ossrh-snapshots</id>
            <name>ossrh快照仓库</name>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>


</project>