<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2019 The Calrissian Authors

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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.calrissian.mango</groupId>
  <artifactId>mango-parent</artifactId>
  <version>3.0.0</version>
  <packaging>pom</packaging>
  <name>Mango Parent</name>
  <description>Mango provides common reusable utilities.</description>
  <modules>
    <module>mango-core</module>
    <module>mango-criteria</module>
    <module>mango-json</module>
  </modules>
  <properties>
    <commons.codec.version>1.11</commons.codec.version>
    <guava.version>22.0</guava.version>
    <junit.version>4.11</junit.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>${commons.codec.version}</version>
      </dependency>
      <dependency>
        <groupId>org.calrissian.mango</groupId>
        <artifactId>mango-core</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.calrissian.mango</groupId>
        <artifactId>mango-criteria</artifactId>
        <version>${project.version}</version>
      </dependency>
      <!--Test-->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <tagNameFormat>@{project.version}</tagNameFormat>
            <pushChanges>false</pushChanges>
            <localCheckout>true</localCheckout>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
            <optimize>true</optimize>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.1.0</version>
          <configuration>
            <source>8</source>
            <quiet>true</quiet>
            <detectJavaApiLink>true</detectJavaApiLink>
            <detectLinks>true</detectLinks>
            <additionalOptions>-Xdoclint:none</additionalOptions>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <version>0.13</version>
          <configuration>
            <excludes>
              <exclude>**\README.md</exclude>
              <exclude>**\.travis.yml</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>com.github.ekryd.sortpom</groupId>
          <artifactId>sortpom-maven-plugin</artifactId>
          <version>2.8.0</version>
          <configuration>
            <predefinedSortOrder>custom_1</predefinedSortOrder>
            <lineSeparator>\n</lineSeparator>
            <encoding>${project.build.sourceEncoding}</encoding>
            <sortProperties>true</sortProperties>
            <sortDependencies>scope,groupId,artifactId</sortDependencies>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>4.0.0</version>
          <extensions>true</extensions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.github.ekryd.sortpom</groupId>
        <artifactId>sortpom-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>sort-pom</id>
            <goals>
              <goal>sort</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <url>http://www.calrissian.org</url>
  <organization>
    <name>Calrissian</name>
    <url>http://www.calrissian.org</url>
  </organization>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Corey Nolet</name>
    </developer>
    <developer>
      <name>Edward Wagner</name>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git@github.com:calrissian/mango.git</connection>
    <developerConnection>scm:git:git@github.com:calrissian/mango.git</developerConnection>
    <url>git@github.com:calrissian/mango.git</url>
    <tag>3.0.0</tag>
  </scm>
  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
      <layout>default</layout>
    </repository>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <layout>default</layout>
    </snapshotRepository>
  </distributionManagement>
  <profiles>
    <profile>
      <id>full</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.rat</groupId>
            <artifactId>apache-rat-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <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>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
