<?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>1.2.1</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>1.2.1</tag>
  </scm>

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

  <properties>
    <qpid-jms-version>0.54.0</qpid-jms-version>
    <activemq-version>5.16.0</activemq-version>
    <artemis-version>2.15.0</artemis-version>
    <commons-pool2-version>2.9.0</commons-pool2-version>
    <slf4j-version>1.7.30</slf4j-version>
    <mockito-version>3.6.0</mockito-version>
    <junit-version>4.13.1</junit-version>
    <geronimo.jms.2.spec.version>1.0-alpha-2</geronimo.jms.2.spec.version>
    <geronimo.jms.1.1.spec.version>1.1.1</geronimo.jms.1.1.spec.version>

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

    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>

    <apache-rat-version>0.13</apache-rat-version>
    <maven-assembly-plugin-version>3.3.0</maven-assembly-plugin-version>
    <maven-gpg-plugin-version>1.6</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>2.22.2</maven-surefire-plugin-version>
    <maven-release-plugin-version>2.5.3</maven-release-plugin-version>
    <nexus-staging-maven-plugin-version>1.6.8</nexus-staging-maven-plugin-version>
    <maven-bundle-plugin-version>4.2.1</maven-bundle-plugin-version>
    <maven-compiler-plugin-version>3.8.1</maven-compiler-plugin-version>
    <maven-source-plugin-version>3.2.1</maven-source-plugin-version>
    <maven-javadoc-plugin-version>3.2.0</maven-javadoc-plugin-version>
    <maven-deploy-plugin-version>2.8.2</maven-deploy-plugin-version>
    <findbugs-maven-plugin-version>3.0.5</findbugs-maven-plugin-version>
    <jacoco-plugin-version>0.8.5</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>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <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-log4j12</artifactId>
        <version>${slf4j-version}</version>
      </dependency>

      <!-- Spec Jars -->
      <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-jms_2.0_spec</artifactId>
        <version>${geronimo.jms.2.spec.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-jms_1.1_spec</artifactId>
        <version>${geronimo.jms.1.1.spec.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.geronimo.components</groupId>
        <artifactId>geronimo-transaction</artifactId>
        <version>3.1.4</version>
      </dependency>

      <!-- Test Dependencies -->
      <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-broker</artifactId>
        <version>${activemq-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-client</artifactId>
        <version>${activemq-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-kahadb-store</artifactId>
        <version>${activemq-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-amqp</artifactId>
        <version>${activemq-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-jaas</artifactId>
        <version>${activemq-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.activemq.tooling</groupId>
        <artifactId>activemq-junit</artifactId>
        <version>${activemq-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.qpid</groupId>
        <artifactId>qpid-jms-client</artifactId>
        <version>${qpid-jms-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit-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-junit</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>**/*.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>
          <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>
    </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>
