<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</artifactId>
    <version>4.6.0</version>
  </parent>
  <artifactId>fcrepo-http-commons</artifactId>
  <name>Fedora Repository HTTP Commons Module</name>
  <description>The Fedora Commons repository HTTP commons module: Provides HTTP (JAX-RS) resources and helpers for use in assembling HTTP APIs over the Fedora Commons repository framework.</description>
  <packaging>bundle</packaging>

  <properties>
    <osgi.import.packages>
      org.fcrepo.metrics,
      org.fcrepo.kernel.api,
      org.fcrepo.kernel.modeshape,

      javax.annotation,
      javax.inject,
      javax.jcr,
      javax.servlet.http,
      javax.ws.rs.*,
      
      com.codahale.metrics.*,
      com.fasterxml.jackson.core,
      com.hp.hpl.jena.*,
      com.google.common.*,
      org.apache.jena.riot,
      org.apache.commons.codec.*,
      org.apache.commons.io.*,
      org.apache.commons.lang3,
      org.glassfish.hk2.*,
      org.glassfish.jersey.*,
      org.jvnet.hk2.annotations,
      org.modeshape.jcr.*,
      org.openrdf.model.*,
      org.openrdf.rio,
      
      org.springframework.beans.*,
      org.springframework.context,
      org.springframework.stereotype,
      org.springframework.web.context,

      *
    </osgi.import.packages>
    <osgi.export.packages>
      org.fcrepo.http.commons.*;version=${project.version},
    </osgi.export.packages>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.fcrepo</groupId>
        <artifactId>fcrepo-jcr-bom</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-metrics</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-server</artifactId>
    </dependency>
    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-kernel-modeshape</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jboss.jbossts</groupId>
          <artifactId>jbossjta</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.modeshape</groupId>
          <artifactId>modeshape-jcr</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-beans</artifactId>
        </exclusion>
        <exclusion>
          <artifactId>commons-codec</artifactId>
          <groupId>commons-codec</groupId>
        </exclusion>
        <exclusion>
          <artifactId>snappy-java</artifactId>
          <groupId>org.xerial.snappy</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-configs</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.glassfish.grizzly</groupId>
      <artifactId>grizzly-http-server</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.grizzly</groupId>
      <artifactId>grizzly-http-servlet</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.test-framework.providers</groupId>
      <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.ext</groupId>
      <artifactId>jersey-spring3</artifactId>
      <scope>test</scope>
      <version>${jersey.version}</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-common</artifactId>
      <version>${jersey.version}</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-multipart</artifactId>
      <version>${jersey.version}</version>
    </dependency>

    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-json-jackson</artifactId>
      <version>${jersey.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax</groupId>
      <artifactId>javaee-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>javax.annotation-api</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity-tools</artifactId>
      <version>2.0</version>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
        <exclusion>
          <groupId>dom4j</groupId>
          <artifactId>dom4j</artifactId>
        </exclusion>
        <!-- velocity is already bringing in commons-collections-3.2.1, whereas velocity-tools 
          is bringing in 3.2 -->
        <exclusion>
          <groupId>commons-collections</groupId>
          <artifactId>commons-collections</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-digester</groupId>
          <artifactId>commons-digester</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    
    <!-- commons-digester-1.8 is explicitly added here because of a dependency 
    convergence issue in velocity-tools. If/when velocity-tools gets its 
    version of commons-digester in sync across its dependencies, the exclusion 
    on commons-digester may be removed along with the explicit dependency 
    declaration below -->
    <dependency>
      <groupId>commons-digester</groupId>
      <artifactId>commons-digester</artifactId>
      <version>1.8</version>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
        <exclusion>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.modeshape</groupId>
      <artifactId>modeshape-jcr</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>commons-codec</artifactId>
          <groupId>commons-codec</groupId>
        </exclusion>
        <exclusion>
          <artifactId>snappy-java</artifactId>
          <groupId>org.xerial.snappy</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.openrdf.sesame</groupId>
      <artifactId>sesame-rio-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.openrdf.sesame</groupId>
      <artifactId>sesame-rio-ntriples</artifactId>
    </dependency>
    <dependency>
      <groupId>org.openrdf.sesame</groupId>
      <artifactId>sesame-rio-rdfxml</artifactId>
    </dependency>
    <dependency>
      <groupId>org.openrdf.sesame</groupId>
      <artifactId>sesame-rio-turtle</artifactId>
    </dependency>
    <dependency>
      <groupId>org.openrdf.sesame</groupId>
      <artifactId>sesame-rio-n3</artifactId>
      <version>${sesame.version}</version>
    </dependency>

    <dependency>
      <groupId>com.github.jsonld-java</groupId>
      <artifactId>jsonld-java-sesame</artifactId>
      <version>${jsonld.version}</version>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>logback-test.xml</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
