<?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.filemanager</groupId>
    <artifactId>application-filemanager</artifactId>
    <version>2.9.0</version>
  </parent>
  <artifactId>application-filemanager-api</artifactId>
  <name>File Manager Application (Pro) API</name>
  <packaging>jar</packaging>
  <description>APIs to manage files and folders.</description>
  <properties>
    <xwiki.jacoco.instructionRatio>0.81</xwiki.jacoco.instructionRatio>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-script</artifactId>
      <version>${commons.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-job-api</artifactId>
      <version>${commons.version}</version>
    </dependency>
    <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-model-api</artifactId>
      <version>${platform.version}</version>
    </dependency>
    <!-- Used to create temporary files when packing files and folders. -->
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-resource-temporary</artifactId>
      <version>${platform.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-oldcore</artifactId>
      <version>${platform.version}</version>
    </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>
      <!-- Required in order to mock XWikiContext -->
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.revapi</groupId>
        <artifactId>revapi-maven-plugin</artifactId>
        <configuration>
          <analysisConfiguration><![CDATA[
            {
              "revapi": {
                "ignore" : [
                  {
                    "code": "java.class.removed",
                    "old": "class org.xwiki.filemanager.job.JobStatusAdapter",
                    "justification": "This class was used to overcome a problem that is not present anymore."
                  },
                  {
                    "code": "java.method.numberOfParametersChanged",
                    "old": "method void org.xwiki.filemanager.job.PackJobStatus::<init>(org.xwiki.job.event.status.JobStatus)",
                    "new": "method void org.xwiki.filemanager.job.PackJobStatus::<init>(java.lang.String, org.xwiki.filemanager.job.PackRequest, org.xwiki.job.event.status.JobStatus, org.xwiki.observation.ObservationManager, org.xwiki.logging.LoggerManager)",
                    "package": "org.xwiki.filemanager.job",
                    "classSimpleName": "PackJobStatus",
                    "methodName": "<init>",
                    "elementKind": "constructor",
                    "justification": "PackJobStatus is now extending AbstractJobStatus."
                  },
                  {
                    "code": "java.class.noLongerInheritsFromClass",
                    "old": "class org.xwiki.filemanager.job.PackJobStatus",
                    "new": "class org.xwiki.filemanager.job.PackJobStatus",
                    "justification": "PackJobStatus no longer extends JobStatusAdapter."
                  },
                  {
                    "code": "java.class.noLongerImplementsInterface",
                    "old": "class org.xwiki.filemanager.job.PackJobStatus",
                    "new": "class org.xwiki.filemanager.job.PackJobStatus",
                    "justification": "PackJobStatus no longer implements Serializable."
                  },
                  {
                    "code": "java.class.removed",
                    "old": "class org.xwiki.filemanager.internal.job.AbstractJobAdapter",
                    "justification": "Internal API"
                  },
                  {
                    "code": "java.method.removed",
                    "old": "method org.xwiki.filemanager.job.PackJobStatus org.xwiki.filemanager.internal.job.PackJob::getPackStatus()",
                    "justification": "Internal API"
                  },
                  {
                    "code": "java.class.removed",
                    "old": "class org.xwiki.filemanager.internal.job.PackJobAdapter",
                    "justification": "Internal API"
                  },
                  {
                    "code": "java.method.returnTypeChangedCovariantly",
                    "old": "method org.xwiki.job.Request org.xwiki.filemanager.job.JobStatusAdapter::getRequest() @ org.xwiki.filemanager.job.PackJobStatus",
                    "new": "method R org.xwiki.job.AbstractJobStatus<R extends org.xwiki.job.Request>::getRequest() @ org.xwiki.filemanager.job.PackJobStatus",
                    "oldType": "org.xwiki.job.Request",
                    "newType": "org.xwiki.filemanager.job.PackRequest",
                    "package": "org.xwiki.filemanager.job",
                    "classSimpleName": "PackJobStatus",
                    "methodName": "getRequest",
                    "elementKind": "method",
                    "justification": "Not a real API breackage"
                  },
                  {
                    "code": "java.class.nonFinalClassInheritsFromNewClass",
                    "old": "class org.xwiki.filemanager.job.PackJobStatus",
                    "new": "class org.xwiki.filemanager.job.PackJobStatus",
                    "superClass": "org.xwiki.job.AbstractJobStatus<org.xwiki.filemanager.job.PackRequest>",
                    "package": "org.xwiki.filemanager.job",
                    "classSimpleName": "PackJobStatus",
                    "elementKind": "class",
                    "justification": "PackJobStatus no longer extends JobStatusAdapter."
                  },
                  {
                    "code": "java.class.nonFinalClassInheritsFromNewClass",
                    "old": "class org.xwiki.model.reference.DocumentReference",
                    "new": "class org.xwiki.model.reference.DocumentReference",
                    "superClass": "org.xwiki.model.reference.AbstractLocalizedEntityReference",
                    "justification": "Not a breakage"
                  },
                  {
                    "code": "java.class.nonFinalClassInheritsFromNewClass",
                    "old": "class org.xwiki.model.reference.LocalDocumentReference",
                    "new": "class org.xwiki.model.reference.LocalDocumentReference",
                    "superClass": "org.xwiki.model.reference.AbstractLocalizedEntityReference",
                    "justification": "Not a breakage"
                  }
                ]
              }
            }
          ]]></analysisConfiguration>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>