<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018 by The Pennsylvania State University

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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>edu.psu.swe.libraries</groupId>
  <artifactId>jms-tools</artifactId>
  <version>0.16.21</version>
  <packaging>pom</packaging>
  <url>${project.parent}/libraries/jms-utils</url>


  <name>JMS Tools</name>
  <description>Penn State's Open Source JMS Tools Project</description>
  <inceptionYear>2017</inceptionYear>

  <modules>
    <module>jms-reactive-client</module>
  </modules>

  <scm>
    <url>https://github.com:PennState/jms-tools.git</url>
    <connection>scm:git:ssh://github.com:PennState/jms-tools.git</connection>
    <developerConnection>scm:git:ssh://github.com:PennState/jms-tools.git</developerConnection>
  </scm>

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

  <developers>
    <developer>
      <id>ussmith</id>
      <name>Shawn Smith</name>
      <email>ses44@psu.edu</email>
      <url>https://github.com/ussmith</url>
      <timezone>-0500</timezone>
      <organization>The Pennsylvania State University</organization>
      <organizationUrl>https://www.psu.edu</organizationUrl>
    </developer>
    <developer>
      <id>chrisharm</id>
      <name>Christopher Harm</name>
      <email>crh5255@psu.edu</email>
      <url>https://github.com/chrisharm</url>
      <timezone>-0500</timezone>
      <organization>The Pennsylvania State University</organization>
      <organizationUrl>https://www.psu.edu</organizationUrl>
    </developer>
    <developer>
      <id>smoyer64</id>
      <name>Steve Moyer</name>
      <email>smoyer@psu.edu</email>
      <url>https://github.com/smoyer64</url>
      <timezone>-0500</timezone>
      <organization>The Pennsylvania State University</organization>
      <organizationUrl>https://www.psu.edu</organizationUrl>
    </developer>
  </developers>


  <properties>
    <java.compiler.source>1.8</java.compiler.source>
    <java.compiler.target>1.8</java.compiler.target>

    <dependency-check.skip>true</dependency-check.skip>

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

    <!-- Configuration for test coverage reporting in SonarQube -->
    <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
    <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
    <sonar.jacoco.reportPath>target/jacoco.exec</sonar.jacoco.reportPath>

    <!-- This property will configure the Surefire (and Failsafe) plugins in
         a way that doesn't specify the plugin version and replaces the
         commented out plugin definition below.  This is necessary on Debian
         (and derived) OSes until the patch that fixes the default value is
         applied.
         
         See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911925 -->
    <argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>

    <activemq.version>5.15.9</activemq.version>
    <assertj.version>3.11.1</assertj.version>
    <cdi-api.version>2.0.2</cdi-api.version>
    <junit.version>5.6.0</junit.version>
    <logback.version>1.2.3</logback.version>
    <lombok.version>1.18.4</lombok.version>
    <microprofile-config.version>1.3</microprofile-config.version>
    <mockito.version>3.3.0</mockito.version>
    <resteasy-jackson2.version>4.6.0.Final</resteasy-jackson2.version>
    <slf4j.version>1.7.25</slf4j.version>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${lombok.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-client</artifactId>
        <version>${activemq.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jackson2-provider</artifactId>
        <version>${resteasy-jackson2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.microprofile.config</groupId>
        <artifactId>microprofile-config-api</artifactId>
        <version>${microprofile-config.version}</version>
      </dependency>
      <dependency>
        <groupId>jakarta.enterprise</groupId>
        <artifactId>jakarta.enterprise.cdi-api</artifactId>
        <version>${cdi-api.version}</version>
      </dependency>

      <!-- Test scoped -->
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj.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.mockito</groupId>
        <artifactId>mockito-junit-jupiter</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- Test logging -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>log4j-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jul-to-slf4j</artifactId>
        <version>${slf4j.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
      </plugin>
    </plugins>
  </reporting>

  <build>
    <plugins>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.3</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>${java.compiler.source}</source>
          <target>${java.compiler.target}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.1.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <source>8</source>
          <additionalparam>-Xdoclint:none</additionalparam>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.11</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.owasp</groupId>
        <artifactId>dependency-check-maven</artifactId>
        <version>5.3.0</version>
        <configuration>
          <cveValidForHours>24</cveValidForHours>
          <format>ALL</format>
          <failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
          <failOnError>false</failOnError>
          <suppressionFiles>dependencyCheckSuppression.xml</suppressionFiles>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
              <goal>aggregate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.2</version>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <destFile>${sonar.jacoco.reportPath}</destFile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.3</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <shortRevisionLength>7</shortRevisionLength>
          <doCheck>false</doCheck>
          <doUpdate>false</doUpdate>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>2.22.2</version>
        </plugin>
        <plugin>
          <groupId>io.ultreia.java4all.jgitflow</groupId>
          <artifactId>jgitflow-maven-plugin</artifactId>
          <version>1.0.0-rc-1</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <allowUntracked>true</allowUntracked>
            <flowInitContext>
              <versionTagPrefix>REL-</versionTagPrefix>
            </flowInitContext>
            <localOnly>true</localOnly>
            <incrementDevelopFromReleaseVersion>true</incrementDevelopFromReleaseVersion>
            <versionNumberToIncrement>1</versionNumberToIncrement>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <version>0.12</version>
          <executions>
            <execution>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <addLicenseHeaders>true</addLicenseHeaders>
            <copyrightMessage>Copyright (c) 2018 by The Pennsylvania State University</copyrightMessage>
            <excludes>
              <exclude>**/*.md</exclude>
              <exclude>**/*.xml</exclude>
              <exclude>**/.factorypath</exclude>
              <exclude>.github/**/*.*</exclude>
              <exclude>.vscode/**/*.*</exclude>
            </excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>sign-artifacts</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                    <arg>--batch</arg>
                    <arg>--no-tty</arg>
                    <arg>--yes</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>