<?xml version="1.0"?>
<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.thelastcheck</groupId>
    <artifactId>tlc-open-parent</artifactId>
    <version>5</version>
    <packaging>pom</packaging>
    <name>tlc-open-parent</name>
    <description>
        The parent pom for all Last Check projects. This contains
        the standard set of maven plugin versions used. It also
        contains a number of profiles used to set various options
        used when building and deploying the system.
    </description>
    <url>http://thelastcheck.github.io/tlc.open.java</url>
    <organization>
        <name>The Last Check, LLC</name>
        <url>http://thelastcheck.github.io/tlc.open.java</url>
    </organization>
    <inceptionYear>2009</inceptionYear>
    <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>
    <developers>
        <developer>
            <name>Jerry Bowman</name>
            <email>jerry@thelastcheck.com</email>
            <organization>The Last Check, LLC</organization>
            <organizationUrl>http://thelastcheck.github.io/tlc.open.java</organizationUrl>
        </developer>
    </developers>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/TheLastCheck/tlc.open.java/issues</url>
    </issueManagement>
    <scm>
        <connection>scm:git:https://github.com/TheLastCheck/tlc.open.java.git</connection>
        <developerConnection>scm:git:https://github.com/TheLastCheck/tlc.open.java.git</developerConnection>
        <url>https://github.com/TheLastCheck/tlc.open.java.git</url>
    </scm>
    <modules>
        <module>tlc-commons-project</module>
    </modules>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <git-commit-id-plugin-version>2.1.7</git-commit-id-plugin-version>
        <properties-plugin>1.0-alpha-2</properties-plugin>
        <groovy-all-version>2.4.3</groovy-all-version>
        <!--groovy-eclipse-batch needs to match groovy-all-->
        <groovy-eclipse-batch-version>2.4.3-01</groovy-eclipse-batch-version>
        <groovy-eclipse-compiler-version>2.9.2-01</groovy-eclipse-compiler-version>
        <buildnumber-maven-version>1.2</buildnumber-maven-version>
        <exec-maven-version>1.2.1</exec-maven-version>
        <findbugs-maven-version>2.5.3</findbugs-maven-version>
        <jdk-version>1.8</jdk-version>
        <latex-maven-version>1.1</latex-maven-version>
        <maven-antrun-version>1.7</maven-antrun-version>
        <maven-assembly-version>2.5.2</maven-assembly-version>
        <maven-bundle-version>2.4.0</maven-bundle-version>
        <maven-clean-version>2.5</maven-clean-version>
        <maven-compiler-version>3.1</maven-compiler-version>
        <maven-dependency-version>2.8</maven-dependency-version>
        <maven-deploy-version>2.8.1</maven-deploy-version>
        <maven-enforcer-version>1.3</maven-enforcer-version>
        <maven-failsafe-version>2.17</maven-failsafe-version>
        <maven-gpg-version>1.6</maven-gpg-version>
        <maven-install-version>2.5.1</maven-install-version>
        <maven-jar-version>2.4</maven-jar-version>
        <maven-javadoc-version>2.9.1</maven-javadoc-version>
        <!--<maven-javadoc-version>2.10.4</maven-javadoc-version>-->
        <maven-jxr-version>2.4</maven-jxr-version>
        <maven-pmd-version>3.1</maven-pmd-version>
        <maven-project-info-reports-version>2.7</maven-project-info-reports-version>
        <maven-release-version>2.5.2</maven-release-version>
        <maven-resources-version>2.6</maven-resources-version>
        <maven-site-version>3.3</maven-site-version>
        <maven-source-version>2.2.1</maven-source-version>
        <maven-surefire-version>2.17</maven-surefire-version>
        <maven-war-version>2.4</maven-war-version>
        <versions-maven-version>2.1</versions-maven-version>
        <sonar-maven-version>2.5</sonar-maven-version>
        <nexus-staging-version>1.6.5</nexus-staging-version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <git-commit-id-version>4.0.0</git-commit-id-version>
        <git.commit.id.abbrev>TBD</git.commit.id.abbrev>
        <git.build.time>TBD</git.build.time>
        <git.branch>TBD</git.branch>
        <git.revision>TBD</git.revision>
        <properties-maven-version>1.0.0</properties-maven-version>
    </properties>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>${buildnumber-maven-version}</version>
                    <executions>
                        <execution>
                            <phase>validate</phase>
                            <goals>
                                <goal>create</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <doCheck>false</doCheck>
                        <doUpdate>false</doUpdate>
                        <scmDirectory>${basedir}</scmDirectory>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${maven-bundle-version}</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${maven-antrun-version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven-assembly-version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven-clean-version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-version}</version>
                    <configuration>
                        <source>${jdk-version}</source>
                        <target>${jdk-version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven-dependency-version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-version}</version>
                </plugin>
                <plugin>
                    <inherited>true</inherited>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-version}</version>
                    <executions>
                        <execution>
                            <id>enforce-maven-3</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>[3.0.5,)</version>
                                    </requireMavenVersion>
                                    <requireJavaVersion>
                                        <version>[1.8,)</version>
                                    </requireJavaVersion>
                                </rules>
                                <fail>true</fail>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${maven-failsafe-version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.surefire</groupId>
                            <artifactId>surefire-junit47</artifactId>
                            <version>${maven-surefire-version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <goals>
                                <goal>integration-test</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>verify</id>
                            <goals>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install-version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${maven-project-info-reports-version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-version}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestSections>
                                <manifestSection>
                                    <name>Build-Information</name>
                                    <manifestEntries>
                                        <Official-Name>${project.name}</Official-Name>
                                        <Version>${project.version}</Version>
                                        <Revision>${git.revision}</Revision>
                                        <Build-Time>${git.build.time}</Build-Time>
                                        <ScmLocation>${git.branch}</ScmLocation>
                                    </manifestEntries>
                                </manifestSection>
                            </manifestSections>
                        </archive>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default-jar</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                                <!-- <goal>test-jar</goal> -->
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>${maven-jxr-version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${maven-pmd-version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven-release-version}</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <useReleaseProfile>false</useReleaseProfile>
                        <releaseProfiles>release</releaseProfiles>
                        <goals>deploy nexus-staging:release</goals>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-version}</version>
                    <executions>
                        <execution>
                            <id>default-resources</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>resources</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-testResources</id>
                            <phase>process-test-resources</phase>
                            <goals>
                                <goal>testResources</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <overwrite>true</overwrite>
                        <includeEmptyDirs>true</includeEmptyDirs>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven-site-version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-report-plugin</artifactId>
                    <version>${maven-surefire-version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.surefire</groupId>
                            <artifactId>surefire-junit47</artifactId>
                            <version>${maven-surefire-version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <skipTests>false</skipTests>
                        <testFailureIgnore>false</testFailureIgnore>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${maven-war-version}</version>
                    <configuration>
                        <archive>
                            <manifestSections>
                                <manifestSection>
                                    <name>Build-Information</name>
                                    <manifestEntries>
                                        <Official-Name>${project.name}</Official-Name>
                                        <Version>${project.version}</Version>
                                        <Revision>${git.revision}</Revision>
                                        <Build-Time>${git.build.time}</Build-Time>
                                        <ScmLocation>${git.branch}</ScmLocation>
                                    </manifestEntries>
                                </manifestSection>
                            </manifestSections>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${versions-maven-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>${findbugs-maven-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>${sonar-maven-version}</version>
                </plugin>
                <plugin>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <version>${git-commit-id-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>properties-maven-plugin</artifactId>
                    <version>${properties-maven-version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <executable>/usr/bin/gpg</executable>
                                    <keyname>${gpg.keyname}</keyname>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <!-- <phase>verify</phase> -->
                                <goals>
                                    <goal>jar-no-fork</goal>
                                    <!-- <goal>test-jar-no-fork</goal> -->
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                 <!--<phase>verify</phase>-->
                                <goals>
                                    <goal>jar</goal>
                                    <!--<goal>test-jar</goal>-->
                                </goals>
                            </execution>
                            <!--<execution>-->
                                <!--<id>javadoc-jar</id>-->
                                <!--<phase>package</phase>-->
                                <!--<goals>-->
                                    <!--<goal>jar</goal>-->
                                <!--</goals>-->
                                <!--<configuration>-->
                                     <!--switch on dependency-driven aggregation-->
                                    <!--<includeDependencySources>true</includeDependencySources>-->
<!---->
                                    <!--<dependencySourceExcludes>-->
                                        <!-- exclude ONLY commons-cli artifacts -->
                                        <!--<dependencySourceExclude>commons-cli:*</dependencySourceExclude>-->
                                    <!--</dependencySourceExcludes>-->
                                <!--</configuration>-->
                            <!--</execution>-->
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
        <profile>
            <id>use-groovy-compiler</id>
            <activation>
                <file>
                    <exists>src/main/groovy</exists>
                </file>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-all</artifactId>
                    <version>${groovy-all-version}</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <compilerId>groovy-eclipse-compiler</compilerId>
                            <source>${jdk-version}</source>
                            <target>${jdk-version}</target>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>org.codehaus.groovy</groupId>
                                <artifactId>groovy-eclipse-compiler</artifactId>
                                <version>${groovy-eclipse-compiler-version}</version>
                            </dependency>
                            <dependency>
                                <groupId>org.codehaus.groovy</groupId>
                                <artifactId>groovy-eclipse-batch</artifactId>
                                <version>${groovy-eclipse-batch-version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>disable-java8-doclint</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <additionalparam>-Xdoclint:none</additionalparam>
            </properties>
        </profile>
        <profile>
            <id>create-git-properties</id>
            <activation>
                <file>
                    <exists>src/main/resources</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>pl.project13.maven</groupId>
                        <artifactId>git-commit-id-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>properties-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>no-tests</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${maven-surefire-version}</version>
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.maven.surefire</groupId>
                                <artifactId>surefire-junit47</artifactId>
                                <version>${maven-surefire-version}</version>
                            </dependency>
                        </dependencies>
                        <configuration>
                            <skipTests>true</skipTests>
                            <testFailureIgnore>false</testFailureIgnore>
                            <forkMode>always</forkMode>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
