<?xml version="1.0"?>
<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.datanucleus</groupId>
        <artifactId>datanucleus-maven-parent</artifactId>
        <version>3.3</version>
    </parent>

    <artifactId>datanucleus-cache</artifactId>
    <version>3.1.3</version>

    <name>DataNucleus Cache plugin</name>
    <description>DataNucleus third-party Caching plugin</description>

    <scm>
        <connection>scm:git:git@github.com:datanucleus/${project.artifactId}.git</connection>
        <developerConnection>scm:git:git@github.com:datanucleus/${project.artifactId}.git</developerConnection>
        <url>https://github.com/datanucleus/${project.artifactId}</url>
    </scm>

    <properties>
        <dn.core.version>3.0.3</dn.core.version>
    </properties>

    <repositories>
        <repository>
            <id>Spymemcached_Repo</id>
            <url>http://files.couchbase.com/maven2/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-core</artifactId>
            <version>[${dn.core.version}, )</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>spy</groupId>
            <artifactId>spymemcached</artifactId>
            <version>2.8.12</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.googlecode.xmemcached</groupId>
            <artifactId>xmemcached</artifactId>
            <version>1.3.2</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache-core</artifactId>
            <version>[1.8, 2.9)</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>swarmcache</groupId>
            <artifactId>swarmcache</artifactId>
            <version>1.0RC2</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>net.sf.jsr107cache</groupId>
            <artifactId>jsr107cache</artifactId>
            <version>1.1</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>oscache</artifactId>
            <version>2.4.1</version>
            <optional>true</optional>
        </dependency>
        <!-- If not present, download this via http://www.oracle.com/technetwork/middleware/coherence/downloads/coherence-archive-165749.html
             and install using
            mvn install:install-file -DgroupId=com.oracle.coherence -DartifactId=coherence -Dversion=3.7.1 -Dfile=coherence.jar -Dpackaging=jar -DgeneratePom=true -->
        <dependency>
            <groupId>com.oracle.coherence</groupId>
            <artifactId>coherence</artifactId>
            <version>3.7.1</version>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>cacheonix/*</exclude>
                        <exclude>cacheonix/cache/*</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <excludePackageNames>cacheonix:cacheonix.cache</excludePackageNames>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>org.datanucleus.cache;singleton:=true</Bundle-SymbolicName>
                        <Import-Package>
                            org.datanucleus*;version="${dn.core.version}",
                            *;resolution:=optional
                        </Import-Package>
                        <Export-Package>org.datanucleus.cache*,!cacheonix*</Export-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
