<?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.rendering</groupId>
    <artifactId>xwiki-rendering</artifactId>
    <version>13.4.6</version>
  </parent>
  <artifactId>xwiki-rendering-macros</artifactId>
  <name>XWiki Rendering - Macros - Parent POM</name>
  <packaging>pom</packaging>
  <description>Macros implementations supported by XWiki Platform</description>
  <dependencies>
    <dependency>
      <groupId>org.xwiki.rendering</groupId>
      <artifactId>xwiki-rendering-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.rendering</groupId>
      <artifactId>xwiki-rendering-transformation-macro</artifactId>
      <version>${project.version}</version>
    </dependency>
    <!-- Testing dependencies -->
    <dependency>
      <groupId>org.xwiki.rendering</groupId>
      <artifactId>xwiki-rendering-syntax-xwiki21</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.rendering</groupId>
      <artifactId>xwiki-rendering-syntax-event</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.rendering</groupId>
      <artifactId>xwiki-rendering-syntax-xhtml</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-component-default</artifactId>
      <version>${commons.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.rendering</groupId>
      <artifactId>xwiki-rendering-test</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <!-- Ensure that no macro module uses the HTML macro. We want to ensure this since we want to let users be
           able to disable the HTML macro (for security reasons) and the rest of XWiki should continue to work fine
      -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-banned-dependencies</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <bannedDependencies>
                  <excludes>
                    <exclude>org.xwiki.rendering:xwiki-rendering-macro-html:*:jar:*</exclude>
                  </excludes>
                  <message>
We need to be able to turn off the HTML Macro and still have a working system.
Thus it is forbidden to depend on the HTML Macro.
                   </message>
                </bannedDependencies>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>      
    </plugins>
  </build>
  <modules>
    <!-- Sorted Alphabetically -->
    <module>xwiki-rendering-macro-box</module>
    <module>xwiki-rendering-macro-comment</module>
    <module>xwiki-rendering-macro-content</module>
    <module>xwiki-rendering-macro-ctsreport</module>
    <module>xwiki-rendering-macro-figure</module>
    <module>xwiki-rendering-macro-footnotes</module>
    <module>xwiki-rendering-macro-html</module>
    <module>xwiki-rendering-macro-id</module>
    <module>xwiki-rendering-macro-message</module>
    <module>xwiki-rendering-macro-raw</module>
    <module>xwiki-rendering-macro-toc</module>
  </modules>
</project>
