<?xml version="1.0" encoding="UTF-8"?>
<!--
    JBoss, Home of Professional Open Source
    Copyright 2021, Red Hat, Inc. and/or its affiliates, and individual
    contributors by the @authors tag. See the copyright.txt in the
    distribution for a full listing of individual contributors.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<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.cloud</groupId>
    <artifactId>wildfly-cloud-galleon-pack-parent</artifactId>
    <version>9.2.2.Final</version>
    <packaging>pom</packaging>
    <name>WildFly Galleon feature-pack for Cloud parent</name>
  
    <description>WildFly Galleon feature-pack for Cloud parent.</description>
    <url>https://github.com/wildfly/wildfly-cloud-galleon-pack</url>
    <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>
    
    <properties>
        <version.javax.inject>1</version.javax.inject>
        <version.junit>4.13.2</version.junit>
        <wildfly.cekit.modules.fork>wildfly</wildfly.cekit.modules.fork>
        <wildfly.cekit.modules.tag>wildfly-cloud-9.2.2.Final</wildfly.cekit.modules.tag>
        <version.org.wildfly>39.0.1.Final</version.org.wildfly>
        <version.org.wildfly.core>31.0.3.Final</version.org.wildfly.core>
        <version.org.wildfly.galleon-plugins>8.1.5.Final</version.org.wildfly.galleon-plugins>
        <version.org.wildfly.maven.plugin>6.0.0.Beta3</version.org.wildfly.maven.plugin>
        
        <wildfly.repo.scm.connection>git@github.com:wildfly/wildfly-cloud-galleon-pack.git</wildfly.repo.scm.connection>
        <wildfly.repo.scm.url>https://github.com/wildfly/wildfly-cloud-galleon-pack</wildfly.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>wildfly-cloud-galleon-pack-${project.version}</nexus.staging.tag> 
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>wildfly-cloud-galleon-pack-common</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
            </dependency>
            <dependency>
              <groupId>${project.groupId}</groupId>
              <artifactId>wildfly-bootable-cloud-configurator</artifactId>
              <version>${project.version}</version>
              <type>jar</type>
            </dependency>
            <dependency>
              <groupId>org.wildfly</groupId>
              <artifactId>wildfly-ee-galleon-pack</artifactId>
              <version>${version.org.wildfly}</version>
              <type>zip</type>
              <exclusions>
                <exclusion>
                  <groupId>*</groupId>
                  <artifactId>*</artifactId>
                </exclusion>
              </exclusions>
            </dependency>
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-galleon-pack</artifactId>
                <version>${version.org.wildfly}</version>
                <type>zip</type>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-preview-feature-pack</artifactId>
                <version>${version.org.wildfly}</version>
                <type>zip</type>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
              <groupId>org.wildfly.core</groupId>
              <artifactId>wildfly-jar-runtime</artifactId>
              <version>${version.org.wildfly.core}</version>
            </dependency>
            <!-- tests -->
            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-core-test-runner</artifactId>
                <version>${version.org.wildfly.core}</version>
            </dependency>
            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-controller-client</artifactId>
                <version>${version.org.wildfly.core}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit}</version>
            </dependency>
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>${version.javax.inject}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.wildfly.plugins</groupId>
                    <artifactId>wildfly-maven-plugin</artifactId>
                    <version>${version.org.wildfly.maven.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>
        <plugins>
            <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>
            <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>
        </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>
    <!-- In order to resolve from nexus when not yet synchronized with central -->
    <repositories>
        <repository>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
            <id>jboss-public-repository</id>
            <name>JBoss Public Repository</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
            <layout>default</layout>
        </repository>
    </repositories>

    <modules>
        <module>common</module>
        <module>testsuite</module>
        <module>wildfly-bootable-cloud-configurator</module>
        <module>wildfly-cloud-galleon-pack</module>
        <module>wildfly-preview-cloud-galleon-pack</module>
    </modules>
    <scm>
        <connection>scm:git:${wildfly.repo.scm.connection}</connection>
        <developerConnection>scm:git:${wildfly.repo.scm.connection}</developerConnection>
        <url>${wildfly.repo.scm.url}</url>
        <tag>HEAD</tag>
    </scm>
</project>
