<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>cn.songxinqiang</groupId>
    <artifactId>oss-parent</artifactId>
    <version>1.6</version>
    <packaging>pom</packaging>

    <name>OSSParent</name>
    <description>
        This is the common settings for maven projects to publish to Maven Central Repository,
        artifacts extend from this one can publish to the repo without any setting.
    </description>
    <url>https://git.oschina.net/songxinqiang/OSSParent</url>

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

    <developers>
        <developer>
            <name>阿信sxq</name>
            <email>songxinqiang@vip.qq.com</email>
            <url>http://my.oschina.net/songxinqiang/</url>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@git.oschina.net:songxinqiang/OSSParent.git</connection>
        <developerConnection>scm:git:git@git.oschina.net:songxinqiang/OSSParent.git</developerConnection>
        <url>https://git.oschina.net/songxinqiang/OSSParent</url>
    </scm>

    <properties>
        <version.java>1.8</version.java>
        <version.javadoc>8</version.javadoc>

        <version.compiler-plugin>3.5.1</version.compiler-plugin>
        <version.war-plugin>2.6</version.war-plugin>
        <version.clean-plugin>3.0.0</version.clean-plugin>
        <version.resources-plugin>2.7</version.resources-plugin>
        <version.surefire-plugin>2.19.1</version.surefire-plugin>
        <version.jar-plugin>2.6</version.jar-plugin>
        <version.source-plugin>3.0.0</version.source-plugin>
        <version.javadoc-plugin>2.10.3</version.javadoc-plugin>
        <version.gpg-plugin>1.6</version.gpg-plugin>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${version.compiler-plugin}</version>
                <configuration>
                    <source>${version.java}</source>
                    <target>${version.java}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${version.jar-plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${version.war-plugin}</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>${version.clean-plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${version.resources-plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${version.surefire-plugin}</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${version.source-plugin}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <attach>true</attach>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${version.javadoc-plugin}</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <links>
                                <link>http://docs.oracle.com/javase/${version.javadoc}/docs/api</link>
                            </links>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${version.gpg-plugin}</version>
                        <executions>
                            <execution>
                                <phase>install</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <repository>
                    <id>oss</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>release197</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${version.source-plugin}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <attach>true</attach>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <repository>
                    <id>nexus-197</id>
                    <url>http://192.168.1.197:8081/content/repositories/releases</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>snapshot197</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${version.source-plugin}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <attach>true</attach>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <repository>
                    <id>nexus-197</id>
                    <url>http://192.168.1.197:8081/content/repositories/snapshots/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>

</project>