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

    This file is part of veraPDF PDF/A Validation Applications, a module of the veraPDF project.
    Copyright (c) 2015, veraPDF Consortium <info@verapdf.org>
    All rights reserved.

    veraPDF PDF/A Validation Applications is free software: you can redistribute it and/or modify
    it under the terms of either:

    The GNU General public license GPLv3+.
    You should have received a copy of the GNU General Public License
    along with veraPDF PDF/A Validation Applications as the LICENSE.GPL file in the root of the source
    tree.  If not, see http://www.gnu.org/licenses/ or
    https://www.gnu.org/licenses/gpl-3.0.en.html.

    The Mozilla Public License MPLv2+.
    You should have received a copy of the Mozilla Public License along with
    veraPDF PDF/A Validation Applications as the LICENSE.MPL file in the root of the source tree.
    If a copy of the MPL was not distributed with this file, you can obtain one at
    http://mozilla.org/MPL/2.0/.

-->
<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>

  <parent>
    <artifactId>verapdf-parent</artifactId>
    <groupId>org.verapdf</groupId>
    <version>1.4.1</version>
  </parent>

  <groupId>org.verapdf</groupId>
  <artifactId>verapdf-apps</artifactId>
  <version>1.4.2-PDFBOX</version>
  <packaging>pom</packaging>

  <name>veraPDF PDF/A Validation Applications</name>
  <description>veraPDF PDF/A Validation GUI, CLI and installer.</description>
  <url>https://github.com/veraPDF/veraPDF-apps/</url>
  <inceptionYear>2015</inceptionYear>

  <modules>
    <module>gui</module>
    <module>installer</module>
  </modules>

  <scm>
    <url>https://github.com/veraPDF/veraPDF-apps/</url>
    <connection>scm:git:https://github.com/veraPDF/veraPDF-apps.git</connection>
    <developerConnection>scm:git:git@github.com:veraPDF/veraPDF-integration-tests.git</developerConnection>
  </scm>
  <issueManagement>
    <url>https://github.com/veraPDF/veraPDF-apps/issues/</url>
    <system>GitHub Issues</system>
  </issueManagement>

  <repositories>
    <repository>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>vera-dev</id>
      <name>Vera development</name>
      <url>http://artifactory.openpreservation.org/artifactory/vera-dev</url>
    </repository>
  </repositories>

  <properties>
    <sonar.jacoco.itReportPath>${project.basedir}/../target/jacoco-it.exec</sonar.jacoco.itReportPath>
    <sonar.language>java</sonar.language>
    <maven.failsafe.version>2.18.1</maven.failsafe.version>
    <verapdf.pdfbox.validation.version>[1.4.0,1.5.0)</verapdf.pdfbox.validation.version>
  </properties>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>com.beust</groupId>
        <artifactId>jcommander</artifactId>
        <version>1.48</version>
      </dependency>

      <dependency>
        <groupId>nl.jqno.equalsverifier</groupId>
        <artifactId>equalsverifier</artifactId>
        <version>1.5.1</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>

    </dependencies>
  </dependencyManagement>


  <build>

    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/*IT.java</exclude>
          </excludes>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>dependencies</report>
              <report>project-team</report>
              <report>mailing-list</report>
              <report>cim</report>
              <report>issue-tracking</report>
              <report>license</report>
              <report>scm</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.3</version>
        <configuration>
          <show>public</show>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <profiles>

    <profile>
      <id>source-package</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.10</version>
            <executions>
              <execution>
                <id>sources-dependencies</id>
                <phase>package</phase>
                <goals>
                  <!-- use copy-dependencies instead if you don't want to explode
                    the sources -->
                  <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                  <classifier>sources</classifier>
                  <failOnMissingClassifierArtifact>true</failOnMissingClassifierArtifact>
                  <outputDirectory>${project.build.directory}/sources/src/main/java</outputDirectory>
                  <excludeArtifactIds>log4j, avalon-logkit, commons-io,
                    commons-logging</excludeArtifactIds>
                  <includes>**/*.java</includes>
                  <excludes>**/*Test.java, **/test/**/*.java</excludes>
                </configuration>
              </execution>
              <execution>
                <id>resources-dependencies</id>
                <phase>package</phase>
                <goals>
                  <!-- use copy-dependencies instead if you don't want to explode
                    the sources -->
                  <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                  <classifier>sources</classifier>
                  <failOnMissingClassifierArtifact>true</failOnMissingClassifierArtifact>
                  <outputDirectory>${project.build.directory}/sources/src/main/resources</outputDirectory>
                  <excludes>**/*.java</excludes>
                  <overWrite>true</overWrite>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.googlecode.maven-download-plugin</groupId>
            <artifactId>download-maven-plugin</artifactId>
            <version>1.2.0</version>
            <executions>
              <execution>
                <id>download-resources</id>
                <phase>validate</phase>
                <goals>
                  <goal>wget</goal>
                </goals>
                <configuration>
                  <url>http://downloads.verapdf.org/resources.zip</url>
                  <skipCache>true</skipCache>
                  <unpack>true</unpack>
                  <outputDirectory>${project.build.directory}/sources</outputDirectory>
                  <md5>dd9f91d455608fe64ace05567c127485</md5>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
              <execution>
                <id>src-vera</id>
                <phase>package</phase>
                <goals>
                  <!-- use copy-dependencies instead if you don't want to explode
                    the sources -->
                  <goal>jar-no-fork</goal>
                </goals>
                <configuration>
                  <outputDirectory>${project.build.directory}/sources</outputDirectory>
                  <finalName>apps-sources</finalName>
                  <attach>false</attach>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

    </profile>

  </profiles>
</project>
