<?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>org.jboss.pressgang</groupId>
    <artifactId>pressgang-parent</artifactId>
    <version>1.6</version>
    <packaging>pom</packaging>
    <name>PressGang Parent</name>
    <description>Parent POM for JBoss PressGang projects.</description>
    <url>http://www.jboss.org/pressgang</url>
    <licenses>
        <license>
            <name>GNU Lesser General Public License, Version 2.1</name>
            <url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:git@github.com:pressgang-ccms/pressgang-parent.git</connection>
        <developerConnection>scm:git:git@github.com:pressgang-ccms/pressgang-parent.git</developerConnection>
        <url>git@github.com:pressgang-ccms/pressgang-parent.git</url>
    </scm>
    <developers>
        <developer>
            <name>Matt Casperson</name>
            <email>mcaspers@redhat.com</email>
        </developer>
        <developer>
            <name>Katie Miller</name>
            <email>kamiller@redhat.com</email>
        </developer>
        <developer>
            <name>Lee Newson</name>
            <email>lnewson@redhat.com</email>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>${sonatypeOssDistMgmtStagingUrl}</url>
        </repository>
    </distributionManagement>

    <properties>
        <sonatypeOssDistMgmtSnapshotsUrl>
            https://oss.sonatype.org/content/repositories/snapshots/
        </sonatypeOssDistMgmtSnapshotsUrl>
        <sonatypeOssDistMgmtStagingUrl>
            https://oss.sonatype.org/service/local/staging/deploy/maven2/
        </sonatypeOssDistMgmtStagingUrl>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <skipSigning>true</skipSigning>
        <junit.version>4.11</junit.version>
        <skipTests>false</skipTests>
        <skipIntTests>true</skipIntTests>
        <skipCheckstyle>false</skipCheckstyle>
        <checkstyleConsoleOutput>false</checkstyleConsoleOutput>
        <checkstyleLogViolationsToConsole>true</checkstyleLogViolationsToConsole>
        <skipFindbugs>true</skipFindbugs>
        <findbugs.failonerror>false</findbugs.failonerror>
        <java.version>1.6</java.version>
        <warplugin.version>2.2</warplugin.version>
        <compilerplugin.version>2.3.1</compilerplugin.version>
        <jarplugin.version>2.4</jarplugin.version>
        <jbossplugin.version>7.1.1.Final</jbossplugin.version>
        <findbugsplugin.version>2.5.2</findbugsplugin.version>
        <surefireplugin.version>2.12.2</surefireplugin.version>
        <surefirereportplugin.version>2.12.2</surefirereportplugin.version>
        <gpgplugin.version>1.4</gpgplugin.version>
        <sourceplugin.version>2.2.1</sourceplugin.version>
        <javadocplugin.version>2.9.1</javadocplugin.version>
        <checkstyleplugin.version>2.6</checkstyleplugin.version>
        <jacoco.version>0.5.10.201208310627</jacoco.version>
        <gwt.version>2.5.1</gwt.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${jarplugin.version}</version>
                    <configuration>
                        <archive>
                            <manifestEntries>
                                <Built-By>${author.name}</Built-By>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${warplugin.version}</version>
                    <configuration>
                        <!-- Java EE 6 doesn't require web.xml -->
                        <failOnMissingWebXml>false</failOnMissingWebXml>
                        <archive>
                            <manifestEntries>
                                <Built-By>${author.name}</Built-By>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>${findbugsplugin.version}</version>
                    <configuration>
                        <xmlOutput>true</xmlOutput>
                        <xmlOutputDirectory>target/site</xmlOutputDirectory>
                        <skip>${skipFindbugs}</skip>
                        <failOnError>${findbugs.failonerror}</failOnError>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>verify</phase>
                            <goals>
                                <goal>findbugs</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${compilerplugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefireplugin.version}</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>${skipTests}</skip>
                            <argLine>${argLine}</argLine>
                            <excludes>
                                <exclude>**/*IntegrationTest.java</exclude>
                                <exclude>**/*FunctionalTest.java</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>integration-test</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>${skipIntTests}</skip>
                            <argLine>${argLine}</argLine>
                            <includes>
                                <include>**/*IntegrationTest.java</include>
                                <include>**/*FunctionalTest.java</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <configuration>
                    <skip>${skipTests}</skip>
                    <destFile>${basedir}/target/jacoco.exec</destFile>
                    <dataFile>${basedir}/target/jacoco.exec</dataFile>
                    <output>file</output>
                    <append>true</append>
                </configuration>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyleplugin.version}</version>
                <configuration>
                    <skip>${skipCheckstyle}</skip>
                    <configLocation>https://raw.github.com/pressgang-ccms/pressgang-parent/master/checkstyle.xml
                    </configLocation>
                    <consoleOutput>${checkstyleConsoleOutput}</consoleOutput>
                    <logViolationsToConsole>${checkstyleLogViolationsToConsole}</logViolationsToConsole>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${findbugsplugin.version}</version>
            </plugin>

            <!-- https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven#HowToGeneratePGPSignaturesWithMaven-MavenGPGPlugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${gpgplugin.version}</version>
                <configuration>
                    <skip>${skipSigning}</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Attach the JavaDoc sources -->
            <!-- http://maven.apache.org/plugin-developers/cookbook/attach-source-javadoc-artifacts.html -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${sourceplugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${javadocplugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${findbugsplugin.version}</version>
            </plugin>
        </plugins>
    </reporting>
</project>
