<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-search-solr</artifactId>
    <version>5.4.4</version>
  </parent>
  <artifactId>xwiki-platform-search-solr-api</artifactId>
  <name>XWiki Platform - Search - Solr - API</name>
  <description>Solr engine management: configuration, indexing, listeners, script service, etc. This module does not handle the search queries</description>
  <properties>
    <!-- Name to display by the Extension Manager -->
    <xwiki.extension.name>Solr Search API</xwiki.extension.name>
    <xwiki.jacoco.instructionRatio>0.48</xwiki.jacoco.instructionRatio>
  </properties>
  <dependencies>
    <!-- Solr -->
    <dependency>
      <groupId>org.apache.solr</groupId>
      <artifactId>solr-solrj</artifactId>
      <version>${solr.version}</version>
      <exclusions>
        <!-- Solr is using an old version of Woodstox but we need the newer version which is used by our Cache
             module -->
        <exclusion>
          <groupId>org.codehaus.woodstox</groupId>
          <artifactId>wstx-asl</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- Solr is using an old version of Woodstox but we need the newer version which is used by our Cache module -->
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>woodstox-core-asl</artifactId>
      <exclusions>
        <!-- Already part of Java SE 6 -->
      	<exclusion>
      	  <artifactId>stax-api</artifactId>
      	  <groupId>javax.xml.stream</groupId>
      	</exclusion>
      </exclusions>
    </dependency>
    <!-- Embedded Solr instance. -->
    <dependency>
      <groupId>org.apache.solr</groupId>
      <artifactId>solr-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.solr</groupId>
      <artifactId>solr-cell</artifactId>
      <version>${solr.version}</version>
      <exclusions>
        <!-- We want to choose the SLF4J binding only when XWiki is packaged. -->
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Apache Commons -->
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>

    <!-- Apache xalan used for Solr's internal XML operations. -->
    <dependency>
      <groupId>xalan</groupId>
      <artifactId>xalan</artifactId>
    </dependency>

    <!-- XWiki dependencies -->
    <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-environment-api</artifactId>
      <version>${commons.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-oldcore</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-bridge</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-query-manager</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <!-- This is needed at runtime by solrconfig.xml. -->
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-search-solr-plugin</artifactId>
      <version>${project.version}</version>
      <scope>runtime</scope>
    </dependency>

    <!-- Testing dependencies -->

    <!-- Since we're mocking a class (XWiki) we need those -->
    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-test-component</artifactId>
      <version>${commons.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <excludes>
            **/DefaultSolrIndexer.java,
            **/SolrIndexEventListener.java,
            **/AbstractSolrMetadataExtractor.java
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
