<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright The WildFly Authors
    SPDX-License-Identifier: Apache-2.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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>49</version>
  </parent>

  <groupId>org.jboss.galleon</groupId>
  <artifactId>galleon-parent</artifactId>
  <version>7.0.12.Final</version>
  <packaging>pom</packaging>

  <name>Galleon Parent</name>
  <description>Galleon Parent</description>
  <url>https://github.com/wildfly/galleon</url>
  <inceptionYear>2016</inceptionYear>
  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>https://repository.jboss.org/licenses/apache-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <modules>
    <module>common-api</module>
    <module>api</module>
    <module>core</module>
    <module>maven-plugin</module>
    <module>cli-commands</module>
    <module>cli</module>
    <module>cli-core-adapter</module>
    <module>maven-universe</module>
    <module>testsuite</module>
    <module>api-testsuite</module>
    <module>docs</module>
    <module>dist</module>
  </modules>

  <properties>
    <!-- Require Java 17 -->
    <maven.compiler.target>17</maven.compiler.target>
    <maven.compiler.source>17</maven.compiler.source>
    <!--
        Dependency versions. Please keep alphabetical.

        Each version property should be of the form "version.<groupId>".
        For example: <version.org.jboss.as>

        In cases where multiple artifacts use the same groupId but have different
        versions, add the artifactId or other qualifier to the property name.
        For example: <version.org.jboss.as.console>
    -->
    <version.adoc-maven-plugin-descriptor>1.0.0.Alpha3</version.adoc-maven-plugin-descriptor>
    <version.assertj>3.27.7</version.assertj>
    <version.com.io7m.xom>1.2.10</version.com.io7m.xom>
    <version.com.fasterxml.jackson.core>2.21.6</version.com.fasterxml.jackson.core>
    <version.com.mycila.license-maven-plugin>3.0</version.com.mycila.license-maven-plugin>
    <version.junit>4.13.1</version.junit>
    <version.maven-aether-provider>3.3.9</version.maven-aether-provider>
    <version.maven-settings-builder>3.3.9</version.maven-settings-builder>
    <version.org.aesh>2.0</version.org.aesh>
    <version.org.aesh-extensions>1.7</version.org.aesh-extensions>
    <version.org.apache.maven>3.8.1</version.org.apache.maven>
    <version.org.apache.maven.maven-artifact>3.5.2</version.org.apache.maven.maven-artifact>
    <version.org.apache.maven.plugin-tools>${version.plugin.plugin}</version.org.apache.maven.plugin-tools>
    <version.org.apache.maven.plugins.maven-shade-plugin>3.6.2</version.org.apache.maven.plugins.maven-shade-plugin>
    <version.org.apache.maven.shared>0.9.1</version.org.apache.maven.shared>
    <version.org.codehaus.mojo.xml-maven-plugin>1.0.1</version.org.codehaus.mojo.xml-maven-plugin>
    <version.org.eclipse.aether>1.1.0</version.org.eclipse.aether>
    <version.org.jboss.logging>3.3.1.Final</version.org.jboss.logging>
    <version.org.jboss.logmanager>2.0.6.Final</version.org.jboss.logmanager>
    <version.org.jboss.staxmapper>1.5.0.Final</version.org.jboss.staxmapper>
    <version.org.codehaus.plexus.plexus-utils>3.6.1</version.org.codehaus.plexus.plexus-utils>
    <version.plugin.plugin>3.7.0</version.plugin.plugin>

    <!-- sfl4j is brought in by eclipse aether and version needs to be overridden. Currently only used in tool module -->
    <version.org.slf4j>1.7.21</version.org.slf4j>
    <version.org.jboss.logging.slf4j-jboss-logging>1.1.0.Final</version.org.jboss.logging.slf4j-jboss-logging>

    <!-- Checkstyle configuration -->
    <linkXRef>false</linkXRef>
    <version.org.wildfly.checkstyle-config>1.0.8.Final</version.org.wildfly.checkstyle-config>

    <!-- license-maven-plugin configuration -->
    <license.failIfMissing>true</license.failIfMissing>
    <license.failIfUnknown>true</license.failIfUnknown>

    <output.dir.prefix>galleon</output.dir.prefix>
    <galleon.repo.scm.connection>git@github.com:wildfly/galleon.git</galleon.repo.scm.connection>
    <galleon.repo.scm.url>https://github.com/wildfly/galleon</galleon.repo.scm.url>
    
    <!-- release -->
    <version.gpg.plugin>3.2.8</version.gpg.plugin>
    <version.nxrm3.plugin>1.0.7</version.nxrm3.plugin>
    <!-- maven-gpg-plugin -->
    <!-- set this to "error" to require a GPG agent-->
    <gpg.pinEntryMode>loopback</gpg.pinEntryMode>
    <!-- Nexus deployment settings -->
    <nexus.serverId>jboss</nexus.serverId>
    <nexus.repo.name>wildfly-staging</nexus.repo.name>
    <nexus.repo.url>https://repository.jboss.org/nexus</nexus.repo.url>
    <nexus.destination.repo.name>releases</nexus.destination.repo.name>
    <nexus.staging.tag>galleon-${project.version}</nexus.staging.tag>   
  </properties>

  <repositories>
    <repository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>https://repository.jboss.org/nexus/content/groups/public/</url>
      <layout>default</layout>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>https://repository.jboss.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <dependencyManagement>
    <dependencies>

      <!-- Modules in this project -->
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-api</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-common-api</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-core</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-cli-core-adapter</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-maven-plugin</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-maven-universe</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-cli-commands</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-cli</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-testsuite</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!-- External Dependencies -->

      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${version.com.fasterxml.jackson.core}</version>
      </dependency>
      <dependency>
        <groupId>com.io7m.xom</groupId>
        <artifactId>xom</artifactId>
        <version>${version.com.io7m.xom}</version>
      </dependency>

      <dependency>
        <groupId>org.aesh</groupId>
        <artifactId>aesh</artifactId>
        <version>${version.org.aesh}</version>
      </dependency>
      <dependency>
        <groupId>org.aesh</groupId>
        <artifactId>aesh-extensions</artifactId>
        <version>${version.org.aesh-extensions}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-aether-provider</artifactId>
        <version>${version.maven-aether-provider}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-settings-builder</artifactId>
        <version>${version.maven-settings-builder}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${version.org.apache.maven}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${version.org.apache.maven}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${version.org.apache.maven.plugin-tools}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>${version.org.apache.maven.maven-artifact}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.shared</groupId>
        <artifactId>maven-artifact-transfer</artifactId>
        <version>${version.org.apache.maven.shared}</version>
        <exclusions>
          <exclusion>
            <groupId>*</groupId>
            <artifactId>*</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>${version.org.codehaus.plexus.plexus-utils}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-api</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-util</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-impl</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-connector-basic</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-transport-file</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-transport-http</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss</groupId>
        <artifactId>staxmapper</artifactId>
        <version>${version.org.jboss.staxmapper}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging</artifactId>
        <version>${version.org.jboss.logging}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.logmanager</groupId>
        <artifactId>jboss-logmanager</artifactId>
        <version>${version.org.jboss.logmanager}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.slf4j</groupId>
        <artifactId>slf4j-jboss-logging</artifactId>
        <version>${version.org.jboss.logging.slf4j-jboss-logging}</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${version.org.slf4j}</version>
      </dependency>

      <dependency>
        <groupId>org.wildfly.checkstyle</groupId>
        <artifactId>wildfly-checkstyle-config</artifactId>
        <version>${version.org.wildfly.checkstyle-config}</version>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${version.junit}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${version.assertj}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.wildfly.checkstyle</groupId>
      <artifactId>wildfly-checkstyle-config</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>

        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${version.com.mycila.license-maven-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>${version.org.apache.maven.plugins.maven-shade-plugin}</version>
        </plugin>
        <!-- Checkstyle -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${version.checkstyle.plugin}</version>
          <configuration>
            <configLocation>wildfly-checkstyle/checkstyle.xml</configLocation>
            <consoleOutput>true</consoleOutput>
            <failsOnError>true</failsOnError>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
            <useFile />
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.wildfly.checkstyle</groupId>
              <artifactId>wildfly-checkstyle-config</artifactId>
              <version>${version.org.wildfly.checkstyle-config}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>check-style</id>
              <phase>compile</phase>
              <goals>
                <goal>checkstyle</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <!--suppress MavenModelInspection -->
          <groupId>org.eclipse.m2e</groupId>
          <!--suppress MavenModelInspection -->
          <artifactId>lifecycle-mapping</artifactId>
          <!--suppress MavenModelInspection -->
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>
                      org.apache.maven.plugins
                    </groupId>
                    <artifactId>
                      maven-checkstyle-plugin
                    </artifactId>
                    <versionRange>
                      [2.5,)
                    </versionRange>
                    <goals>
                      <goal>checkstyle</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>xml-maven-plugin</artifactId>
          <version>${version.org.codehaus.mojo.xml-maven-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.wildfly.extras</groupId>
          <artifactId>adoc-maven-plugin-descriptor</artifactId>
          <version>${version.adoc-maven-plugin-descriptor}</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nxrm3-maven-plugin</artifactId>
          <version>${version.nxrm3.plugin}</version>
          <configuration>
            <serverId>${nexus.serverId}</serverId>
            <nexusUrl>${nexus.repo.url}</nexusUrl>
            <repository>${nexus.repo.name}</repository>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <inlineHeader>Copyright The WildFly Authors
SPDX-License-Identifier: Apache-2.0</inlineHeader>
          <excludes>
            <exclude>**/*.adoc</exclude>
            <exclude>**/README</exclude>
            <exclude>**/README.*</exclude>
            <exclude>**/LICENSE</exclude>
            <exclude>**/*.html</exclude>
            <exclude>**/*.htm</exclude>
            <exclude>**/nbproject/*</exclude>
            <exclude>**/.idea/*</exclude>
            <exclude>**/.idea/**/*</exclude>
            <exclude>mvnw</exclude>
            <exclude>mvnw.cmd</exclude>
            <exclude>**/help/*.txt</exclude>
            <exclude>**/pom.xml.releaseBackup</exclude>
            <exclude>**/pom.xml.tag</exclude>
            <exclude>CODEOWNERS</exclude>
            <exclude>**/*.properties</exclude>
            <exclude>dco.txt</exclude>
          </excludes>
          <mapping>
            <java>SLASHSTAR_STYLE</java>
            <yaml>SCRIPT_STYLE</yaml>
            <yml>SCRIPT_STYLE</yml>
          </mapping>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin-git</artifactId>
            <version>${version.com.mycila.license-maven-plugin}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-java</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>11</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>xml-maven-plugin</artifactId>
        <!-- *.xml and *.xsl are included by default -->
        <executions>
          <execution>
            <id>xml-check-format</id>
            <phase>verify</phase>
            <goals>
              <goal>check-format</goal>
            </goals>
          </execution>
        </executions>
      </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>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <developers>
    <developer>
      <id>jdenise</id>
      <name>Jean-Francois Denise</name>
      <organization>Red Hat</organization>
    </developer>
  </developers>
  <profiles>
    <!-- Temporarily override the jboss-parent jboss-release profile
    to add configuration related to Nexus 3 deployment. These
    are expected to come in a later jboss-parent release -->
    <!-- TODO remove this content when it is included in jboss-parent -->
    <profile>
      <id>jboss-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <executions>
              <execution>
                <id>default-deploy</id>
                <phase>none</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nxrm3-maven-plugin</artifactId>
            <extensions>true</extensions>
            <executions>
              <execution>
                <id>nexus-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <configuration>
              <useAgent>true</useAgent>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>${gpg.pinEntryMode}</arg>
              </gpgArguments>
            </configuration>
            <executions>
              <execution>
                <id>gpg-sign</id>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- Use this profile in combination with 'jboss-release' to use
    the nxrm3-maven-plugin's 'staging-deploy' goal instead of its
    'deploy' goal. Once the staged deployment is valdated, the
    person or script doing the release  would move on to use
    its 'staging-move' goal via a call to
    'mvn nxrm3:staging-move -Pjboss-staging-move' -->
    <!-- TODO remove this content when it is included in jboss-parent -->
    <profile>
      <id>jboss-staging-deploy</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nxrm3-maven-plugin</artifactId>
            <executions>
              <!-- Disable the jboss-release profile's 'deploy' goal execution -->
              <execution>
                <id>nexus-deploy</id>
                <phase>none</phase>
              </execution>
              <execution>
                <id>nexus-staging.deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>staging-deploy</goal>
                </goals>
                <configuration>
                  <tag>${nexus.staging.tag}</tag>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- Used in release workflows that use the 'jboss-staging-deploy' profile,
    this profile configures the nxrm3-maven-plugin to support command
    line execution of its 'staging-move' goal. -->
    <!-- TODO remove this content when it is included in jboss-parent -->
    <profile>
      <id>jboss-staging-move</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nxrm3-maven-plugin</artifactId>
            <configuration>
              <destinationRepository>${nexus.destination.repo.name}</destinationRepository>
              <tag>${nexus.staging.tag}</tag>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- Used in release workflows that use the 'jboss-staging-deploy' profile,
    this profile configures the nxrm3-maven-plugin to support command
    line execution of its 'staging-delete' goal. -->
    <!-- TODO remove this content when it is included in jboss-parent -->
    <profile>
      <id>jboss-staging-delete</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nxrm3-maven-plugin</artifactId>
            <configuration>
              <tag>${nexus.staging.tag}</tag>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <scm>
    <connection>scm:git:${galleon.repo.scm.connection}</connection>
    <developerConnection>scm:git:${galleon.repo.scm.connection}</developerConnection>
    <url>${galleon.repo.scm.url}</url>
    <tag>HEAD</tag>
  </scm>
</project>
