<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set ts=4:sw=4:expandtab: -->
<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">

    <!-- Parent -->
    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>46</version>
    </parent>

    <!-- Model Information -->
    <modelVersion>4.0.0</modelVersion>

    <!-- Artifact Information -->
    <groupId>org.jboss.shrinkwrap.resolver</groupId>
    <artifactId>shrinkwrap-resolver-parent</artifactId>
    <version>3.3.3</version>
    <packaging>pom</packaging>
    <name>ShrinkWrap Resolver Aggregator</name>
    <description>ShrinkWrap Resolver Aggregator</description>

    <!-- Properties -->
    <properties>
        <!-- Java target is 1.8 -->
        <!-- Make sure to adjust jdk version specific profiles when bumping this version -->
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.argument.target>1.8</maven.compiler.argument.target>
        <maven.compiler.argument.source>1.8</maven.compiler.argument.source>

        <!-- Versioning -->
        <version.com.google.guice>6.0.0</version.com.google.guice>
        <version.commons-codec>1.17.1</version.commons-codec>
        <version.commons-compress>1.27.1</version.commons-compress>
        <version.commons-io>2.18.0</version.commons-io>
        <version.eu.maveniverse.mima>2.4.20</version.eu.maveniverse.mima>
        <version.org.apache.maven>3.9.9</version.org.apache.maven>
        <version.org.apache.maven-plugin-annotations>3.15.1</version.org.apache.maven-plugin-annotations>
        <version.org.apache.maven-invoker>3.3.0</version.org.apache.maven-invoker>
        <version.org.codehaus.plexus-classworlds>2.8.0</version.org.codehaus.plexus-classworlds>
        <version.org.codehaus.plexus-compiler-javac>2.15.0</version.org.codehaus.plexus-compiler-javac>
        <version.org.codehaus.plexus-sec-dispatcher>2.0</version.org.codehaus.plexus-sec-dispatcher>
        <version.org.eclipse.plexus>0.9.0.M3</version.org.eclipse.plexus>
        <version.org.gradle.gradle-tooling-api>8.11.1</version.org.gradle.gradle-tooling-api>
        <version.org.jboss.shrinkwrap>1.2.6</version.org.jboss.shrinkwrap>

        <!-- Plugin versions -->
        <version.org.apache.maven-invoker-plugin>3.9.0</version.org.apache.maven-invoker-plugin>
        <version.org.apache.maven-resources-plugin>3.3.1</version.org.apache.maven-resources-plugin>
        <version.org.apache.maven-shade-plugin>3.6.0</version.org.apache.maven-shade-plugin>
        <version.org.apache.maven-site-plugin>3.21.0</version.org.apache.maven-site-plugin>
        <version.org.apache.maven.plugins.maven-checkstyle-plugin>3.6.0</version.org.apache.maven.plugins.maven-checkstyle-plugin>
        <version.org.codehaus.animal-sniffer-maven-plugin>1.24</version.org.codehaus.animal-sniffer-maven-plugin>
        <version.org.eclipse.lifecycle-mapping>1.0.0</version.org.eclipse.lifecycle-mapping>
        <version.org.wildfly.checkstyle.wildfly-checkstyle-config>1.0.8.Final</version.org.wildfly.checkstyle.wildfly-checkstyle-config>

        <!-- Versions of test dependencies -->
        <version.junit>5.11.3</version.junit>
        <version.org.assertj.assertj-core>3.26.3</version.org.assertj.assertj-core>
        <version.org.awaitility.awaitility>4.2.2</version.org.awaitility.awaitility>
        <version.org.eclipse.jetty-webapp>9.4.56.v20240826</version.org.eclipse.jetty-webapp>
        <version.org.mockito.mockito-core>4.11.0</version.org.mockito.mockito-core>
    </properties>

    <!-- SCM -->
    <scm>
        <connection>scm:git:git://github.com/shrinkwrap/resolver.git</connection>
        <developerConnection>scm:git:git@github.com:shrinkwrap/resolver.git</developerConnection>
        <url>https://github.com/shrinkwrap/resolver</url>
      <tag>3.3.3</tag>
  </scm>

    <!-- Issues -->
    <issueManagement>
        <system>jira</system>
        <url>http://jira.jboss.com/jira/browse/SHRINKWRAP</url>
    </issueManagement>

    <!-- Licenses -->
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>


    <!-- Aggregate Modules -->
    <modules>
        <module>bom</module>
        <module>build-resources</module>
        <module>api</module>
        <module>spi</module>
        <module>depchain</module>

        <!-- Maven modules -->
        <module>maven/api-maven</module>
        <module>maven/impl-maven</module>
        <module>maven/api-maven-archive</module>
        <module>maven/spi-maven</module>
        <module>maven/spi-maven-archive</module>
        <module>maven/impl-maven-archive</module>
        <module>maven/maven-plugin</module>
        <module>maven/api-maven-embedded</module>
        <module>maven/impl-maven-embedded</module>

        <!-- Gradle modules -->
        <module>gradle/impl-gradle</module>
        <module>gradle/api-gradle-embedded-archive</module>
        <module>gradle/depchain-gradle</module>
        <module>gradle/impl-gradle-embedded-archive</module>

        <!-- Disabled by SHRINKRES-49, put it back with SHRINKRES-61 -->
        <!--<module>impl-maven-integration-tests</module>-->
    </modules>

    <!-- Dependency Management -->
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven</artifactId>
                <version>${version.org.apache.maven}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jboss.shrinkwrap</groupId>
                <artifactId>shrinkwrap-bom</artifactId>
                <version>${version.org.jboss.shrinkwrap}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>${version.com.google.guice}</version>
            </dependency>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${version.commons-codec}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${version.commons-io}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>${version.commons-compress}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${version.junit}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest</artifactId>
                <version>3.0</version>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${version.org.assertj.assertj-core}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.wildfly.checkstyle</groupId>
                <artifactId>wildfly-checkstyle-config</artifactId>
                <version>${version.org.wildfly.checkstyle.wildfly-checkstyle-config}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <!-- Plugin Configuration -->
    <build>

        <!-- Plugin Management -->
        <pluginManagement>
            <plugins>

                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>enforce</id>
                            <configuration>
                                <rules>
                                    <dependencyConvergence />
                                </rules>
                            </configuration>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${version.org.apache.maven-site-plugin}</version>
                </plugin>

                <!-- So m2e doesn't throw errors for features it doesn't support in the POM -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>${version.org.eclipse.lifecycle-mapping}</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-ear-plugin</artifactId>
                                        <versionRange>[1.0.0,)</versionRange>
                                        <goals>
                                            <goal>generate-application-xml</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-antrun-plugin</artifactId>
                                        <versionRange>[1.0,)</versionRange>
                                        <goals>
                                            <goal>run</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>

            <!-- Release -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <pushChanges>false</pushChanges>
                    <localCheckout>true</localCheckout>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Surefire -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    <trimStackTrace>false</trimStackTrace>
                    <printSummary>true</printSummary>
                    <includes>
                        <include>**/*TestCase.java</include>
                        <include>**/*TestSuite.java</include>
                    </includes>
                    <forkCount>1</forkCount>
                    <reuseForks>false</reuseForks>
                </configuration>
            </plugin>

            <!-- Checkstyle -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${version.org.apache.maven.plugins.maven-checkstyle-plugin}</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.wildfly.checkstyle</groupId>
                        <artifactId>wildfly-checkstyle-config</artifactId>
                        <version>${version.org.wildfly.checkstyle.wildfly-checkstyle-config}</version>
                    </dependency>
<!--                    We need to use version compatible with Java 8-->
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>9.3</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <configLocation>wildfly-checkstyle/checkstyle.xml</configLocation>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <linkXRef>false</linkXRef>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <!-- Reporting -->
    <reporting>
        <plugins>
            <!-- Cobertura (Code Coverage) -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <configuration>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                    <check />
                </configuration>
            </plugin>

            <!-- FindBugs -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                    <findbugsXmlOutputDirectory>target/site</findbugsXmlOutputDirectory>
                </configuration>
            </plugin>

            <!-- SHRINKWRAP-157 Workaround -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>project-team</report>
                            <report>mailing-list</report>
                            <report>cim</report>
                            <report>issue-tracking</report>
                            <report>license</report>
                            <report>scm</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <!-- Special JDK version handling, see also:
         https://github.com/shrinkwrap/resolver/commit/2018e1bb704a0e4593f65ca69fd955f50eb58bfb#commitcomment-36651197 -->
    <profiles>
        <profile>
            <id>jdk8+</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>animal-sniffer-maven-plugin</artifactId>
                        <version>${version.org.codehaus.animal-sniffer-maven-plugin}</version>
                        <executions>
                            <execution>
                                <id>check-java-version-compatibility</id>
                                <phase>test</phase>
                                <goals>
                                   <goal>check</goal>
                                </goals>
                                <configuration>
                                    <signature>
                                        <groupId>org.codehaus.mojo.signature</groupId>
                                        <artifactId>java18</artifactId>
                                        <version>1.0</version>
                                    </signature>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>dependency-version-bump-unix</id>
            <activation>
                <property>
                    <name>dependencyVersionBump</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>3.5.0</version>
                        <inherited>false</inherited>
                        <executions>
                            <execution>
                                <id>run-script</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>sh</executable>
                                    <arguments>
                                        <argument>dependency-version-bump.sh</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
