<?xml version="1.0" encoding="UTF-8"?>
<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.fcrepo</groupId>
    <artifactId>fcrepo-jms-indexer-pluggable</artifactId>
    <version>4.0.0-beta-01</version>
  </parent>

  <artifactId>fcrepo-jms-indexer-core</artifactId>
  <name>${project.artifactId}</name>
  <description>Fedora JMS Indexer Core</description>
  <packaging>jar</packaging>

  <dependencies>
    <dependency>
      <groupId>javax.jms</groupId>
      <artifactId>jms-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jms</artifactId>
    </dependency>

    <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    
    <dependency>
      <groupId>com.sun.jersey.contribs</groupId>
      <artifactId>jersey-spring</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.sun.jersey.jersey-test-framework</groupId>
      <artifactId>jersey-test-framework-grizzly2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-servlet</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-http-commons</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>lucene-core</artifactId>
          <groupId>org.apache.lucene</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-http-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-transform</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>log4j-over-slf4j</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-kernel</artifactId>
    </dependency>
    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-kernel-impl</artifactId>
    </dependency>
    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-jms</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-http-commons</artifactId>
      <scope>test</scope>
      <type>test-jar</type>
    </dependency>

    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-fuseki</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- Start of Solr Indexer libs -->
    <dependency>
      <groupId>org.apache.solr</groupId>
      <artifactId>solr-core</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>log4j</artifactId>
          <groupId>log4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <!--   <dependency>
      <groupId>org.apache.solr</groupId>
      <artifactId>solr-test-framework</artifactId>
    </dependency> -->
    <!--  HttpClient are used for create standardalone SolrIndexer Server client.
     They seem to be included with Solr 3.6.2?
     Ver 4.2.5 aim to fit JENA included version -->
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpmime</artifactId>
    </dependency>
    <!-- End of Solr Indexer libs -->
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.2.4</version>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <plugins>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <DependencyConvergence />
                <bannedDependencies>
                  <searchTransitive>true</searchTransitive>
                  <excludes>
                    <exclude>commons-logging</exclude>
                    <!--log4j needed in 'test' fuseki-->
                    <!--<exclude>log4j:log4j</exclude>-->
                    <exclude>org.slf4j:slf4j-jcl</exclude>
                    <exclude>org.slf4j:slf4j-jdk14</exclude>
                    <!--log4j12 needed in 'test' fuseki-->
                    <!--<exclude>org.slf4j:slf4j-log4j12</exclude>-->
                    <exclude>org.slf4j:slf4j-log4j13</exclude>
                    <exclude>org.slf4j:slf4j-nop</exclude>
                    <exclude>org.slf4j:slf4j-simple</exclude>
                    <exclude>org.apache.cxf</exclude>
                  </excludes>
                </bannedDependencies>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <!-- reserve ports for integration tests -->
        <configuration>
          <portNames>
            <portName>test.port</portName>
            <portName>test.mgt.port</portName>
            <portName>test.fuseki.port</portName>
          </portNames>
        </configuration>
        <executions>
          <execution>
            <id>reserve-port</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>reserve-network-port</goal>
            </goals>
          </execution>
        </executions>

      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <!-- export ports for integration tests to system.env-->
          <systemPropertyVariables>
            <test.port>${test.port}</test.port>
            <test.mgt.port>${test.mgt.port}</test.mgt.port>
            <test.fuseki.port>${test.fuseki.port}</test.fuseki.port>
          </systemPropertyVariables>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.lucene</groupId>
        <artifactId>lucene-core</artifactId>
        <version>${solr.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.lucene</groupId>
        <artifactId>lucene-facet</artifactId>
        <version>${solr.version}</version>
      </dependency>
      <dependency>
        <groupId>org.fcrepo</groupId>
        <artifactId>fcrepo-jcr-bom</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>
