<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2010 Julien Nicoulaud <julien.nicoulaud@gmail.com>
  ~
  ~ 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>

  <!-- Project coordinates -->
  <groupId>net.ju-n.maven.plugins</groupId>
  <artifactId>maven-checksum-plugin</artifactId>
  <version>1.0</version>
  <packaging>maven-plugin</packaging>

  <!-- Project info -->
  <name>maven-checksum-plugin</name>
  <description>
    <![CDATA[Compute project artifacts/dependencies/files checksum digests and output them to individual or summary files.]]>
  </description>
  <url>http://maven.ju-n.net/maven-checksum-plugin</url>

  <!-- License -->
  <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 maven-checksum-plugin.</comments>
    </license>
  </licenses>

  <!-- Team -->
  <developers>
    <developer>
      <id>nicoulaj</id>
      <name>Julien Nicoulaud</name>
      <email>julien.nicoulaud@gmail.com</email>
      <timezone>+1</timezone>
      <url>http://www.github.com/nicoulaj</url>
    </developer>
  </developers>

  <!-- Version control system -->
  <scm>
    <url>http://github.com/nicoulaj/maven-checksum-plugin</url>
    <connection>scm:git:git@github.com:nicoulaj/maven-checksum-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:nicoulaj/maven-checksum-plugin.git</developerConnection>
  </scm>

  <!-- Issues management -->
  <issueManagement>
    <system>Github</system>
    <url>${project.scm.url}/issues</url>
  </issueManagement>

  <!-- Distribution management -->
  <distributionManagement>
    <downloadUrl>https://oss.sonatype.org/content/groups/public</downloadUrl>
    <repository>
      <id>sonatype-oss-staging</id>
      <name>Sonatype OSS staging repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-oss-snapshots</id>
      <name>Sonatype OSS snapshots repository</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <uniqueVersion>false</uniqueVersion>
    </snapshotRepository>
    <site>
      <id>ju-n.net</id>
      <name>maven-checksum-plugin site on ju-n.net</name>
      <url>ftp://ftp.ju-n.net/maven/maven-checksum-plugin</url>
    </site>
  </distributionManagement>

  <!-- Properties -->
  <properties>

    <!-- Target versions -->
    <maven.target-version>2.2.0</maven.target-version>
    <java.target-version>5</java.target-version>

    <!-- Build settings -->
    <debug>false</debug>
    <encoding>UTF-8</encoding>
    <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
    <invoker.settings-file>${project.basedir}/src/test-integration/settings.xml</invoker.settings-file>

    <!-- Reporting plugins versions -->
    <maven-plugin-plugin.version>2.6</maven-plugin-plugin.version>
    <maven-site-plugin.version>2.1.1</maven-site-plugin.version>
    <maven-project-info-reports-plugin.version>2.1</maven-project-info-reports-plugin.version>
    <maven-javadoc-plugin.version>2.7</maven-javadoc-plugin.version>
    <maven-jxr-plugin.version>2.2</maven-jxr-plugin.version>
    <maven-surefire-report-plugin.version>2.6</maven-surefire-report-plugin.version>
    <maven-invoker-plugin.version>1.5</maven-invoker-plugin.version>
    <maven-pmd-plugin.version>2.5</maven-pmd-plugin.version>
    <maven-checkstyle-plugin.version>2.6</maven-checkstyle-plugin.version>
    <maven-changelog-plugin.version>2.2</maven-changelog-plugin.version>
    <cobertura-maven-plugin.version>2.4</cobertura-maven-plugin.version>
    <taglist-maven-plugin.version>2.4</taglist-maven-plugin.version>

  </properties>

  <!-- Dependencies management -->
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${maven.target-version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-project</artifactId>
        <version>${maven.target-version}</version>
      </dependency>
      <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk1${java.target-version}</artifactId>
        <version>1.45</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>2.0.5</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.2</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <!-- Dependencies -->
  <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.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcprov-jdk15</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <!-- Build prerequisites -->
  <prerequisites>
    <maven>2.2.1</maven>
  </prerequisites>

  <!-- Build -->
  <build>

    <!-- Plugins management -->
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <source>1.${java.target-version}</source>
            <target>1.${java.target-version}</target>
            <optimize>true</optimize>
            <showWarnings>true</showWarnings>
            <showDeprecation>true</showDeprecation>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>1.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.0-beta-1</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven-site-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${maven-plugin-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${maven-project-info-reports-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
          <configuration>
            <encoding>${encoding}</encoding>
            <links>
              <link>http://download-llnw.oracle.com/javase/1.5.0/docs/api</link>
              <link>http://maven.apache.org/ref/${maven.target-version}/apidocs</link>
              <link>http://plexus.codehaus.org/plexus-components/plexus-digest/apidocs</link>
              <link>http://plexus.codehaus.org/plexus-utils/apidocs</link>
              <link>http://junit.sourceforge.net/javadoc</link>
            </links>
            <tagletArtifacts>
              <tagletArtifact>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-tools-javadoc</artifactId>
                <version>2.6</version>
              </tagletArtifact>
            </tagletArtifacts>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>${maven-jxr-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>${maven-surefire-report-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>${maven-pmd-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven-checkstyle-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-changelog-plugin</artifactId>
          <version>${maven-changelog-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>taglist-maven-plugin</artifactId>
          <version>${taglist-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>${cobertura-maven-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <!-- Default build -->
    <plugins>

      <!-- Run integration tests -->
      <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}/integration-tests/local-repository</localRepositoryPath>
          <showErrors>${debug}</showErrors>
          <debug>${debug}</debug>
          <settingsFile>${invoker.settings-file}</settingsFile>
          <projectsDirectory>${project.basedir}/src/test-integration/projects</projectsDirectory>
          <pomIncludes>
            <pomInclude>**/pom.xml</pomInclude>
          </pomIncludes>
          <cloneProjectsTo>${project.build.directory}/integration-tests/projects</cloneProjectsTo>
          <reportsDirectory>${project.build.directory}/integration-tests/reports</reportsDirectory>
          <addTestClassPath>true</addTestClassPath>
          <goals>
            <goal>clean</goal>
            <goal>install</goal>
          </goals>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven-plugin-plugin.version}</version>
        <executions>
          <execution>
            <id>generated-helpmojo</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <!-- Extensions -->
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ftp</artifactId>
        <version>1.0-beta-6</version>
      </extension>
    </extensions>

  </build>

  <!-- Profiles -->
  <profiles>

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

    <!-- Do not use a custom settings file for maven-invoker-plugin
    behind a proxy. See MINVOKER-97. -->
    <profile>
      <id>behind-proxy</id>
      <activation>
        <property>
          <name>http.proxySet</name>
          <value>true</value>
        </property>
      </activation>
      <properties>
        <invoker.settings-file />
      </properties>
    </profile>

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

    <!-- Release profile -->
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <useAgent>true</useAgent>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</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>

    <!-- Adapt some plugins versions when building on Maven 3 -->
    <profile>
      <id>maven-3-build</id>
      <activation>
        <file>
          <exists>${basedir}</exists>
          <!-- Trick... this property is only available on Maven 3. -->
        </file>
      </activation>
      <properties>
        <maven-site-plugin.version>3.0-beta-3</maven-site-plugin.version>
        <maven-project-info-reports-plugin.version>2.2</maven-project-info-reports-plugin.version>
      </properties>
    </profile>

    <!-- Check for plugins and dependencies updates -->
    <profile>
      <id>check-updates</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>versions-maven-plugin</artifactId>
            <version>1.2</version>
            <executions>
              <execution>
                <phase>validate</phase>
                <goals>
                  <goal>display-dependency-updates</goal>
                  <goal>display-plugin-updates</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

  <!-- Reporting and site -->
  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven-site-plugin.version}</version>
        <configuration>
          <outputEncoding>${encoding}</outputEncoding>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${maven-project-info-reports-plugin.version}</version>
      </plugin>
      <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>
          <links>
            <link>http://download-llnw.oracle.com/javase/1.5.0/docs/api</link>
            <link>http://maven.apache.org/ref/${maven.target-version}/apidocs</link>
            <link>http://plexus.codehaus.org/plexus-components/plexus-digest/apidocs</link>
            <link>http://plexus.codehaus.org/plexus-utils/apidocs</link>
            <link>http://junit.sourceforge.net/javadoc</link>
          </links>
          <tagletArtifacts>
            <tagletArtifact>
              <groupId>org.apache.maven.plugin-tools</groupId>
              <artifactId>maven-plugin-tools-javadoc</artifactId>
              <version>2.6</version>
            </tagletArtifact>
          </tagletArtifacts>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>${maven-jxr-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${maven-surefire-report-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>${cobertura-maven-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>${maven-invoker-plugin.version}</version>
        <configuration>
          <reportsDirectory>${project.build.directory}/integration-tests/reports</reportsDirectory>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${maven-pmd-plugin.version}</version>
        <configuration>
          <targetJdk>1.${java.target-version}</targetJdk>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven-checkstyle-plugin.version}</version>
        <configuration>
          <configLocation>config/maven_checks.xml</configLocation>
          <headerLocation>${project.basedir}/src/resources/checkstyle-header.txt</headerLocation>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
        <version>${taglist-maven-plugin.version}</version>
        <configuration>
          <tagListOptions>
            <tagClasses>
              <tagClass>
                <displayName>TODO tags</displayName>
                <tags>
                  <tag>
                    <matchString>todo</matchString>
                    <matchType>ignoreCase</matchType>
                  </tag>
                </tags>
              </tagClass>
              <tagClass>
                <displayName>FIXME tags</displayName>
                <tags>
                  <tag>
                    <matchString>fixme</matchString>
                    <matchType>ignoreCase</matchType>
                  </tag>
                </tags>
              </tagClass>
            </tagClasses>
          </tagListOptions>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-changelog-plugin</artifactId>
        <version>${maven-changelog-plugin.version}</version>
        <configuration>
          <displayChangeSetDetailUrl>${project.scm.url}/commit/%REV%</displayChangeSetDetailUrl>
          <displayFileDetailUrl>${project.scm.url}/tree/master/%FILE%</displayFileDetailUrl>
          <displayFileRevDetailUrl>${project.scm.url}/blob/%REV%/%FILE%</displayFileRevDetailUrl>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

</project>
