<?xml version="1.0" encoding="UTF8"?>
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.e-hoffman.maven</groupId>
    <artifactId>MavenBase</artifactId>
    <version>1.0.2</version>
    <packaging>pom</packaging>
    <name>${project.artifactId}</name>
    <description>A set of poms to provide a base to create a parent pom, OpenSourceParent which can be used as the parent of other git repos.</description>
    <modules>
        <module>StaticAnalysisConfiguration</module>
        <module>OpenSourceParent</module>
    </modules>
    <properties>
        <github.global.server>github</github.global.server>
        <github.owner>rexhoffman</github.owner>
        <github.project>MavenBase</github.project>
        <github.site.location>${project.version}/</github.site.location>
        <!-- https://github.com/mycila/license-maven-plugin/tree/master/license-maven-plugin/src/main/resources/com/mycila/maven/plugin/license/templates -->
        <license>MIT</license>
        <plugin.maven.clean.version>3.0.0</plugin.maven.clean.version>
        <plugin.maven.github.site.version>0.12</plugin.maven.github.site.version>
        <plugin.maven.gpg.version>1.6</plugin.maven.gpg.version>
        <plugin.maven.javadoc.version>2.10.4</plugin.maven.javadoc.version>
        <plugin.maven.nexus.staging.plugin.version>1.6.7</plugin.maven.nexus.staging.plugin.version>
        <plugin.maven.projectinforeports.version>2.9</plugin.maven.projectinforeports.version>
        <plugin.maven.site.version>3.5.1</plugin.maven.site.version>
        <plugin.maven.sources.version>3.0.1</plugin.maven.sources.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.ossnexus.autorelease>true</project.ossnexus.autorelease>
    </properties>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.google.code.sortpom</groupId>
                    <artifactId>maven-sortpom-plugin</artifactId>
                    <version>2.3.0</version>
                    <configuration>
                        <sortOrderFile>com/shankyank/pom_sort_order.xml</sortOrderFile>
                        <lineSeparator>\n</lineSeparator>
                        <encoding>UTF8</encoding>
                        <sortProperties>true</sortProperties>
                        <keepBlankLines>true</keepBlankLines>
                        <sortDependencies>scope,groupId,artifactId</sortDependencies>
                        <sortPlugins>groupId,artifactId</sortPlugins>
                        <nrOfIndentSpace>4</nrOfIndentSpace>
                        <createBackupFile>false</createBackupFile>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.shankyank</groupId>
                            <artifactId>sortpom-config</artifactId>
                            <version>1.0</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>verify</goal>
                            </goals>
                            <phase>verify</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${plugin.maven.clean.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${plugin.maven.gpg.version}</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                            <phase>verify</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <!-- deploy artifacts if and only if all projects in a reactor build succeed. -->
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${plugin.maven.nexus.staging.plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <serverId>sonatype-nexus-staging</serverId>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.google.code.sortpom</groupId>
                <artifactId>maven-sortpom-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${plugin.maven.site.version}</version>
                <executions>
                    <execution>
                        <id>attach-site-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                            <goal>jar</goal>
                        </goals>
                        <inherited>false</inherited>
                        <configuration>
                            <attach>true</attach>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${plugin.maven.projectinforeports.version}</version>
            </plugin>
        </plugins>
    </reporting>
    <profiles>
        <!-- not all builders will have credentials, hence disable by default -->
        <profile>
            <id>sign-for-oss-nexus</id>
            <activation>
                <property>
                    <name>gpg.passphrase</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${plugin.maven.javadoc.version}</version>
                        <!-- oss nexus demands javadoc jars -->
                        <configuration>
                            <quiet>true</quiet>
                            <show>package</show>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                    <goal>test-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${plugin.maven.sources.version}</version>
                        <configuration>
                           <skipSource>true</skipSource>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>site-deploy</id>
            <activation>
                <property>
                    <name>deploysite</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.github</groupId>
                        <artifactId>site-maven-plugin</artifactId>
                        <version>${plugin.maven.github.site.version}</version>
                        <configuration>
                            <path>${github.site.location}</path>
                            <merge>true</merge>
                            <message>Updating maven generated documentation for ${project.version}</message>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                                <phase>site</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <url>http://rexhoffman.github.io/MavenParent/index.html</url>
    <inceptionYear>2015</inceptionYear>
    <organization>
        <name>Rex Hoffman</name>
        <url>http://www.e-hoffman.org</url>
    </organization>
    <licenses>
        <license>
            <name>${license}</name>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>rexhoffman</id>
            <email>rex@e-hoffman.org</email>
            <timezone>-8</timezone>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git:github.com:${github.owner}/${github.project}.git</connection>
        <developerConnection>scm:git:git:github.com:${github.owner}/${github.project}.git</developerConnection>
        <url>https://github.com/${github.owner}/${github.project}/blob/master/</url>
    </scm>
    <issueManagement>
        <system>Github Issues</system>
        <url>https://www.github.com/${github.owner}/${github.project}/issues</url>
    </issueManagement>
    <distributionManagement>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
</project>
