<?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>2.0.3</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>v2.0.3</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.8</version.java>

        <version.minimum-maven>3.3.9</version.minimum-maven>

        <!-- All versions. Keep in alphabetical order. Name format: version.${groupId}.${artifactIdOrWildcard}. -->
        <version.com.google.guava.guava>32.0.1-jre</version.com.google.guava.guava>
        <!-- checkstyle 9 is last version with JDK 8 support -->
        <version.com.puppycrawl.tools.checkstyle>9.3</version.com.puppycrawl.tools.checkstyle>
        <version.junit.junit>4.13.2</version.junit.junit>

        <version.org.apache.groovy.groovy-everything>4.0.22</version.org.apache.groovy.groovy-everything>
        <version.org.apache.httpcomponents.httpclient>4.5.13</version.org.apache.httpcomponents.httpclient>
        <version.org.apache.maven.plugins.maven-antrun-plugin>3.1.0</version.org.apache.maven.plugins.maven-antrun-plugin>
        <version.org.apache.maven.plugins.maven-checkstyle-plugin>3.3.0</version.org.apache.maven.plugins.maven-checkstyle-plugin>
        <version.org.apache.maven.plugins.maven-clean-plugin>3.3.1</version.org.apache.maven.plugins.maven-clean-plugin>
        <version.org.apache.maven.plugins.maven-compiler-plugin>3.11.0</version.org.apache.maven.plugins.maven-compiler-plugin>
        <version.org.apache.maven.plugins.maven-dependency-plugin>3.6.0</version.org.apache.maven.plugins.maven-dependency-plugin>
        <version.org.apache.maven.plugins.maven-deploy-plugin>3.1.1</version.org.apache.maven.plugins.maven-deploy-plugin>
        <version.org.apache.maven.plugins.maven-enforcer-plugin>3.3.0</version.org.apache.maven.plugins.maven-enforcer-plugin>
        <version.org.apache.maven.plugins.maven-install-plugin>3.1.1</version.org.apache.maven.plugins.maven-install-plugin>
        <version.org.apache.maven.plugins.maven-jar-plugin>3.3.0</version.org.apache.maven.plugins.maven-jar-plugin>
        <version.org.apache.maven.plugins.maven-javadoc-plugin>3.5.0</version.org.apache.maven.plugins.maven-javadoc-plugin>
        <version.org.apache.maven.plugins.maven-release-plugin>3.0.1</version.org.apache.maven.plugins.maven-release-plugin>
        <version.org.apache.maven.plugins.maven-resources-plugin>3.3.1</version.org.apache.maven.plugins.maven-resources-plugin>
        <version.org.apache.maven.plugins.maven-shade-plugin>3.5.0</version.org.apache.maven.plugins.maven-shade-plugin>
        <version.org.apache.maven.plugins.maven-site-plugin>4.0.0-M8</version.org.apache.maven.plugins.maven-site-plugin>
        <version.org.apache.maven.plugins.maven-source-plugin>3.3.0</version.org.apache.maven.plugins.maven-source-plugin>
        <version.org.apache.maven.plugins.maven-surefire-plugin>3.1.2</version.org.apache.maven.plugins.maven-surefire-plugin>
        <version.org.bouncycastle>1.74</version.org.bouncycastle>
        <version.org.codehaus.mojo.codenarc-maven-plugin>0.22-1</version.org.codehaus.mojo.codenarc-maven-plugin>
        <version.com.github.spotbugs.spotbugs-maven-plugin>4.7.3.5</version.com.github.spotbugs.spotbugs-maven-plugin>
        <version.org.hamcrest.hamcrest-core>2.2</version.org.hamcrest.hamcrest-core>
        <version.org.jboss.arquillian>1.6.0.Final</version.org.jboss.arquillian>
        <!-- EAP 7.0.0 (WildFly 10) -->
        <version.org.wildfly.core.wildfly-everything>2.2.0.Final</version.org.wildfly.core.wildfly-everything>
        <version.org.jboss.logging.jboss-logging>3.3.0.Final</version.org.jboss.logging.jboss-logging>
        <version.org.jboss.modules.jboss-modules>2.0.3.Final</version.org.jboss.modules.jboss-modules>
        <version.org.jboss.shrinkwrap>1.2.6</version.org.jboss.shrinkwrap>
        <version.org.mockito.mockito-core>4.6.1</version.org.mockito.mockito-core>
        <version.org.xmlunit.xmlunit-core>2.9.0</version.org.xmlunit.xmlunit-core>
    </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>
                <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.apache.groovy</groupId>
                <artifactId>groovy</artifactId>
                <version>${version.org.apache.groovy.groovy-everything}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.groovy</groupId>
                <artifactId>groovy-xml</artifactId>
                <version>${version.org.apache.groovy.groovy-everything}</version>
            </dependency>
            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-controller-client</artifactId>
                <version>${version.org.wildfly.core.wildfly-everything}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-cli</artifactId>
                <version>${version.org.wildfly.core.wildfly-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.core</groupId>
                <artifactId>wildfly-patching</artifactId>
                <version>${version.org.wildfly.core.wildfly-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-jdk18on</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>org.xmlunit</groupId>
                <artifactId>xmlunit-core</artifactId>
                <version>${version.org.xmlunit.xmlunit-core}</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>
                    <configuration>
                        <doclint>none</doclint>
                    </configuration>
                    <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>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>${version.com.github.spotbugs.spotbugs-maven-plugin}</version>
                    <configuration>
                        <excludeFilterFile>file:spotbugs-exclude.xml</excludeFilterFile>
                    </configuration>
                    <executions>
                        <execution>
                            <id>find-bugs</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-enforcer-plugin}</version>
                    <executions>
                        <execution>
                            <id>enforce-versions</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>[${version.minimum-maven},)</version>
                                    </requireMavenVersion>
                                    <requireJavaVersion>
                                        <version>[${version.java},)</version>
                                    </requireJavaVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-install-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-site-plugin}</version>
                </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>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>java8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <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>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>codenarc-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
