<?xml version="1.0" encoding="UTF-8"?>
<!--
    JBoss, Home of Professional Open Source
    Copyright 2015, 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>51</version>
    </parent>
    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-datasources-galleon-pack-parent</artifactId>
    <version>11.5.0.Final</version>
    <packaging>pom</packaging>
    <name>Drivers and datasources for WildFly parent</name>
  
    <description>Drivers and datasources for WildFly parent</description>
    <url>https://github.com/wildfly/wildfly-datasources-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>
        <!-- Require Java 11 -->
        <maven.compiler.target>17</maven.compiler.target>
        <maven.compiler.source>17</maven.compiler.source>
        <version.org.postgresql.postgresql>42.7.13</version.org.postgresql.postgresql>
        <version.org.codehaus.mojo.properties-maven-plugin>1.0.0</version.org.codehaus.mojo.properties-maven-plugin>
        <version.software.amazon.jdbc.aws-advanced-jdbc-wrapper>4.1.0</version.software.amazon.jdbc.aws-advanced-jdbc-wrapper>
        <version.com.h2database>2.4.240</version.com.h2database>
        <version.com.ibm.db2>12.1.5.0</version.com.ibm.db2>
        <version.com.microsoft.sqlserver>13.4.0.jre11</version.com.microsoft.sqlserver>
        <version.com.oracle.ojdbc17>23.26.3.0.0</version.com.oracle.ojdbc17>
        <version.inject>1</version.inject>
        <version.junit>4.13.2</version.junit>
        <version.com.mysql.mysql-connector-j>9.7.0</version.com.mysql.mysql-connector-j>
        <version.org.jboss.jboss-dmr>1.7.0.Final</version.org.jboss.jboss-dmr>
        <version.org.jboss.shrinkwrap>1.2.6</version.org.jboss.shrinkwrap>
        <version.org.mariadb>3.5.10</version.org.mariadb>
        <version.org.wildfly>41.0.0.Final</version.org.wildfly>
        <version.org.wildfly.core>33.0.0.Final</version.org.wildfly.core>
        <version.org.wildfly.plugin>6.0.1.Final</version.org.wildfly.plugin>
        <version.jakarta.annotations>3.0.0</version.jakarta.annotations>
        <version.org.wildfy.glow>2.2.0.Final</version.org.wildfy.glow>
        <version.org.wildfly.galleon-plugins>8.1.5.Final</version.org.wildfly.galleon-plugins>
        <wildfly.repo.scm.connection>git@github.com:wildfly/wildfly-datasources-galleon-pack.git</wildfly.repo.scm.connection>
        <wildfly.repo.scm.url>https://github.com/wildfly/wildfly-datasources-galleon-pack</wildfly.repo.scm.url>
        <!-- release -->
        <version.gpg.plugin>3.2.8</version.gpg.plugin>
        <version.nxrm3.plugin>1.0.13</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-datasources-galleon-pack-${project.version}</nexus.staging.tag> 
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-datasources-galleon-pack-common</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-preview-feature-pack</artifactId>
                <version>${version.org.wildfly}</version>
                <type>zip</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>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${version.com.h2database}</version>
            </dependency>
            <dependency>
                <groupId>com.microsoft.sqlserver</groupId>
                <artifactId>mssql-jdbc</artifactId>
                <version>${version.com.microsoft.sqlserver}</version>
            </dependency>
            <dependency>
                <groupId>org.mariadb.jdbc</groupId>
                <artifactId>mariadb-java-client</artifactId>
                <version>${version.org.mariadb}</version>
            </dependency>
            <dependency>
                <groupId>com.mysql</groupId>
                <artifactId>mysql-connector-j</artifactId>
                <version>${version.com.mysql.mysql-connector-j}</version>
            </dependency>
            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>${version.org.postgresql.postgresql}</version>
            </dependency>
            <dependency>
                <groupId>com.oracle.database.jdbc</groupId>
                <artifactId>ojdbc17</artifactId>
                <version>${version.com.oracle.ojdbc17}</version>
            </dependency>
            <dependency>
                <groupId>com.ibm.db2</groupId>
                <artifactId>jcc</artifactId>
                <version>${version.com.ibm.db2}</version>
            </dependency>
            <dependency>
                <groupId>software.amazon.jdbc</groupId>
                <artifactId>aws-advanced-jdbc-wrapper</artifactId>
                <version>${version.software.amazon.jdbc.aws-advanced-jdbc-wrapper}</version>
            </dependency>
            <!-- tests -->
            <dependency>
                <groupId>org.jboss.shrinkwrap</groupId>
                <artifactId>shrinkwrap-api</artifactId>
                <version>${version.org.jboss.shrinkwrap}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.shrinkwrap</groupId>
                <artifactId>shrinkwrap-impl-base</artifactId>
                <version>${version.org.jboss.shrinkwrap}</version>
            </dependency>
            <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>org.jboss</groupId>
                <artifactId>jboss-dmr</artifactId>
                <version>${version.org.jboss.jboss-dmr}</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.inject}</version>
            </dependency>
            <dependency>
                <groupId>org.wildfly.glow</groupId>
                <artifactId>wildfly-glow-core</artifactId>
                <version>${version.org.wildfy.glow}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.wildfly.glow</groupId>
                <artifactId>wildfly-glow-maven-resolver</artifactId>
                <version>${version.org.wildfy.glow}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>${version.jakarta.annotations}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
      <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>
      <pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.wildfly.galleon-plugins</groupId>
            <artifactId>wildfly-galleon-maven-plugin</artifactId>
            <version>${version.org.wildfly.galleon-plugins}</version>
          </plugin>
          <plugin>
            <groupId>org.wildfly.plugins</groupId>
            <artifactId>wildfly-maven-plugin</artifactId>
            <version>${version.org.wildfly.plugin}</version>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>properties-maven-plugin</artifactId>
            <version>${version.org.codehaus.mojo.properties-maven-plugin}</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>
    <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>
    <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>
    <modules>
        <module>common</module>
        <module>datasources-preview-galleon-pack</module>
        <module>datasources-galleon-pack</module>
        <module>testsuite</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>
