<?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.qinjie1314</groupId>
    <artifactId>common</artifactId>
<!--    <version>1.2-SNAPSHOT</version>-->
    <version>1.1-RELEASE</version>
    <!--mvn clean deploy -P release-->
    <name>Some common tools</name>
    <description>Some common tools</description>
    <url>no</url>
    <properties>
        <!--项目编译JDK版本-->
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <!--项目编码-->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!--插件版本-->
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
    </properties>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>
    <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>
        <url>https://gitee.com/qinjie1314/common</url>
        <connection>https://gitee.com/qinjie1314/common.git</connection>
        <developerConnection>https://gitee.com/qinjie1314/common</developerConnection>
    </scm>
    <!--写你自己的，这只是个例子-->
    <developers>
        <developer>
            <name>roger</name>
            <email>1768923041@qq.com</email>
            <url>https://gitee.com/qinjie1314/common</url>
        </developer>
    </developers>
    <dependencies>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.72</version>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-compat-spec-parser</artifactId>
            <version>1.0.35</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-core</artifactId>
            <version>3.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>5.3.8</version>
        </dependency>
    </dependencies>


    <build>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <target>${maven.compiler.target}</target>
                    <source>${maven.compiler.source}</source>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <skip>true</skip>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- 使用个人资料：由于生成javadoc和源jar以及使用GPG签署组件是一个相当耗时的过程，因此这些执行通常与正常的构建配置隔离并移动到配置文件中。然后，在通过激活配置文件执行部署时，将使用此配置文件。 -->
    <profiles>
        <profile>
            <id>ossrh</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- 要生成Javadoc和Source jar文件，您必须配置javadoc和源Maven插件 -->
                    <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>
                    <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>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <!--                        <extensions>true</extensions>-->
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <!-- 【注】snapshotRepository 与 repository 中的 id 一定要与 setting.xml 中 server 的 id 保持一致！ -->
            <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>
        </profile>
    </profiles>
<!--    <profiles>-->
        <!--release-->
<!--        <profile>-->
<!--            <id>release</id>-->
<!--            <build>-->
<!--                <plugins>-->
<!--                    <plugin>-->
<!--                        <groupId>org.apache.maven.plugins</groupId>-->
<!--                        <artifactId>maven-deploy-plugin</artifactId>-->
<!--                        <version>2.8.2</version>-->
<!--                        <configuration>-->
<!--                            <skip>true</skip>-->
<!--                        </configuration>-->
<!--                    </plugin>-->
<!--                    &lt;!&ndash; Source &ndash;&gt;-->
<!--                    <plugin>-->
<!--                        <groupId>org.apache.maven.plugins</groupId>-->
<!--                        <artifactId>maven-source-plugin</artifactId>-->
<!--                        <version>2.2.1</version>-->
<!--                        <executions>-->
<!--                            <execution>-->
<!--                                <id>attach-sources</id>-->
<!--                                <phase>package</phase>-->
<!--                                <goals>-->
<!--                                    <goal>jar-no-fork</goal>-->
<!--                                </goals>-->
<!--                            </execution>-->
<!--                        </executions>-->
<!--                    </plugin>-->
<!--                    &lt;!&ndash; Javadoc &ndash;&gt;-->
<!--                    <plugin>-->
<!--                        <groupId>org.apache.maven.plugins</groupId>-->
<!--                        <artifactId>maven-javadoc-plugin</artifactId>-->
<!--                        <version>2.9.1</version>-->
<!--                        <configuration>-->
<!--                            <show>package</show>-->
<!--                            <tags>-->
<!--                                <tag>-->
<!--                                    <name>date</name>-->
<!--                                </tag>-->
<!--                            </tags>-->
<!--                        </configuration>-->
<!--                        <executions>-->
<!--                            <execution>-->
<!--                                <id>attach-javadocs</id>-->
<!--                                <phase>package</phase>-->
<!--                                <goals>-->
<!--                                    <goal>jar</goal>-->
<!--                                </goals>-->
<!--                                <configuration>-->
<!--&lt;!&ndash;                                    <doclint>none</doclint>&ndash;&gt;-->
<!--                                </configuration>-->
<!--                            </execution>-->
<!--                        </executions>-->
<!--                    </plugin>-->
<!--                    &lt;!&ndash; Gpg Signature &ndash;&gt;-->
<!--                    <plugin>-->
<!--                        <groupId>org.apache.maven.plugins</groupId>-->
<!--                        <artifactId>maven-gpg-plugin</artifactId>-->
<!--                        <version>1.5</version>-->
<!--                        <executions>-->
<!--                            <execution>-->
<!--                                <id>ossrh</id>-->
<!--                                <phase>verify</phase>-->
<!--                                <goals>-->
<!--                                    <goal>sign</goal>-->
<!--                                </goals>-->
<!--                            </execution>-->
<!--                        </executions>-->
<!--                    </plugin>-->
<!--                    <plugin>-->
<!--                        <groupId>org.sonatype.plugins</groupId>-->
<!--                        <artifactId>nexus-staging-maven-plugin</artifactId>-->
<!--                        <version>1.6.7</version>-->
<!--&lt;!&ndash;                        <extensions>true</extensions>&ndash;&gt;-->
<!--                        <configuration>-->
<!--                            <serverId>sonatype-snapshots</serverId>-->
<!--                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>-->
<!--                            <autoReleaseAfterClose>false</autoReleaseAfterClose>-->
<!--                        </configuration>-->
<!--                    </plugin>-->
<!--                </plugins>-->
<!--            </build>-->
<!--            <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>-->
<!--        </profile>-->
<!--    </profiles>-->
</project>