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

<!--
  #%L
  License Maven Plugin
  %%
  Copyright (C) 2011-2012 CodeLutin, Codehaus, tony Chzemit
  %%
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as
  published by the Free Software Foundation, either version 3 of the
  License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Lesser Public License for more details.

  You should have received a copy of the GNU General Lesser Public
  License along with this program.  If not, see
  <http://www.gnu.org/licenses/lgpl-3.0.html>.
  #L%
-->

<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">
  <parent>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>mojo-parent</artifactId>
    <version>30</version>
    <relativePath>../mojo-parent/pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>license-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <name>License Maven Plugin</name>
  <version>1.4</version>
  <description>Maven plugin to download and collect license files from project dependencies.</description>

  <scm>
    <connection>scm:svn:http://svn.codehaus.org/mojo/tags/license-maven-plugin-1.4</connection>
    <developerConnection>scm:svn:https://svn.codehaus.org/mojo/tags/license-maven-plugin-1.4</developerConnection>
    <url>http://fisheye.codehaus.org/browse/mojo/tags/license-maven-plugin-1.4</url>
  </scm>

  <issueManagement>
    <system>JIRA</system>
    <url>http://jira.codehaus.org/browse/MLICENSE</url>
  </issueManagement>
  <ciManagement>
    <system>bamboo</system>
    <url>http://bamboo.ci.codehaus.org/browse/MOJO-LICENSECI</url>
  </ciManagement>

  <inceptionYear>2010</inceptionYear>
  <licenses>
    <license>
      <name>The GNU Lesser General Public License, Version 3.0</name>
      <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Tony Chemit</name>
      <email>chemit at codelutin dot com</email>
      <roles>
        <role>Lead Developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <name>Paul Gier</name>
      <email>pgier at redhat</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
  </developers>

  <contributors>
    <contributor>
      <name>Curtis Rueden</name>
    </contributor>
    <contributor>
      <name>Chris Manning</name>
    </contributor>
    <contributor>
      <name>Jérôme Joslet</name>
    </contributor>
    <contributor>
        <name>Benson Margulies</name>
        <email>bimargulies at apache</email>
    </contributor>
  </contributors>

  <prerequisites>
    <maven>${mavenVersion}</maven>
  </prerequisites>

  <!-- tchemit-20120620 Do not remove this, it is used to deploy SNAPSHOT site -->
  <url>http://mojo.codehaus.org/license-maven-plugin</url>
  <distributionManagement>
    <site>
      <id>codehaus.org</id>
      <name>Mojo Website</name>
      <url>dav:https://dav.codehaus.org/mojo/license-maven-plugin</url>
    </site>
  </distributionManagement>

  <properties>
    <mojo.java.target>1.5</mojo.java.target>
    <mavenVersion>2.2.1</mavenVersion>
    <processorVersion>1.3</processorVersion>

    <doxiaVersion>1.3</doxiaVersion>
    <doxia-sitetoolsVersion>1.3</doxia-sitetoolsVersion>
    <it.debug>true</it.debug>

    <!-- license configuration -->
    <license.useMissingFile>true</license.useMissingFile>
    <license.failIfWarning>true</license.failIfWarning>
    <license.licenseName>lgpl_v3</license.licenseName>
    <licensePluginVersion>1.3</licensePluginVersion>

    <pluginPluginVersion>3.2</pluginPluginVersion>
    <sitePluginVersion>3.2</sitePluginVersion>
    <invokerPluginVersion>1.8</invokerPluginVersion>
    <javadocPluginVersion>2.9</javadocPluginVersion>

  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${mavenVersion}</version>
      <scope>provided</scope>
      <exclusions>

        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>jcl-over-slf4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-cli</groupId>
          <artifactId>commons-cli</artifactId>
        </exclusion>

      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-api</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-impl</artifactId>
      <version>2.2</version>
    </dependency>

    <!-- Doxia -->
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-core</artifactId>
      <version>${doxiaVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-sink-api</artifactId>
      <version>${doxiaVersion}</version>
    </dependency>

    <!-- Doxia-sitetools -->
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-site-renderer</artifactId>
      <version>${doxia-sitetoolsVersion}</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-container-default</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>dom4j</groupId>
          <artifactId>dom4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>antlr</groupId>
          <artifactId>antlr</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- dependencies to annotations -->
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>${pluginPluginVersion}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0.10</version>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-container-default</artifactId>
      <version>1.0-alpha-9-stable-1</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.nuiton.processor</groupId>
      <artifactId>nuiton-processor</artifactId>
      <version>${processorVersion}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.1</version>
    </dependency>

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1.1</version>
    </dependency>

    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.2.1</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.2</version>
    </dependency>

    <dependency>
      <groupId>org.freemarker</groupId>
      <artifactId>freemarker</artifactId>
      <version>2.3.19</version>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <!-- expose new plexus components -->
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate-metadata</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>create-component-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
      </plugin>
      <!-- 
           To test reading third party data from an artifact, we need an artifact.
           In the aggregate case, we can't depend on it in the reactor, since
           there's no way to get any other reactor execution to create it 
           in the forked execution of aggregate-add-third-party, not unless
           we want involved in a custom lifecycle. So this barnicle exists
           so that the tests can use it. It's a pity it will end up on Central.
      -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.7</version>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>src/license-test/test.license.properties</file>
                  <type>license.properties</type>
                  <classifier>test-third-party</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-metadata</artifactId>
          <version>1.5.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${javadocPluginVersion}</version>
          <configuration>
            <quiet>true</quiet>
            <tagletArtifacts>
              <tagletArtifact>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-tools-javadoc</artifactId>
                <version>${pluginPluginVersion}</version>
              </tagletArtifact>
              <tagletArtifact>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-javadoc</artifactId>
                <version>1.5.5</version>
              </tagletArtifact>
            </tagletArtifacts>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${pluginPluginVersion}</version>
          <configuration>
            <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>run-its</id>
      <activation>
        <property>
          <name>maven.test.skip</name>
          <value>!true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>${invokerPluginVersion}</version>
            <configuration>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <settingsFile>src/it/settings.xml</settingsFile>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <extraArtifacts>
                    <extraArtifact>${project.groupId}:${project.artifactId}:${project.version}:license.properties:test-third-party</extraArtifact>
                  </extraArtifacts>
                  <pomExcludes>
                    <pomExclude>MLICENSE-4/pom.xml</pomExclude>
                  </pomExcludes>
                </configuration>
              </execution>
              <!-- as this it is run in offline, then execute it after the previous its... -->
              <execution>
                <id>integration-test-offline</id>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <pomIncludes>
                    <pomInclude>MLICENSE-4/pom.xml</pomInclude>
                  </pomIncludes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>mojo-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>${licensePluginVersion}</version>
            <executions>
              <execution>
                <goals>
                  <goal>add-third-party</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>reporting</id>
      <activation>
        <property>
          <name>skipReports</name>
          <value>!true</value>
        </property>
      </activation>

      <reporting>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>${invokerPluginVersion}</version>
          </plugin>

          <plugin>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <configuration>
              <headerLocation>config/checkstyle-header.txt</headerLocation>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${javadocPluginVersion}</version>
            <configuration>
              <quiet>true</quiet>
              <tagletArtifacts>
                <tagletArtifact>
                  <groupId>org.apache.maven.plugin-tools</groupId>
                  <artifactId>maven-plugin-tools-javadoc</artifactId>
                  <version>${pluginPluginVersion}</version>
                </tagletArtifact>
                <tagletArtifact>
                  <groupId>org.codehaus.plexus</groupId>
                  <artifactId>plexus-component-javadoc</artifactId>
                  <version>1.5.5</version>
                </tagletArtifact>
              </tagletArtifacts>
            </configuration>
            <reportSets>
              <reportSet>
                <reports>
                  <report>javadoc</report>
                  <report>test-javadoc</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

          <plugin>
            <artifactId>maven-plugin-plugin</artifactId>
            <version>${pluginPluginVersion}</version>
            <configuration>
              <requirements>
                <!--
                NOTE: Maven 2.x does not interpolate properties of the form project.*|pom.* so the Maven Plugin Plugin
                gets garbage when manually examining the config of the Maven Compiler Plugin.
                -->
                <jdk>${mojo.java.target}</jdk>
              </requirements>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>${licensePluginVersion}</version>
            <reportSets>
              <reportSet>
                <reports>
                  <report>third-party-report</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>versions-maven-plugin</artifactId>
            <version>2.0</version>
            <reportSets>
              <reportSet>
                <reports>
                  <report>dependency-updates-report</report>
                  <report>plugin-updates-report</report>
                  <report>property-updates-report</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
        </plugins>
      </reporting>
    </profile>
  </profiles>
</project>
