<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.fcrepo</groupId>
    <artifactId>fcrepo-parent</artifactId>
    <version>4.5.0</version>
  </parent>

  <groupId>org.fcrepo.client</groupId>
  <artifactId>fcrepo-java-client</artifactId>
  <packaging>bundle</packaging>

  <version>0.1.2</version>

  <name>Fedora 4 Java Client Libraries</name>
  <description>Java libraries for interacting with a Fedora 4 Repository</description>
  <url>http://fcrepo.org</url>

  <organization>
    <name>DuraSpace, Inc.</name>
    <url>http://www.duraspace.org/</url>
  </organization>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <project.copyrightYear>2015</project.copyrightYear>

    <!-- Use ${project_name} instead of ${project.artifactId} to avoid incorrect
      replacements of "fcrepo4" in child modules (for scm, site-distribution, etc -->
    <project_name>fcrepo-java-client</project_name>

    <!-- https://github.com/github/maven-plugins/blob/master/README.md -->
    <github.global.server>github</github.global.server>

    <!-- dependencies -->
    <fcrepo.version>4.5.0</fcrepo.version>
    <commons.io.version>2.4</commons.io.version>
    <commons.lang3.version>3.3.2</commons.lang3.version>
    <commons.logging.version>1.1.3</commons.logging.version>
    <grizzly.version>2.3.18</grizzly.version>
    <httpclient.version>4.3.6</httpclient.version>
    <jersey.version>2.15</jersey.version>
    <joda-time.version>2.9.2</joda-time.version>
    <logback.version>1.1.2</logback.version>
    <mockito.version>1.10.8</mockito.version>
    <mockserver.version>3.10.2</mockserver.version>
    <slf4j.version>1.7.10</slf4j.version>
    <spring.version>4.1.4.RELEASE</spring.version>
    <!-- osgi -->
    <osgi.export.packages>org.fcrepo.client.*;version=${project.version}</osgi.export.packages>
    <osgi.import.packages>*</osgi.import.packages>
  </properties>

  <scm>
    <connection>scm:git:git://github.com/fcrepo4-exts/${project_name}.git</connection>
    <developerConnection>scm:git:git@github.com:fcrepo4-exts/${project_name}.git</developerConnection>
    <url>https://github.com/fcrepo4-exts/fcrepo-java-client</url>
    <tag>fcrepo-java-client-0.1.2</tag>
  </scm>

  <repositories>
    <repository>
      <id>snapshots-repo</id>
      <url>http://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>${commons.lang3.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>${httpclient.version}</version>
    </dependency>

    <!-- logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${slf4j.version}</version>
    </dependency>

    <!-- testing -->
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commons.io.version}</version>
      <scope>test</scope>
    </dependency>


    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>${spring.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
      <version>${spring.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>${spring.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.glassfish.grizzly</groupId>
      <artifactId>grizzly-http-servlet</artifactId>
      <version>${grizzly.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-common</artifactId>
      <version>${jersey.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.glassfish.jersey.ext</groupId>
      <artifactId>jersey-spring3</artifactId>
      <version>${jersey.version}</version>
      <scope>test</scope>
    </dependency>


    <dependency>
      <groupId>org.glassfish.jersey.test-framework.providers</groupId>
      <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
      <version>${jersey.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mock-server</groupId>
      <artifactId>mockserver-client-java</artifactId>
      <version>${mockserver.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mock-server</groupId>
      <artifactId>mockserver-netty</artifactId>
      <version>${mockserver.version}</version>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-kernel-modeshape</artifactId>
      <version>${fcrepo.version}</version>
      <scope>test</scope>
      <classifier>tests</classifier>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-http-api</artifactId>
      <version>${fcrepo.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-configs</artifactId>
      <version>${fcrepo.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-http-commons</artifactId>
      <version>${fcrepo.version}</version>
      <scope>test</scope>
      <type>test-jar</type>
    </dependency>

    <dependency>
      <groupId>org.fcrepo</groupId>
      <artifactId>fcrepo-auth-common</artifactId>
      <version>${fcrepo.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>${joda-time.version}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <defaultGoal>install</defaultGoal>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

    <plugins>

      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <configuration>
          <portNames>
            <portName>fcrepo.dynamic.test.port</portName>
            <portName>jetty.dynamic.stop.port</portName>
          </portNames>
        </configuration>
        <executions>
          <execution>
            <id>reserve-port</id>
            <phase>package</phase>
            <goals>
              <goal>reserve-network-port</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <!--Set reuseForks=false due to the need for different instances of the-->
          <!--Singleton ServletContainerAuthenticationProvider-->
          <reuseForks>false</reuseForks>
          <argLine>${jacoco.agent.it.arg}</argLine>
          <systemPropertyVariables>
            <fcrepo.dynamic.test.port>${fcrepo.dynamic.test.port}</fcrepo.dynamic.test.port>
            <project.build.outputDirectory>${project.build.outputDirectory}</project.build.outputDirectory>
          </systemPropertyVariables>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
      </plugin>

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

      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
      </plugin>

      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
      </plugin>

      <!-- verify that source files contain the correct license headers
        $ mvn license:check to check files
        $ mvn license:format to update files -->
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>com.github.github</groupId>
        <artifactId>site-maven-plugin</artifactId>
      </plugin>

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

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

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/fcrepo4-exts/fcrepo-java-client/issues</url>
  </issueManagement>

</project>
