<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.xwiki.rendering</groupId>
    <artifactId>xwiki-rendering-legacy-transformations</artifactId>
    <version>15.10.9</version>
  </parent>
  <artifactId>xwiki-rendering-legacy-transformation-macro</artifactId>
  <name>XWiki Rendering - Legacy - Transformation - Macro</name>
  <packaging>jar</packaging>
  <description>Legacy module for xwiki-rendering-transformation-macro</description>
  <properties>
    <xwiki.jacoco.instructionRatio>0.04</xwiki.jacoco.instructionRatio>
    <!-- The features provided by this module so that it's found when resolving extension. -->
    <xwiki.extension.features>org.xwiki.rendering:xwiki-rendering-transformation-macro</xwiki.extension.features>
  </properties>
  <dependencies>
    <!-- Trigger xwiki-rendering-transformation-macro dependencies (but without xwiki-rendering-transformation-macro jar itself). -->
    <dependency>
      <groupId>org.xwiki.rendering</groupId>
      <artifactId>xwiki-rendering-transformation-macro</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
    </dependency>
    <!-- We need this dependency so that the wrapped module is built before this one. -->
    <dependency>
      <groupId>org.xwiki.rendering</groupId>
      <artifactId>xwiki-rendering-transformation-macro</artifactId>
      <version>${project.version}</version>
      <!-- We don't want to draw this dependency since we're wrapping it. -->
      <scope>provided</scope>
    </dependency>
    <!-- Testing Dependencies. -->
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-tool-test-component</artifactId>
      <version>${commons.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <!-- Apply Compatibility Aspects. -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>backward-compatibility-aspects</id>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <weaveDependencies>
            <weaveDependency>
              <groupId>org.xwiki.rendering</groupId>
              <artifactId>xwiki-rendering-transformation-macro</artifactId>
            </weaveDependency>
          </weaveDependencies>
        </configuration>
      </plugin>
      <!-- Exclude AspectJ's builddef.lst file form the generated JAR since it's not useful there. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/builddef.lst</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <classpathDependencyExcludes>
            <classpathDependencyExcludes>org.xwiki.rendering:xwiki-rendering-transformation-macro:jar</classpathDependencyExcludes>
          </classpathDependencyExcludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>fr.inria.gforge.spoon</groupId>
        <artifactId>spoon-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>spoon-test</id>
            <configuration>
              <!-- TODO: Remove once https://github.com/INRIA/spoon/issues/3583 is fixed -->
              <skip>true</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>