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

    checksum-maven-plugin - http://checksum-maven-plugin.nicoulaj.net
    Copyright © 2010-2018 checksum-maven-plugin contributors

    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>

  <parent>
    <groupId>net.nicoulaj</groupId>
    <artifactId>parent</artifactId>
    <version>54</version>
  </parent>

  <groupId>net.nicoulaj.maven.plugins</groupId>
  <artifactId>checksum-maven-plugin</artifactId>
  <version>1.8</version>
  <packaging>maven-plugin</packaging>

  <name>checksum-maven-plugin</name>
  <description>Compute project artifacts/dependencies/files checksum digests and output them to individual or summary files.
  </description>
  <url>http://checksum-maven-plugin.nicoulaj.net</url>
  <inceptionYear>2010</inceptionYear>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
    </license>
    <license>
      <name>The Legion of the Bouncy Castle license</name>
      <url>http://www.bouncycastle.org/license.html</url>
      <comments>The Legion of the Bouncy Castle is a cryptography library used by checksum-maven-plugin.</comments>
    </license>
  </licenses>

  <scm>
    <url>http://github.com/nicoulaj/checksum-maven-plugin</url>
    <connection>scm:git:git@github.com:nicoulaj/checksum-maven-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:nicoulaj/checksum-maven-plugin.git</developerConnection>
    <tag>1.8</tag>
  </scm>

  <issueManagement>
    <system>Github</system>
    <url>http://github.com/nicoulaj/checksum-maven-plugin/issues</url>
  </issueManagement>

  <ciManagement>
    <system>Travis-CI</system>
    <url>https://travis-ci.org/nicoulaj/checksum-maven-plugin</url>
  </ciManagement>

  <distributionManagement>
    <site>
      <id>github</id>
      <url>gitsite:git@github.com/nicoulaj/checksum-maven-plugin.git</url>
    </site>
  </distributionManagement>

  <properties>

    <!-- Versions -->
    <java.level>1.6</java.level>
    <maven-model.version>2.2.1</maven-model.version>
    <maven-project.version>2.2.1</maven-project.version>
    <maven-min-supported.version>3.0.4</maven-min-supported.version>
    <bouncycastle.version>1.60</bouncycastle.version>
    <plexus-utils.version>3.1.0</plexus-utils.version>

    <!-- Build settings -->
    <debug>false</debug>
    <invoker.settings-file>${project.basedir}/src/it/settings.xml</invoker.settings-file>

  </properties>

  <prerequisites>
    <maven>${maven-min-supported.version}</maven>
  </prerequisites>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-project</artifactId>
        <version>${maven-project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-model</artifactId>
        <version>${maven-model.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${maven-model.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${maven-plugin-plugin.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk15on</artifactId>
        <version>${bouncycastle.version}</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>${plexus-utils.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcprov-jdk15on</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>

    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-maven-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>[${maven-min-supported.version},)</version>
                  <message>Maven v${maven-min-supported.version}+ is required to build this project, please update.</message>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <signature>
                <groupId>org.codehaus.mojo.signature</groupId>
                <artifactId>java16</artifactId>
                <version>1.0</version>
              </signature>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <executions>
          <execution>
            <id>run-integration-tests</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <localRepositoryPath>${project.build.directory}/it/local-repository</localRepositoryPath>
          <showErrors>${debug}</showErrors>
          <debug>${debug}</debug>
          <settingsFile>${invoker.settings-file}</settingsFile>
          <projectsDirectory>${project.basedir}/src/it/projects</projectsDirectory>
          <pomIncludes>
            <pomInclude>**/pom.xml</pomInclude>
          </pomIncludes>
          <cloneProjectsTo>${project.build.directory}/it/projects</cloneProjectsTo>
          <cloneClean>true</cloneClean>
          <reportsDirectory>${project.build.directory}/it/reports</reportsDirectory>
          <addTestClassPath>true</addTestClassPath>
          <goals>
            <goal>clean</goal>
            <goal>install</goal>
          </goals>
          <streamLogs>true</streamLogs>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <configuration>
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
          <execution>
            <id>generated-helpmojo</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${java.level}</source>
          <target>${java.level}</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <encoding>${encoding}</encoding>
          <tagletArtifacts>
            <tagletArtifact>
              <groupId>org.apache.maven.plugin-tools</groupId>
              <artifactId>maven-plugin-tools-javadoc</artifactId>
              <version>${maven-plugin-tools-javadoc.version}</version>
            </tagletArtifact>
          </tagletArtifacts>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
          <configuration>
            <excludes>
              <exclude>**/HelpMojo.class</exclude>
            </excludes>
          </configuration>
        <executions>
          <execution>
            <id>setup-coverage-unit-tests</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>setup-coverage-integration-tests</id>
            <goals>
              <goal>prepare-agent-integration</goal>
            </goals>
            <configuration>
              <propertyName>invoker.mavenOpts</propertyName>
            </configuration>
          </execution>
          <execution>
            <id>merge-coverage</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>merge</goal>
            </goals>
            <configuration>
              <fileSets>
                <fileSet>
                  <directory>${project.build.directory}</directory>
                  <includes>
                    <include>jacoco*.exec</include>
                  </includes>
                </fileSet>
              </fileSets>
              <destFile>${project.build.directory}/jacoco-all.exec</destFile>
            </configuration>
          </execution>
          <execution>
            <id>report-coverage</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>report</goal>
            </goals>
            <configuration>
              <dataFile>${project.build.directory}/jacoco-all.exec</dataFile>
              <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>

  </build>

  <profiles>

    <!-- Increase verbosity -->
    <profile>
      <id>debug</id>
      <properties>
        <debug>true</debug>
      </properties>
    </profile>

    <!-- Skip tests -->
    <profile>
      <id>skip-tests</id>
      <activation>
        <property>
          <name>skipTests</name>
        </property>
      </activation>
      <properties>
        <invoker.skip>true</invoker.skip>
      </properties>
    </profile>

  </profiles>

  <!-- Reporting and site -->
  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven-plugin-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <configuration>
          <encoding>${encoding}</encoding>
          <tagletArtifacts>
            <tagletArtifact>
              <groupId>org.apache.maven.plugin-tools</groupId>
              <artifactId>maven-plugin-tools-javadoc</artifactId>
              <version>${maven-plugin-tools-javadoc.version}</version>
            </tagletArtifact>
          </tagletArtifacts>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>${maven-invoker-plugin.version}</version>
        <configuration>
          <reportsDirectory>${project.build.directory}/it/reports</reportsDirectory>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${maven-pmd-plugin.version}</version>
        <configuration>
          <targetJdk>${java.level}</targetJdk>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

</project>
