<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2017 Carlos Macasaet

   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

       https://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>com.macasaet.fernet</groupId>
  <artifactId>fernet-java</artifactId>
  <version>1.5.0</version>
  <name>Fernet Java - Parent</name>
  <packaging>pom</packaging>
  <url>https://l0s.github.io/fernet-java8/</url>
  <inceptionYear>2017</inceptionYear>
  <description>A Java implementation of the Fernet encrypted token specification.</description>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://raw.githubusercontent.com/l0s/fernet-java8/master/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>l0s</id>
      <name>Carlos Macasaet</name>
      <url>https://www.carlos-m.net</url>
    </developer>
  </developers>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/l0s/fernet-java8/issues</url>
  </issueManagement>
  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <pmd.version>6.20.0</pmd.version>
    <jackson.version>2.11.2</jackson.version>
    <dependency.locations.enabled>false</dependency.locations.enabled>
  </properties>
  <scm>
    <url>https://github.com/l0s/fernet-java8</url>
    <connection>scm:git:ssh://github.com/l0s/fernet-java8.git</connection>
    <developerConnection>scm:git:git@github.com:l0s/fernet-java8.git</developerConnection>
    <tag>fernet-java-1.5.0</tag>
  </scm>
  <ciManagement>
    <system>Travis CI</system>
    <url>https://travis-ci.com/github/l0s/fernet-java8</url>
  </ciManagement>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13</version>
        <scope>test</scope>
      </dependency>
      <dependency>
          <groupId>org.mockito</groupId>
          <artifactId>mockito-core</artifactId>
          <version>3.5.11</version>
          <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.4.0-b180830.0359</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.9.1</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-module-markdown</artifactId>
            <version>1.9.1</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>execution</id>
            <phase>site</phase>
            <goals>
              <goal>attach-descriptor</goal>
              <goal>site</goal>
              <goal>stage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.8</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-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0-M5</version>
          <configuration>
            <parallel>all</parallel>
            <useUnlimitedThreads>true</useUnlimitedThreads>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>3.0.0-M5</version>
          <configuration>
            <parallel>all</parallel>
            <useUnlimitedThreads>true</useUnlimitedThreads>
          </configuration>
          <executions>
            <execution>
              <id>integration-test</id>
              <goals>
                <goal>integration-test</goal>
              </goals>
            </execution>
            <execution>
              <id>verify</id>
              <goals>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.pitest</groupId>
          <artifactId>pitest-maven</artifactId>
          <version>1.5.2</version>
          <configuration>
            <avoidCallsTo>
              <avoidCallsTo>java.security.SecureRandom</avoidCallsTo>
              <avoidCallsTo>java.util.Random</avoidCallsTo>
            </avoidCallsTo>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>mutationCoverage</goal>
              </goals>
              <phase>verify</phase>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>3.13.0</version>
          <configuration>
            <analysisCache>true</analysisCache>
            <rulesets>
              <ruleset>${maven.multiModuleProjectDirectory}/src/main/config/pmd-ruleset.xml</ruleset>
            </rulesets>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>net.sourceforge.pmd</groupId>
              <artifactId>pmd-core</artifactId>
              <version>${pmd.version}</version>
            </dependency>
            <dependency>
              <groupId>net.sourceforge.pmd</groupId>
              <artifactId>pmd-java</artifactId>
              <version>${pmd.version}</version>
            </dependency>
            <dependency>
              <groupId>net.sourceforge.pmd</groupId>
              <artifactId>pmd-xml</artifactId>
              <version>${pmd.version}</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <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>
    <site>
      <id>site</id>
      <name>Site</name>
      <url>${project.url}</url>
    </site>
  </distributionManagement>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <keyname>${gpg.keyname}</keyname>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.1</version>
            <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-javadoc-plugin</artifactId>
            <version>3.2.0</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <modules>
    <module>fernet-java8</module>
    <module>fernet-aws-secrets-manager-rotator</module>
    <module>fernet-jersey-auth</module>
  </modules>
</project>
