<?xml version="1.0" encoding="UTF-8"?>
<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.ripple.cryptoconditions</groupId>
  <artifactId>crypto-conditions-parent</artifactId>
  <packaging>pom</packaging>
  <version>1.0.4</version>

  <name>Ripple Crypto Conditions Parent</name>
  <description>Parent project for Java Crypto Conditions modules.</description>
  <url>https://github.com/ripple/crypto-conditions</url>

  <organization>
    <name>Ripple Labs</name>
    <url>https://ripple.com/</url>
  </organization>

  <inceptionYear>2018</inceptionYear>

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

  <!-- Signing profile for signed distributions -->
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
          <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>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>owasp</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.owasp</groupId>
            <artifactId>dependency-check-maven</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <developers>
    <developer>
      <name>Adrian Hope-Bailie</name>
      <organizationUrl>https://github.com/adrianhopebailie</organizationUrl>
    </developer>
    <developer>
      <name>David Fuelling</name>
      <organizationUrl>https://github.com/sappenin</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/ripple/crypto-conditions.git</connection>
    <developerConnection>scm:git:git@github.com:ripple/crypto-conditions.git</developerConnection>
    <url>https://github.com/ripple/crypto-conditions</url>
    <tag>HEAD</tag>
  </scm>

  <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.resources.sourceEncoding>UTF-8</project.resources.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <jacoco.propertyName>argLine</jacoco.propertyName>

    <checkstyle.config.location>checkstyle.xml</checkstyle.config.location>
    <checkstyle.violationSeverity>warning</checkstyle.violationSeverity>

    <failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>

    <jackson.version>[2.9.10.1,)</jackson.version>
  </properties>

  <modules>
    <module>crypto-conditions</module>
    <module>jackson-datatype-cryptoconditions</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>crypto-conditions</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>net.i2p.crypto</groupId>
        <artifactId>eddsa</artifactId>
        <version>0.3.0</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
          </exclusion>
        </exclusions>
      </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-core</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.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>27.0.1-jre</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_annotations</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk16</artifactId>
        <version>1.46</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.immutables</groupId>
        <artifactId>value</artifactId>
        <version>2.5.6</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>2.7.22</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <!-- All plugin versions and default config is defined in the pluginManagement section. -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.1.1</version>
          <executions>
            <execution>
              <id>analyze</id>
              <goals>
                <goal>analyze-only</goal>
              </goals>
              <configuration>
                <failOnWarning>true</failOnWarning>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>1.16</version>
          <configuration>
            <!--license to use for the project-->
            <licenseName>apache_v2</licenseName>
            <processStartTag>========================LICENSE_START=================================
            </processStartTag>
            <processEndTag>=========================LICENSE_END==================================
            </processEndTag>

            <!--generate license file even if it exists-->
            <force>true</force>


            <licenseMerges>
              <licenseMerge>Apache License, Version 2.0|The Apache Software License, Version 2.0|Apache
                2|Apache License 2.0|AL 2.0
              </licenseMerge>
            </licenseMerges>

            <!--exclude test-scoped dependencies from the 3rd party license-list-->
            <excludedScopes>test</excludedScopes>

            <excludes>
              <exclude>**/*.json</exclude>
            </excludes>

          </configuration>
          <executions>
            <execution>
              <id>license-management</id>
              <goals>
                <!--updates the source's headers according to the specified license-->
                <goal>update-file-header</goal>

                <!--Adds the full-blown license file to the final product-->
                <goal>update-project-license</goal>

                <!--generate and add a list of third-party licenses-->
                <goal>add-third-party</goal>
              </goals>
              <phase>process-sources</phase>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.0.0-M2</version>
          <executions>
            <execution>
              <id>enforce-maven</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <requireMavenVersion>
                    <version>3.0.4</version>
                  </requireMavenVersion>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.owasp</groupId>
          <artifactId>dependency-check-maven</artifactId>
          <version>3.1.2</version>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <failBuildOnAnyVulnerability>${failBuildOnAnyVulnerability}</failBuildOnAnyVulnerability>
          </configuration>
        </plugin>
        <plugin>
          <groupId>com.ning.maven.plugins</groupId>
          <artifactId>maven-duplicate-finder-plugin</artifactId>
          <version>1.0.9</version>
          <executions>
            <execution>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <failBuildInCaseOfDifferentContentConflict>false</failBuildInCaseOfDifferentContentConflict>
                <failBuildInCaseOfEqualContentConflict>false</failBuildInCaseOfEqualContentConflict>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <configuration>
            <source>${maven.compiler.source}</source>
            <target>${maven.compiler.target}</target>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.0</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.1.0</version>
          <configuration>
            <excludes>
              <exclude>.*\/generated.*sources\/.*</exclude>
            </excludes>
            <source>8</source>
          </configuration>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.1.0</version>
          <inherited>true</inherited>
          <configuration>
            <sourceDirectories>
              <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
              <sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
            </sourceDirectories>
            <excludes>.*\/generated.*sources\/.*</excludes>
            <encoding>UTF-8</encoding>
            <consoleOutput>true</consoleOutput>
            <linkXRef>false</linkXRef>
            <failOnViolation>true</failOnViolation>
          </configuration>
          <dependencies>
            <!-- Update Checkstyle version used -->
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>8.23</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <phase>test</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <version>0.8.4</version>
          <artifactId>jacoco-maven-plugin</artifactId>
          <executions>
            <execution>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>report</id>
              <phase>test</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
          <configuration>
            <argLine>@{argLine}</argLine>
            <useSystemClassLoader>false</useSystemClassLoader>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <!-- All plugins in the plugins section will be run for all sub-modules unless <inherited>false</inherited> is
         specified. -->

    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.ning.maven.plugins</groupId>
        <artifactId>maven-duplicate-finder-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.8</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh-snapshots-interledger</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>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <inherited>false</inherited>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <sourceDirectories>
            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
            <sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
          </sourceDirectories>
          <excludes>.*\/generated.*sources\/.*</excludes>
          <encoding>UTF-8</encoding>
          <consoleOutput>true</consoleOutput>
          <linkXRef>false</linkXRef>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>checkstyle</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>.*\/generated.*sources\/.*</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

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

</project>
