<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.jacarrichan</groupId>
    <artifactId>oss-parent</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <name>OSSParent</name>
    <description>
        maven项目的基本设置，打包的参数，发布到中央仓库的必要设置,项目继承之后不需要单独重复的配置.
    </description>
    <url>https://github.com/jacarrichan/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>JacarriChan</name>
            <email>jacarrichan@qq.com</email>
            <url>https://github.com/jacarrichan</url>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:jacarrichan/OSSParent.git</connection>
        <developerConnection>scm:git:git@github.com:jacarrichan/OSSParent.git</developerConnection>
        <url>https://github.com/jacarrichan</url>
    </scm>

    <properties>
        <java.version>1.7</java.version>
        <javadoc.version>7</javadoc.version>

        <compiler-plugin.version>3.7.0</compiler-plugin.version>
        <war-plugin.version>3.2.0</war-plugin.version>
        <source-plugin.version>3.0.1</source-plugin.version>
        <javadoc-plugin.version>3.0.0</javadoc-plugin.version>
        <gpg-plugin.version>1.6</gpg-plugin.version>

        <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>${compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${war-plugin.version}</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${source-plugin.version}</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>${javadoc-plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <links>
                                <link>https://docs.oracle.com/javase/${javadoc.version}/docs/api</link>
                            </links>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>install</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <repository>
                    <id>oss</id>
                    <name>release</name>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
                <snapshotRepository>
                    <id>oss</id>
                    <name>snapshots</name>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>                
            </distributionManagement>
        </profile>
    </profiles>

</project>