<?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.wildfly.extras.creaper</groupId>
    <artifactId>creaper-parent</artifactId>
    <version>1.6.1</version>
    <packaging>pom</packaging>

    <name>Creaper: Parent</name>
    <description>Creaper: Parent</description>
    <url>https://github.com/wildfly-extras/creaper</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>Ladicek</id>
        </developer>
        <developer>
            <id>rhatlapa</id>
        </developer>
    </developers>

    <modules>
        <module>commands</module>
        <module>core</module>
        <module>testsuite</module>
    </modules>

    <scm>
        <connection>scm:git:git@github.com:wildfly-extras/creaper.git</connection>
        <developerConnection>scm:git:git@github.com:wildfly-extras/creaper.git</developerConnection>
        <url>https://github.com/wildfly-extras/creaper</url>
        <tag>v1.6.1</tag>
    </scm>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/wildfly-extras/creaper/issues</url>
    </issueManagement>
    <distributionManagement>
        <repository>
            <id>jboss-releases-repository</id>
            <name>JBoss Releases Repository</name>
            <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>jboss-snapshots-repository</id>
            <name>JBoss Snapshots Repository</name>
            <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

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

        <maven.jboss.ga.repository.url>https://maven.repository.redhat.com/ga/</maven.jboss.ga.repository.url>

        <version.java>1.6</version.java>

        <!-- All versions. Keep in alphabetical order. Name format: version.${groupId}.${artifactIdOrWildcard}. -->
        <version.com.google.code.cookcc>0.3.3</version.com.google.code.cookcc>
        <version.com.google.guava.guava>20.0</version.com.google.guava.guava>
        <version.com.puppycrawl.tools.checkstyle>6.1.1</version.com.puppycrawl.tools.checkstyle>
        <version.junit.junit>4.12</version.junit.junit>

        <version.org.apache.httpcomponents.httpclient>4.5.2</version.org.apache.httpcomponents.httpclient>
        <version.org.apache.maven.plugins.maven-antrun-plugin>1.8</version.org.apache.maven.plugins.maven-antrun-plugin>
        <version.org.apache.maven.plugins.maven-checkstyle-plugin>2.15</version.org.apache.maven.plugins.maven-checkstyle-plugin>
        <version.org.apache.maven.plugins.maven-clean-plugin>3.0.0</version.org.apache.maven.plugins.maven-clean-plugin>
        <version.org.apache.maven.plugins.maven-compiler-plugin>3.6.1</version.org.apache.maven.plugins.maven-compiler-plugin>
        <version.org.apache.maven.plugins.maven-dependency-plugin>3.0.0</version.org.apache.maven.plugins.maven-dependency-plugin>
        <version.org.apache.maven.plugins.maven-deploy-plugin>2.8.2</version.org.apache.maven.plugins.maven-deploy-plugin>
        <version.org.apache.maven.plugins.maven-jar-plugin>3.0.2</version.org.apache.maven.plugins.maven-jar-plugin>
        <version.org.apache.maven.plugins.maven-javadoc-plugin>2.10.4</version.org.apache.maven.plugins.maven-javadoc-plugin>
        <version.org.apache.maven.plugins.maven-release-plugin>2.5.3</version.org.apache.maven.plugins.maven-release-plugin>
        <version.org.apache.maven.plugins.maven-resources-plugin>3.0.2</version.org.apache.maven.plugins.maven-resources-plugin>
        <version.org.apache.maven.plugins.maven-shade-plugin>3.0.0</version.org.apache.maven.plugins.maven-shade-plugin>
        <version.org.apache.maven.plugins.maven-source-plugin>3.0.1</version.org.apache.maven.plugins.maven-source-plugin>
        <version.org.apache.maven.plugins.maven-surefire-plugin>2.19.1</version.org.apache.maven.plugins.maven-surefire-plugin>
        <version.org.bouncycastle>1.55</version.org.bouncycastle>
        <version.org.codehaus.groovy.groovy-everything>2.4.10</version.org.codehaus.groovy.groovy-everything>
        <version.org.codehaus.mojo.codenarc-maven-plugin>0.22-1</version.org.codehaus.mojo.codenarc-maven-plugin>
        <version.org.codehaus.mojo.findbugs-maven-plugin>2.5.5</version.org.codehaus.mojo.findbugs-maven-plugin>
        <version.org.codehaus.mojo.findbugs-maven-plugin_java8>3.0.4</version.org.codehaus.mojo.findbugs-maven-plugin_java8>
        <version.org.hamcrest.hamcrest-core>1.3</version.org.hamcrest.hamcrest-core>
        <version.org.jboss.arquillian>1.1.13.Final</version.org.jboss.arquillian>
        <!-- EAP 6.4.0 -->
        <version.org.jboss.as.jboss-as-everything>7.5.0.Final-redhat-21</version.org.jboss.as.jboss-as-everything>
        <version.org.jboss.logging.jboss-logging>3.2.1.Final</version.org.jboss.logging.jboss-logging>
        <version.org.jboss.modules.jboss-modules>1.3.3.Final</version.org.jboss.modules.jboss-modules>
        <version.org.jboss.shrinkwrap>1.2.6</version.org.jboss.shrinkwrap>
        <version.org.mockito.mockito-core>1.10.19</version.org.mockito.mockito-core>
        <version.xmlunit.xmlunit>1.6</version.xmlunit.xmlunit>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- modules -->
            <dependency>
                <groupId>org.wildfly.extras.creaper</groupId>
                <artifactId>creaper-commands</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wildfly.extras.creaper</groupId>
                <artifactId>creaper-core</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- main dependencies -->
            <dependency>
                <!-- only to get rid of warnings when generating JavaDoc -->
                <groupId>com.google.code.cookcc</groupId>
                <artifactId>cookcc</artifactId>
                <version>${version.com.google.code.cookcc}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${version.com.google.guava.guava}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <scope>provided</scope>
                <version>${version.org.apache.httpcomponents.httpclient}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy</artifactId>
                <version>${version.org.codehaus.groovy.groovy-everything}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-xml</artifactId>
                <version>${version.org.codehaus.groovy.groovy-everything}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.as</groupId>
                <artifactId>jboss-as-controller-client</artifactId>
                <version>${version.org.jboss.as.jboss-as-everything}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.as</groupId>
                <artifactId>jboss-as-cli</artifactId>
                <version>${version.org.jboss.as.jboss-as-everything}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging</artifactId>
                <version>${version.org.jboss.logging.jboss-logging}</version>
            </dependency>
            <!--
              - Somehow a dependency on a non-existing version of JBoss Modules creeps into the testsuite.
              - Forcing a correct and existing version here to avoid Maven always trying to download the wrong one.
              -->
            <dependency>
                <groupId>org.jboss.modules</groupId>
                <artifactId>jboss-modules</artifactId>
                <version>${version.org.jboss.modules.jboss-modules}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-patching</artifactId>
                <version>${version.org.jboss.as.jboss-as-everything}</version>
                <scope>provided</scope>
            </dependency>

            <!-- test dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit.junit}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15on</artifactId>
                <version>${version.org.bouncycastle}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${version.org.hamcrest.hamcrest-core}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <version>${version.org.jboss.arquillian}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian.junit</groupId>
                <artifactId>arquillian-junit-container</artifactId>
                <version>${version.org.jboss.arquillian}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.shrinkwrap</groupId>
                <artifactId>shrinkwrap-api</artifactId>
                <version>${version.org.jboss.shrinkwrap}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.shrinkwrap</groupId>
                <artifactId>shrinkwrap-impl-base</artifactId>
                <version>${version.org.jboss.shrinkwrap}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${version.org.mockito.mockito-core}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>xmlunit</groupId>
                <artifactId>xmlunit</artifactId>
                <version>${version.xmlunit.xmlunit}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <repositories>
        <repository>
            <id>jboss-ga-repository</id>
            <url>${maven.jboss.ga.repository.url}</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-antrun-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-checkstyle-plugin}</version>
                    <configuration>
                        <configLocation>checkstyle.xml</configLocation>
                        <consoleOutput>true</consoleOutput>
                        <failsOnError>true</failsOnError>
                        <useFile />
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <linkXRef>false</linkXRef>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${version.com.puppycrawl.tools.checkstyle}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>check-style</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>checkstyle</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-clean-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-compiler-plugin}</version>
                    <configuration>
                        <source>${version.java}</source>
                        <target>${version.java}</target>
                        <testSource>${version.java}</testSource>
                        <testTarget>${version.java}</testTarget>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-dependency-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-deploy-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-jar-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-javadoc-plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-resources-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-release-plugin}</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <tagNameFormat>v@{version}</tagNameFormat>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-shade-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-source-plugin}</version>
                    <executions>
                        <!--
                          - This binds the "attach-sources" execution, which is defined by the "release-profile" profile
                          - in the Super POM, to the "none" phase so that its "sources:jar" goal is not executed.
                          - The "sources:jar" goal reruns the "generate-sources" phase, which wastes time and
                          - has side effects (re-attaches the sources JAR again, which causes problems during release).
                          -->
                        <execution>
                            <id>attach-sources</id>
                            <phase>none</phase>
                        </execution>
                        <execution>
                            <id>attach-sources-jar</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-surefire-plugin}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.surefire</groupId>
                            <artifactId>surefire-junit47</artifactId>
                            <version>${version.org.apache.maven.plugins.maven-surefire-plugin}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <!-- the default value of "true" is a real pain in multi-module projects -->
                        <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>codenarc-maven-plugin</artifactId>
                    <version>${version.org.codehaus.mojo.codenarc-maven-plugin}</version>
                    <configuration>
                        <sourceDirectory>${project.basedir}/src</sourceDirectory>
                        <rulesetfiles>file:codenarc.xml</rulesetfiles>
                        <maxPriority1Violations>0</maxPriority1Violations>
                        <maxPriority2Violations>0</maxPriority2Violations>
                        <maxPriority3Violations>0</maxPriority3Violations>
                    </configuration>
                    <executions>
                        <execution>
                            <id>codenarc</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>codenarc</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>${version.org.codehaus.mojo.findbugs-maven-plugin}</version>
                    <executions>
                        <execution>
                            <id>find-bugs</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>codenarc-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- support Java 8: use newer FindBugs plugin, switch off Javadoc's doclint -->
        <profile>
            <id>jdk8</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <version.org.codehaus.mojo.findbugs-maven-plugin>${version.org.codehaus.mojo.findbugs-maven-plugin_java8}</version.org.codehaus.mojo.findbugs-maven-plugin>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
