<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2013 Google Inc.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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>com.google.jimfs</groupId>
    <artifactId>jimfs-parent</artifactId>
    <version>1.1</version>
  </parent>

  <artifactId>jimfs</artifactId>

  <packaging>bundle</packaging>

  <name>Jimfs</name>

  <description>
    Jimfs is an in-memory implementation of Java 7's java.nio.file abstract file system API.
  </description>

  <dependencies>
    <!-- Required runtime dependencies -->
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>

    <!-- Optional runtime dependencies -->
    <dependency>
      <groupId>com.ibm.icu</groupId>
      <artifactId>icu4j</artifactId>
      <optional>true</optional>
    </dependency>

    <!-- Compile-time dependencies -->
    <dependency>
      <groupId>com.google.auto.service</groupId>
      <artifactId>auto-service</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <optional>true</optional>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava-testlib</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
          <docencoding>UTF-8</docencoding>
          <charset>UTF-8</charset>
          <excludePackageNames>com.google.jimfs.internal</excludePackageNames>
          <links>
            <link>http://docs.guava-libraries.googlecode.com/git-history/v${guava.version}/javadoc/</link>
            <link>http://jsr-305.googlecode.com/svn/trunk/javadoc/</link>
            <link>http://icu-project.org/apiref/icu4j/</link>
            <link>http://docs.oracle.com/javase/7/docs/api/</link>
          </links>
        </configuration>
        <executions>
          <execution>
            <id>attach-docs</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Export-Package>com.google.common.jimfs.*</Export-Package>
            <Include-Resource>
              META-INF/services=target/classes/META-INF/services
            </Include-Resource>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
