<?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.platform</groupId>
    <artifactId>xwiki-platform-rest</artifactId>
    <version>10.7</version>
  </parent>
  <artifactId>xwiki-platform-rest-server</artifactId>
  <packaging>jar</packaging>
  <name>XWiki Platform - REST - Server</name>
  <description>Service for accessing XWiki through a RESTful API</description>
  <properties>
    <xwiki.jacoco.instructionRatio>0.09</xwiki.jacoco.instructionRatio>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-component-api</artifactId>
      <version>${commons.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-context</artifactId>
      <version>${commons.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-job</artifactId>
      <version>${commons.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-repository-model</artifactId>
      <version>${commons.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-script</artifactId>
      <version>${commons.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.rendering</groupId>
      <artifactId>xwiki-rendering-api</artifactId>
      <version>${rendering.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-rest-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-rest-model</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-localization-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-model</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-query-manager</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-rendering-configuration-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-security-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-wiki-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.restlet.jse</groupId>
      <artifactId>org.restlet</artifactId>
    </dependency>
    <dependency>
      <groupId>org.restlet.jee</groupId>
      <artifactId>org.restlet.ext.servlet</artifactId>
    </dependency>
    <dependency>
      <groupId>org.restlet.jse</groupId>
      <artifactId>org.restlet.ext.jaxrs</artifactId>
    </dependency>
    <!-- Replace the version triggered by restlet by a more accurate and up to date one -->
    <dependency>
      <groupId>com.tdunning</groupId>
      <artifactId>json</artifactId>
    </dependency>
    <dependency>
      <!-- We need Jackson for a proper JSON representation of our REST resources.
        See XWIKI-9136: Rest API JSON does not retrieve inherited fields -->
      <groupId>org.restlet.jse</groupId>
      <artifactId>org.restlet.ext.jackson</artifactId>
    </dependency>
    <!-- We need a JAXB converter for XML representation because we model our REST resources using JAXB. Jackson (see
        above) has a module that understands JAXB annotations but the output of the Restlet Jackson converter is not very
        good (missing XML declaration and namespace, attributes serialized as elements) so we prefer to use a dedicated
        JAXB converter for XML representation. -->
    <dependency>
      <groupId>org.restlet.jse</groupId>
      <artifactId>org.restlet.ext.jaxb</artifactId>
    </dependency>
    <!-- Replace the version triggered by Restlet by a more accurate one -->
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
    </dependency>

    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-oldcore</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-wiki-user-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jvnet.jaxb2_commons</groupId>
      <artifactId>jaxb2-fluent-api</artifactId>
      <version>3.0</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-icon-api</artifactId>
      <version>${project.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>
  </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>
        <executions>
          <execution>
            <!-- Specify the "default" execution id so that the "blocker" one is always executed -->
            <id>default</id>
            <configuration>
              <failsOnError>true</failsOnError>
              <suppressionsLocation>${basedir}/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
              <excludes>
                org/xwiki/rest/internal/ComponentsObjectFactory.java,
                org/xwiki/rest/Constants.java,
                org/xwiki/rest/internal/Constants.java,
                org/xwiki/rest/internal/DomainObjectFactory.java,
                org/xwiki/rest/internal/ModelFactory.java,
                org/xwiki/rest/internal/exceptions/QueryExceptionMapper.java,
                org/xwiki/rest/internal/exceptions/XWikiExceptionMapper.java,
                org/xwiki/rest/internal/RangeIterable.java,
                org/xwiki/rest/Relations.java,
                org/xwiki/rest/internal/representations/comments/FormUrlEncodedCommentReader.java,
                org/xwiki/rest/internal/representations/comments/TextPlainCommentReader.java,
                org/xwiki/rest/internal/representations/objects/FormUrlEncodedObjectReader.java,
                org/xwiki/rest/internal/representations/objects/FormUrlEncodedPropertyReader.java,
                org/xwiki/rest/internal/representations/objects/TextPlainPropertyReader.java,
                org/xwiki/rest/internal/representations/pages/FormUrlEncodedPageReader.java,
                org/xwiki/rest/internal/representations/pages/TextPlainPageReader.java,
                org/xwiki/rest/internal/representations/tags/FormUrlEncodedTagsReader.java,
                org/xwiki/rest/internal/representations/tags/TextPlainTagsReader.java,
                org/xwiki/rest/internal/representations/TextPlainReader.java,
                org/xwiki/rest/internal/resources/attachments/AttachmentAtPageVersionResourceImpl.java,
                org/xwiki/rest/internal/resources/attachments/AttachmentHistoryResourceImpl.java,
                org/xwiki/rest/internal/resources/attachments/AttachmentResourceImpl.java,
                org/xwiki/rest/internal/resources/attachments/AttachmentsAtPageVersionResourceImpl.java,
                org/xwiki/rest/internal/resources/attachments/AttachmentsResourceImpl.java,
                org/xwiki/rest/internal/resources/attachments/AttachmentVersionResourceImpl.java,
                org/xwiki/rest/internal/resources/BaseAttachmentsResource.java,
                org/xwiki/rest/internal/resources/BaseSearchResult.java,
                org/xwiki/rest/internal/resources/BrowserAuthenticationResource.java,
                org/xwiki/rest/internal/resources/classes/ClassesResourceImpl.java,
                org/xwiki/rest/internal/resources/classes/ClassPropertiesResourceImpl.java,
                org/xwiki/rest/internal/resources/classes/ClassPropertyResourceImpl.java,
                org/xwiki/rest/internal/resources/classes/ClassResourceImpl.java,
                org/xwiki/rest/internal/resources/comments/CommentResourceImpl.java,
                org/xwiki/rest/internal/resources/comments/CommentsResourceImpl.java,
                org/xwiki/rest/internal/resources/comments/CommentsVersionResourceImpl.java,
                org/xwiki/rest/internal/resources/comments/CommentVersionResourceImpl.java,
                org/xwiki/rest/internal/resources/ModificationsResourceImpl.java,
                org/xwiki/rest/internal/resources/objects/AllObjectsForClassNameResourceImpl.java,
                org/xwiki/rest/internal/resources/objects/BaseObjectsResource.java,
                org/xwiki/rest/internal/resources/objects/ObjectAtPageVersionResourceImpl.java,
                org/xwiki/rest/internal/resources/objects/ObjectPropertiesAtPageVersionResourceImpl.java,
                org/xwiki/rest/internal/resources/objects/ObjectPropertiesResourceImpl.java,
                org/xwiki/rest/internal/resources/objects/ObjectPropertyAtPageVersionResourceImpl.java,
                org/xwiki/rest/internal/resources/objects/ObjectPropertyResourceImpl.java,
                org/xwiki/rest/internal/resources/objects/ObjectResourceImpl.java,
                org/xwiki/rest/internal/resources/objects/ObjectsAtPageVersionResourceImpl.java,
                org/xwiki/rest/internal/resources/objects/ObjectsForClassNameResourceImpl.java,
                org/xwiki/rest/internal/resources/objects/ObjectsResourceImpl.java,
                org/xwiki/rest/internal/resources/pages/ModifiablePageResource.java,
                org/xwiki/rest/internal/resources/pages/PageChildrenResourceImpl.java,
                org/xwiki/rest/internal/resources/pages/PageHistoryResourceImpl.java,
                org/xwiki/rest/internal/resources/pages/PageResourceImpl.java,
                org/xwiki/rest/internal/resources/pages/PagesResourceImpl.java,
                org/xwiki/rest/internal/resources/pages/PageTagsResourceImpl.java,
                org/xwiki/rest/internal/resources/pages/PageTranslationHistoryResourceImpl.java,
                org/xwiki/rest/internal/resources/pages/PageTranslationResourceImpl.java,
                org/xwiki/rest/internal/resources/pages/PageTranslationsResourceImpl.java,
                org/xwiki/rest/internal/resources/pages/PageTranslationVersionResourceImpl.java,
                org/xwiki/rest/internal/resources/pages/PageVersionResourceImpl.java,
                org/xwiki/rest/internal/resources/RootResourceImpl.java,
                org/xwiki/rest/internal/resources/spaces/SpaceAttachmentsResourceImpl.java,
                org/xwiki/rest/internal/resources/spaces/SpaceResourceImpl.java,
                org/xwiki/rest/internal/resources/spaces/SpaceSearchResourceImpl.java,
                org/xwiki/rest/internal/resources/spaces/SpacesResourceImpl.java,
                org/xwiki/rest/internal/resources/SyntaxesResourceImpl.java,
                org/xwiki/rest/internal/resources/search/*,
                org/xwiki/rest/internal/resources/tags/PagesForTagsResourceImpl.java,
                org/xwiki/rest/internal/resources/tags/TagsResourceImpl.java,
                org/xwiki/rest/internal/resources/wikis/WikiAttachmentsResourceImpl.java,
                org/xwiki/rest/internal/resources/wikis/WikiPagesResourceImpl.java,
                org/xwiki/rest/internal/resources/wikis/WikiSearchResourceImpl.java,
                org/xwiki/rest/internal/resources/wikis/WikiSearchQueryResourceImpl.java,
                org/xwiki/rest/internal/resources/wikis/WikisResourceImpl.java,
                org/xwiki/rest/internal/Utils.java,
                org/xwiki/rest/internal/XWikiAuthentication.java,
                org/xwiki/rest/internal/XWikiJaxRsApplication.java,
                org/xwiki/rest/XWikiResource.java,
                org/xwiki/rest/internal/XWikiRestletServlet.java
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
