<?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>com.xwiki.mocca-calendar</groupId>
    <artifactId>application-mocca-calendar</artifactId>
    <version>2.18.2</version>
  </parent>
  <artifactId>application-mocca-calendar-api</artifactId>
  <name>Calendar Application - API</name>
  <description>API for the Calendar Application (Pro)</description>
  <properties>
    <!-- Test coverage -->
    <xwiki.jacoco.instructionRatio>0.0</xwiki.jacoco.instructionRatio>
    <!-- Name to display by the Extension Manager -->
    <xwiki.extension.name>Calendar Application API</xwiki.extension.name>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-observation-api</artifactId>
      <version>${commons.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-query-manager</artifactId>
      <version>${platform.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-rendering-wikimacro-api</artifactId>
      <version>${platform.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-oldcore</artifactId>
      <version>${platform.version}</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.xwiki.contrib</groupId>
      <artifactId>macro-fullcalendar-api</artifactId>
      <version>2.5.1</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-wysiwyg-api</artifactId>
      <version>${platform.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.webjars.npm/dompurify -->
    <dependency>
      <groupId>org.webjars.npm</groupId>
      <artifactId>dompurify</artifactId>
      <version>3.3.0</version>
      <scope>runtime</scope>
    </dependency>

    <!-- Test Dependencies -->
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-tool-test-component</artifactId>
      <version>${commons.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-job-api</artifactId>
      <version>${platform.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-rest-server</artifactId>
      <version>${platform.version}</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mnode.ical4j</groupId>
      <artifactId>ical4j</artifactId>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <!-- Apply the Checkstyle configurations defined in the top level pom.xml file -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <excludes>
            <!-- known issue: the script service does far too much -->
            org/xwiki/contrib/moccacalendar/script/MoccaCalendarScriptService.java,
            <!-- this class encapsulates a mistake of not using XWQL and should go away
              checkstyle creates mostly pointless errors about multiple string literals from queries -->
            org/xwiki/contrib/moccacalendar/internal/utils/EventQuery.java,
            <!-- Class Fan-Out Complexity is XX (max allowed is 20): should be ok for a migrator -->
            org/xwiki/contrib/moccacalendar/migrations/AddReccurrentProperty.java
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.revapi</groupId>
        <artifactId>revapi-maven-plugin</artifactId>
        <configuration>
          <analysisConfiguration>
            <revapi.filter>
              <archives>
                <!-- We're ignoring all API incompatibilities from XWiki dependencies (i.e. commons and rendering)
                     since they're already covered by their own builds and we release all of them together. -->
                <exclude>
                  <item>org\.xwiki\.platform:.*:.*</item>
                </exclude>
              </archives>
            </revapi.filter>
          </analysisConfiguration>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
