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

<!--
 *
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This 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 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
-->

<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>org.xwiki.commons</groupId>
    <artifactId>xwiki-commons-tool-xar</artifactId>
    <version>4.5.2</version>
  </parent>
  <artifactId>xwiki-commons-tool-xar-plugin</artifactId>
  <name>XWiki Commons - Tools - XAR Tools - XAR Plugin</name>
  <packaging>maven-plugin</packaging>
  <description>XWiki Commons - Tools - XAR Tools - XAR Plugin</description>
  <properties>
    <mavenVersion>3.0.4</mavenVersion>
  </properties>
  <dependencies>
    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-archiver</artifactId>
      <version>2.1.1</version>
    </dependency>
    <!-- Required by the Format mojo to write XML files -->
    <dependency>
      <artifactId>jaxen</artifactId>
      <groupId>jaxen</groupId>
      <version>1.1.1</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <!-- TODO: Need to find out what ArtifactResolver has been replaced by in Maven 3.x and upddate the plugin code -->
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <!-- Used to get access to the Maven Logger to log on the console -->
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-container-default</artifactId>
      <version>1.5.5</version>
      <exclusions>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
      </exclusions>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <configuration>
          <!-- This to allow calling mvn xar:<mojo> from the command line. For example mvn xar:format
               Without this users would need to call mvn xwiki-commons-tool-xar-plugin:format -->
          <goalPrefix>xar</goalPrefix>
        </configuration>
      </plugin>
      <plugin>
        <!-- Note: We duplicate the configuration located in xwiki-commons-pom since commons tools use xwiki-commons
             as their parent pom and not xwiki-commons-pom. This is to avoid a circular dependency since
             xwiki-commons-pom uses the xwiki-commons-tool-validation-resources artifact. -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.xwiki.commons</groupId>
            <artifactId>xwiki-commons-tool-verification-resources</artifactId>
            <version>${project.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <configLocation>checkstyle.xml</configLocation>
          <excludes>
              **/AbstractXARMojo.java,
              **/UnXARMojo.java,
              **/XARMojo.java,
              **/VerifyMojo.java,
              **/FormatMojo.java
          </excludes>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
