<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You 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>
  <groupId>org.messaginghub</groupId>
  <artifactId>pooled-jms-parent</artifactId>
  <version>3.1.9</version>
  <packaging>pom</packaging>
  <inceptionYear>2017</inceptionYear>

  <name>PooledJMS</name>
  <description>Generic JMS Connection pooling library</description>
  <url>https://github.com/messaginghub/pooled-jms</url>

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

  <scm>
    <url>https://github.com/messaginghub/pooled-jms.git</url>
    <connection>scm:git:git://github.com/messaginghub/pooled-jms.git</connection>
    <developerConnection>scm:git:git@github.com:messaginghub/pooled-jms.git</developerConnection>
    <tag>3.1.9</tag>
  </scm>

  <developers>
    <developer>
      <name>Timothy Bish</name>
      <email>tabish121@gmail.com</email>
    </developer>
  </developers>

  <properties>
    <qpid-jms-version>2.9.0</qpid-jms-version>
    <artemis-version>2.38.0</artemis-version>
    <commons-pool2-version>2.13.0</commons-pool2-version>
    <slf4j-version>1.7.36</slf4j-version>
    <mockito-version>5.21.0</mockito-version>
    <junit.jupiter.version>5.13.4</junit.jupiter.version>
    <jakarta.jms-api-version>3.1.0</jakarta.jms-api-version>
    <jakarta-transaction-version>2.0.1</jakarta-transaction-version>
    <geronimo-transaction-version>3.1.5</geronimo-transaction-version>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.release>11</maven.compiler.release>

    <apache-rat-version>0.17</apache-rat-version>
    <maven-assembly-plugin-version>3.6.0</maven-assembly-plugin-version>
    <maven-gpg-plugin-version>3.1.0</maven-gpg-plugin-version>
    <maven-eclipse-plugin-version>2.10</maven-eclipse-plugin-version>
    <maven-idea-plugin-version>2.2.1</maven-idea-plugin-version>
    <maven-surefire-plugin-version>3.1.2</maven-surefire-plugin-version>
    <maven-release-plugin-version>3.0.1</maven-release-plugin-version>
    <nexus-staging-maven-plugin-version>1.6.8</nexus-staging-maven-plugin-version>
    <maven-bundle-plugin-version>5.1.8</maven-bundle-plugin-version>
    <maven-compiler-plugin-version>3.11.0</maven-compiler-plugin-version>
    <maven-source-plugin-version>3.2.1</maven-source-plugin-version>
    <maven-javadoc-plugin-version>3.5.0</maven-javadoc-plugin-version>
    <maven-deploy-plugin-version>3.1.1</maven-deploy-plugin-version>
    <maven-central-publishing-version>0.8.0</maven-central-publishing-version>
    <findbugs-maven-plugin-version>3.0.5</findbugs-maven-plugin-version>
    <jacoco-plugin-version>0.8.14</jacoco-plugin-version>

    <!-- Test properties -->
    <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
    <surefire.runOrder>filesystem</surefire.runOrder>

    <!-- surefire forked jvm arguments -->
    <argLine>-Xmx2g -enableassertions ${jacoco-config}</argLine>
  </properties>

  <modules>
    <module>pooled-jms</module>
    <module>pooled-jms-interop-tests</module>
    <module>pooled-jms-docs</module>
    <module>pooled-jms-examples</module>
    <module>packaged-pooled-jms</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.messaginghub</groupId>
        <artifactId>pooled-jms</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-pool2</artifactId>
        <version>${commons-pool2-version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j-version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j-version}</version>
      </dependency>

      <!-- Spec Jars -->
      <dependency>
        <groupId>jakarta.jms</groupId>
        <artifactId>jakarta.jms-api</artifactId>
        <version>${jakarta.jms-api-version}</version>
      </dependency>
      <dependency>
        <groupId>jakarta.transaction</groupId>
        <artifactId>jakarta.transaction-api</artifactId>
        <version>${jakarta-transaction-version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.geronimo.components</groupId>
        <artifactId>geronimo-transaction</artifactId>
        <version>${geronimo-transaction-version}</version>
        <classifier>jakarta</classifier>
        <exclusions>
          <exclusion>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jta_1.1_spec</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-j2ee-connector_1.6_spec</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- Test Dependencies -->
      <dependency>
        <groupId>org.apache.qpid</groupId>
        <artifactId>qpid-jms-client</artifactId>
        <version>${qpid-jms-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${junit.jupiter.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>${junit.jupiter.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>${junit.jupiter.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>artemis-server</artifactId>
        <version>${artemis-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>artemis-amqp-protocol</artifactId>
        <version>${artemis-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>artemis-jakarta-client</artifactId>
        <version>${artemis-version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <defaultGoal>install</defaultGoal>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${maven-assembly-plugin-version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin-version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>${maven-bundle-plugin-version}</version>
          <extensions>true</extensions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin-version}</version>
          <configuration>
            <runOrder>${surefire.runOrder}</runOrder>
            <redirectTestOutputToFile>${maven.test.redirectTestOutputToFile}</redirectTestOutputToFile>
            <forkCount>1</forkCount>
            <reuseForks>true</reuseForks>
            <runOrder>random</runOrder>
            <systemPropertyVariables>
              <java.awt.headless>true</java.awt.headless>
            </systemPropertyVariables>
            <failIfNoTests>false</failIfNoTests>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <version>${maven-eclipse-plugin-version}</version>
          <configuration>
            <downloadSources>true</downloadSources>
            <downloadJavadocs>true</downloadJavadocs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-idea-plugin</artifactId>
          <version>${maven-idea-plugin-version}</version>
          <configuration>
            <downloadSources>true</downloadSources>
            <downloadJavadocs>true</downloadJavadocs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <tagNameFormat>@{project.version}</tagNameFormat>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-plugin-version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>${apache-rat-version}</version>
        <configuration>
          <excludes>
            <exclude>appveyor.yml</exclude>
            <exclude>.travis.yml</exclude>
            <exclude>**/*.md</exclude>
            <exclude>**/*.txt</exclude>
            <exclude>etc/org.eclipse.*</exclude>
            <exclude>**/target/</exclude>
            <exclude>**/data/</exclude>
            <exclude>**/.github/</exclude>
            <exclude>**/*.lock</exclude>
            <exclude>**/META-INF/services/*</exclude>
            <exclude>**/*.iml</exclude>
            <exclude>**/*.keystore</exclude>
            <exclude>**/*.truststore</exclude>
            <exclude>**/*.crt</exclude>
            <exclude>**/*.csr</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin-version}</version>
        <configuration>
          <release>${maven.compiler.release}</release>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven-source-plugin-version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin-version}</version>
        <configuration>
          <source>8</source>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven-release-plugin-version}</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <tagNameFormat>@{project.version}</tagNameFormat>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <propertyName>jacoco-config</propertyName>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>${maven-central-publishing-version}</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
          <checksums>required</checksums>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-plugin-version}</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>release</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin-version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
