<?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>com.gettyio</groupId>
    <artifactId>getty</artifactId>
    <packaging>pom</packaging>
    <version>1.4.9</version>
    <modules>
        <module>getty-core</module>
        <module>getty-example</module>
        <module>getty-expansion</module>
    </modules>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.7</java.version>

        <getty.version>${version}</getty.version>
        <slf4j.version>1.7.25</slf4j.version>
        <assertj-core.version>2.0.0</assertj-core.version>
        <junit.version>4.10</junit.version>

    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.gettyio</groupId>
                <artifactId>getty-core</artifactId>
                <version>${getty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>2.11.1</version>
                <optional>true</optional>
            </dependency>


            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj-core.version}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>


        </dependencies>
    </dependencyManagement>

    <name>getty</name>
    <url>https://github.com/gogym/getty</url>
    <description>一个完全基于java 实现的，长得有点像netty的aio网络框架</description>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/gogym/getty.git</connection>
        <developerConnection>scm:git:ssh://github.com:gogym/getty.git</developerConnection>
        <url>https://github.com/gogym/getty/tree/master</url>
    </scm>

    <developers>
        <developer>
            <name>gogym</name>
            <email>189155278@qq.com</email>
            <url>https://github.com/gogym/getty</url>
        </developer>
    </developers>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>7</source>
                    <target>7</target>
                </configuration>
            </plugin>
            <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>
        </plugins>
    </build>


    <!-- 使用个人资料：由于生成javadoc和源jar以及使用GPG签署组件是一个相当耗时的过程，因此这些执行通常与正常的构建配置隔离并移动到配置文件中。然后，在通过激活配置文件执行部署时，将使用此配置文件。 -->
    <profiles>
        <profile>
            <id>ossrh</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <!-- 一键更新子模块版本号 -->
                        <!-- mvn versions:set -DnewVersion=1.2.0-SNAPSHOT -->
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>versions-maven-plugin</artifactId>
                            <version>2.7</version>
                            <configuration>
                                <generateBackupPoms>false</generateBackupPoms>
                            </configuration>
                        </plugin>
                        <!-- 要生成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>
                                    <configuration>
                                        <additionalparam>-Xdoclint:none</additionalparam>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <!--  必须配置GPG插件用于使用以下配置对组件进行签名 -->
                        <!-- mvn clean deploy -projects getty-core,getty-expansion -am -P ossrh -->
                        <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>
                </pluginManagement>
            </build>
            <!-- 【注】snapshotRepository 与 repository 中的 id 一定要与 setting.xml 中 server 的 id 保持一致！ -->
            <distributionManagement>


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

                <!--<repository>-->
                    <!--<id>nexus</id>-->
                    <!--<url>http://47.112.166.17:8081/repository/maven-releases/</url>-->
                <!--</repository>-->
                <!--<snapshotRepository>-->
                    <!--<id>nexus</id>-->
                    <!--<url>http://47.112.166.17:8081/repository/maven-snapshots/</url>-->
                <!--</snapshotRepository>-->

            </distributionManagement>
        </profile>
    </profiles>

</project>
