<?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>7.1-rc-1</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>
  <dependencies>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.restlet.jse</groupId>
      <artifactId>org.restlet</artifactId>
      <version>${restlet.version}</version>
    </dependency>
    <dependency>
      <groupId>org.restlet.jee</groupId>
      <artifactId>org.restlet.ext.servlet</artifactId>
      <version>${restlet.version}</version>
      <exclusions>
        <!-- Restlet API is already provided above -->
        <exclusion>
          <groupId>org.restlet.jee</groupId>
          <artifactId>org.restlet</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.restlet.jse</groupId>
      <artifactId>org.restlet.ext.jaxrs</artifactId>
      <version>${restlet.version}</version>
      <exclusions>
        <!-- Already part of Java SE 6 -->
        <exclusion>
          <artifactId>jaxb-api</artifactId>
          <groupId>javax.xml.bind</groupId>
        </exclusion>
        <!-- Already part of Java SE 6 -->
        <exclusion>
          <artifactId>stax-api</artifactId>
          <groupId>javax.xml.stream</groupId>
        </exclusion>
        <!-- Exclude Servlet API 2.5 which is not declared as provided. And we use a newer version too. -->
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
        </exclusion>
        <!-- Already part of Java SE 6 -->
        <exclusion>
          <artifactId>jaxb-impl</artifactId>
          <groupId>com.sun.xml.bind</groupId>
        </exclusion>
      </exclusions>
    </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>
      <version>${restlet.version}</version>
      <scope>runtime</scope>
    </dependency>
    <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. -->
      <groupId>org.restlet.jse</groupId>
      <artifactId>org.restlet.ext.jaxb</artifactId>
      <version>${restlet.version}</version>
      <scope>runtime</scope>
      <exclusions>
        <!-- Already part of Java SE 6 -->
        <exclusion>
          <artifactId>jaxb-api</artifactId>
          <groupId>javax.xml.bind</groupId>
        </exclusion>
        <!-- Already part of Java SE 6 -->
        <exclusion>
          <artifactId>stax-api</artifactId>
          <groupId>javax.xml.stream</groupId>
        </exclusion>
        <!-- Already part of Java SE 6 -->
        <exclusion>
          <artifactId>jaxb-impl</artifactId>
          <groupId>com.sun.xml.bind</groupId>
        </exclusion>
      </exclusions>
    </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-rest-api</artifactId>
      <version>${project.version}</version>
    </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.xwiki.commons</groupId>
      <artifactId>xwiki-commons-component-api</artifactId>
      <version>${commons.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jvnet.jaxb2_commons</groupId>
      <artifactId>jaxb2-fluent-api</artifactId>
      <version>3.0</version>
    </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>
          <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/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>
      </plugin>
    </plugins>
  </build>
</project>
