<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>49</version>
    </parent>
    <groupId>org.wildfly.deployment</groupId>
    <artifactId>wildfly-deployment-transformer-parent</artifactId>
    <version>2.0.1.Alpha1</version>
    <packaging>pom</packaging>
    <name>EE 8 to EE 9 deployment transformation for WildFly -- Parent</name>
  
    <description>Parent pom for producing a Galleon feature pack for including a Jakarta EE 8 to EE 9 deployment transformation capability into a WildFly installation.</description>
    <url>https://github.com/wildfly-extras/deployment-transformer-feature-pack</url>

    <developers>
        <developer>
            <id>bstansberry</id>
            <name>Brian Stansberry</name>
            <url>https://github.com/bstansberry</url>
            <organization>IBM</organization>
            <organizationUrl>https://www.ibm.com</organizationUrl>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:${wildfly-extras.repo.scm.connection}</connection>
        <developerConnection>scm:git:${wildfly-extras.repo.scm.connection}</developerConnection>
        <url>${wildfly-extras.repo.scm.url}</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <!-- Require Java 11 -->
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>

        <!-- TODO Change the github org to wildfly-extras once repo ownership is transferred -->
        <wildfly-extras.repo.scm.connection>git@github.com:wildfly-extras/deployment-transformer-feature-pack.git</wildfly-extras.repo.scm.connection>
        <wildfly-extras.repo.scm.url>https://github.com/wildfly-extras/deployment-transformer-feature-pack</wildfly-extras.repo.scm.url>

        <!-- maven-gpg-plugin -->
        <!-- set this to "error" to require a GPG agent-->
        <gpg.pinEntryMode>loopback</gpg.pinEntryMode>

        <assembly.tarLongFileMode>posix</assembly.tarLongFileMode>

        <!-- Nexus deployment settings -->
        <version.gpg.plugin>3.2.8</version.gpg.plugin>
        <version.nxrm3.plugin>1.0.7</version.nxrm3.plugin>
        <nexus.serverId>jboss</nexus.serverId>
        <nexus.repo.name>wildfly-extras-staging</nexus.repo.name>
        <nexus.repo.url>https://repository.jboss.org/nexus</nexus.repo.url>
        <nexus.destination.repo.name>wildfly-extras</nexus.destination.repo.name>
        <nexus.staging.tag>deployment-transformer-feature-pack-${project.version}</nexus.staging.tag>

        <!-- Production code dependency versions -->
        <version.org.apache.maven.plugins.maven-assembly-plugin>3.2.0</version.org.apache.maven.plugins.maven-assembly-plugin>
        <version.org.wildfly>27.0.0.Final</version.org.wildfly>
        <version.org.wildfly.core>19.0.0.Final</version.org.wildfly.core>
        <version.org.wildfly.galleon-plugins>6.5.4.Final</version.org.wildfly.galleon-plugins>

        <!-- Test dependency versions -->
        <version.junit.junit>4.13.2</version.junit.junit>
        <version.org.apache.httpcomponents>5.2.1</version.org.apache.httpcomponents>
        <version.org.jboss.jboss-dmr>1.6.1.Final</version.org.jboss.jboss-dmr>
        <version.org.jsoup.jsoup>1.15.3</version.org.jsoup.jsoup>
        <!-- The versions for BOMs, Dependencies and Plugins -->
        <version.server.bom>26.1.1.Final</version.server.bom>
        <version.shrinkwrap.resolvers>3.1.4</version.shrinkwrap.resolvers>
        <version.org.wildfly.extras.batavia>1.0.12.Final</version.org.wildfly.extras.batavia>
        <version.org.wildfly.plugins.wildfly-jar-maven-plugin>10.0.0.Final</version.org.wildfly.plugins.wildfly-jar-maven-plugin>
        <version.org.wildfly.plugins.wildfly-maven-plugin>4.2.1.Final</version.org.wildfly.plugins.wildfly-maven-plugin>
        <version.org.wildfly.test>27.0.1.Final</version.org.wildfly.test>
    </properties>

    <!-- NOTE: Only include production code build dependencies here; use testsuite/pom.xml for test dependencies -->
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-ee-galleon-pack</artifactId>
                <type>zip</type>
                <version>${version.org.wildfly}</version>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-server</artifactId>
                <version>${version.org.wildfly.core}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.wildfly.core</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
              <groupId>org.wildfly.extras.batavia</groupId>
              <artifactId>transformer-api</artifactId>
              <version>${version.org.wildfly.extras.batavia}</version>
            </dependency>
            <dependency>
              <groupId>org.wildfly.extras.batavia</groupId>
              <artifactId>transformer-impl-eclipse</artifactId>
              <version>${version.org.wildfly.extras.batavia}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>transformer</artifactId>
                <version>${project.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>wildfly-deployment-transformer-galleon-content</artifactId>
                <type>pom</type>
                <version>${project.version}</version>
            </dependency>
            
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>wildfly-ee-9-deployment-transformer</artifactId>
                <version>${project.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            
        </dependencies>
    </dependencyManagement>
    
    <modules>
        <module>deployment-transformer</module>
        <module>galleon-content</module>
        <module>testsuite</module>
        <module>transformer</module>
        <module>wildfly-feature-pack</module>
    </modules>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>wildfly-assembly-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-assembly-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.wildfly.galleon-plugins</groupId>
                    <artifactId>wildfly-galleon-maven-plugin</artifactId>
                    <version>${version.org.wildfly.galleon-plugins}</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>
    </build>

    <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>

    <repositories>
        <repository>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
            <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>
        </repository>
    </repositories>
</project>
