<?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">
    <parent>
        <artifactId>stone-rpc-all</artifactId>
        <groupId>com.gitee.kamismile</groupId>
        <version>1.3.3</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>stone-rpc</artifactId>
    <packaging>pom</packaging>
    <modules>
        <module>stone-rpc-api</module>
        <module>stone-rpc-grpc</module>
    </modules>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                 <version>1.6.13</version>
                <extensions>true</extensions>
                <configuration>
                    <!-- 这里的id必须要和全局配置中的release id 一致 -->
                    <serverId>sonatype_releases</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <!-- 如果希望发布后自动执行close和release操作，此处可以调整为true -->
                    <autoReleaseAfterClose>false</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <!-- 生成java source.jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>

                <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>
                <configuration>
                    <show>private</show>
                    <nohelp>true</nohelp>
                    <charset>UTF-8</charset>
                    <encoding>UTF-8</encoding>
                    <docencoding>UTF-8</docencoding>
                    <!-- TODO 临时解决不规范的javadoc生成报错,后面要规范化后把这行去掉 -->
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- 生成asc 校验文件 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                 <version>3.1.0</version>
                <executions>
                    <execution>
                        <!-- 必须和配置中的gpg校验id一致 -->
                        <id>gpg</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--            <plugin>-->
            <!--                <groupId>org.apache.maven.plugins</groupId>-->
            <!--                <artifactId>maven-resources-plugin</artifactId>-->
            <!--                <version>3.1.0</version>-->
            <!--                <executions>-->
            <!--                    <execution>-->
            <!--                        <id>copy-and-filter-allatori-config</id>-->
            <!--                        <phase>package</phase>-->
            <!--                        <goals>-->
            <!--                            <goal>copy-resources</goal>-->
            <!--                        </goals>-->
            <!--                        <configuration>-->
            <!--                            <outputDirectory>${basedir}/target</outputDirectory>-->
            <!--                            <resources>-->
            <!--                                <resource>-->
            <!--                                    <directory>${basedir}/allatori</directory>-->
            <!--                                    <includes>-->
            <!--                                        <include>allatori.xml</include>-->
            <!--                                    </includes>-->
            <!--                                    <filtering>true</filtering>-->
            <!--                                </resource>-->
            <!--                            </resources>-->
            <!--                        </configuration>-->
            <!--                    </execution>-->
            <!--                </executions>-->
            <!--            </plugin>-->

            <!--            &lt;!&ndash; Running Allatori &ndash;&gt;-->
            <!--            <plugin>-->
            <!--                <groupId>org.codehaus.mojo</groupId>-->
            <!--                <artifactId>exec-maven-plugin</artifactId>-->
            <!--                <version>1.6.0</version>-->
            <!--                <executions>-->
            <!--                    <execution>-->
            <!--                        <id>run-allatori</id>-->
            <!--                        <phase>package</phase>-->
            <!--                        <goals>-->
            <!--                            <goal>exec</goal>-->
            <!--                        </goals>-->
            <!--                    </execution>-->
            <!--                </executions>-->
            <!--                <configuration>-->
            <!--                    <executable>java</executable>-->
            <!--                    <arguments>-->
            <!--                        <argument>-Xms128m</argument>-->
            <!--                        <argument>-Xmx512m</argument>-->
            <!--                        <argument>-jar</argument>-->

            <!--                        &lt;!&ndash; Copy allatori.jar to 'allatori' directory to use the commented line &ndash;&gt;-->
            <!--                        <argument>d:/tool/lib/allatori.jar</argument>-->
            <!--                        &lt;!&ndash; <argument>${basedir}/allatori/allatori.jar</argument> &ndash;&gt;-->

            <!--                        <argument>${basedir}/target/allatori.xml</argument>-->
            <!--                    </arguments>-->
            <!--                </configuration>-->
            <!--            </plugin>-->
        </plugins>
    </build>

    <!-- 开源签名证书 -->
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <!-- 仓库信息 -->
    <scm>
        <connection>scm:git:git@gitee.com:kamismile/stone-rpc-all.git</connection>
        <developerConnection>scm:git:git@gitee.com:kamismile/stone-rpc-all.git</developerConnection>
        <url>http://gitee.com/kamismile/stone-rpc-all/tree/master</url>
    </scm>


    <!-- 开发人员信息 -->
    <developers>
        <developer>
            <name>kamismile</name>
            <email>kamismile@qq.com</email>
            <organization>https://gitee.com/kamismile</organization>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <!-- 发布管理信息 -->
    <distributionManagement>
        <repository>
            <!-- 这里的id必须要和全局配置中的release id 一致 -->
            <id>sonatype_releases</id>
            <name>Nexus Release Repository</name>
            <!-- 这里就是在创建issue成功后，对方回复的release发布地址-->
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <!-- 这里的id必须要和全局配置中的snapshot id 一致 -->
            <id>sonatype_snapshots</id>
            <name>Nexus Snapshot Repository</name>
            <!-- 这里就是在创建issue成功后，对方回复的snapshot发布地址-->
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
</project>