<?xml version="1.0" encoding="UTF-8"?>

<!-- The Pennsylvania State University © 2016 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.commons</groupId>
  <artifactId>commons-jaxrs</artifactId>
  <name>Common JAXRS Libraries</name>
  <description>Common classes to make creating REST services more consistent.</description>
  <url>https://github.com/PennState/commons-jaxrs</url>
  <version>1.21</version>
  <packaging>jar</packaging>

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

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

    <javaee-api.version>7.0</javaee-api.version>
    <javax.mail.version>1.4.5</javax.mail.version>
    <jackson.version>2.8.8</jackson.version>
    <resteasy.version>3.1.2.Final</resteasy.version>
    <commons-net.version>3.4</commons-net.version>
    <bouncy-castle.version>140</bouncy-castle.version>

    <lombok.version>1.16.16</lombok.version>

    <slf4j.version>1.7.25</slf4j.version>

    <junit.version>4.12</junit.version>
    <junit-params.version>1.1.0</junit-params.version>
    <mockito.version>1.10.19</mockito.version>
  </properties>

  <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>
    <developer>
      <id>mat328</id>
      <name>Matt Teeter</name>
      <email>mat21@psu.edu</email>
      <url>https://github.com/mat328</url>
      <timezone>-0500</timezone>
      <organization>The Pennsylvania State University</organization>
      <organizationUrl>https://www.psu.edu</organizationUrl>
    </developer>
    <developer>
      <id>bhoman127</id>
      <name>Ben Homan</name>
      <email>bhoman@psu.edu</email>
      <url>https://github.com/bhoman127</url>
      <timezone>-0500</timezone>
      <organization>The Pennsylvania State University</organization>
      <organizationUrl>https://www.psu.edu</organizationUrl>
    </developer>
    <developer>
      <id>nur1</id>
      <name>Niraja Ramesh</name>
      <email>nur1@psu.edu</email>
      <url>https://github.com/nur1</url>
      <timezone>-0500</timezone>
      <organization>The Pennsylvania State University</organization>
      <organizationUrl>https://www.psu.edu</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:ssh://git@github.com:PennState/commons-jaxrs.git</connection>
    <developerConnection>scm:git:ssh://git@github.com:PennState/commons-jaxrs.git</developerConnection>
    <url>https://github.com/PennState/commons-jaxrs</url>
  </scm>

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

  <dependencies>
    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>javax.mail-api</artifactId>
      <version>${javax.mail.version}</version>
    </dependency>
    <dependency>
      <groupId>bouncycastle</groupId>
      <artifactId>bcprov-jdk16</artifactId>
      <version>${bouncy-castle.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jaxrs</artifactId>
      <version>${resteasy.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jaxb-provider</artifactId>
      <version>${resteasy.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jackson2-provider</artifactId>
      <version>${resteasy.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-validator-provider-11</artifactId>
      <version>${resteasy.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <!-- CAUTION, CAUTION, CAUTION - javaee-api needs to be below the resteasy dependencies or the tests will stop working -->
    <dependency>
      <groupId>javax</groupId>
      <artifactId>javaee-api</artifactId>
      <version>${javaee-api.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.module</groupId>
      <artifactId>jackson-module-jaxb-annotations</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-net</groupId>
      <artifactId>commons-net</artifactId>
      <version>${commons-net.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>

    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${lombok.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>pl.pragmatists</groupId>
      <artifactId>JUnitParams</artifactId>
      <version>${junit-params.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${slf4j.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <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>2.10.3</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <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>1.4.5</version>
        <configuration>
          <failBuildOnCVSS>6</failBuildOnCVSS>
          <!-- <failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability> -->
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>aggregate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>external.atlassian.jgitflow</groupId>
          <artifactId>jgitflow-maven-plugin</artifactId>
          <version>1.0-m4.3</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <flowInitContext>
              <versionTagPrefix>COM-</versionTagPrefix>
            </flowInitContext>
          </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>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
