<?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/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.datanucleus</groupId>
    <version>3.2.4</version>
    <artifactId>datanucleus-spatial</artifactId>
    <name>DataNucleus Spatial</name>
    <description>DataNucleus Spatial</description>
    <url>http://www.datanucleus.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:svn:svn://andy_jefferson@svn.code.sf.net/p/datanucleus/code/platform/store.types.spatial/tags/datanucleus-spatial-3.2.4</connection>
        <developerConnection>scm:svn:svn+ssh://andy_jefferson@svn.code.sf.net/p/datanucleus/code/platform/store.types.spatial/tags/datanucleus-spatial-3.2.4</developerConnection>
        <url>http://svn.code.sf.net/p/datanucleus/code/platform/store.types.spatial/tags/datanucleus-spatial-3.2.4</url>
    </scm>

    <developers>
        <developer>
            <id>andy</id>
            <name>Andy</name>
            <organization>DataNucleus</organization>
        </developer>
    </developers>

    <repositories>
        <!-- Repository where we can get the remaining spatial libs from that aren't in Maven Central -->
        <repository>
            <id>DN_M2_Repo</id>
            <url>http://www.datanucleus.org/downloads/maven2/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <distributionManagement>
        <snapshotRepository>
            <id>datanucleus-nightly</id>
            <name>DataNucleus Nightly</name>
            <url>file:${user.home}/htdocs/downloads/maven2-nightly/</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-core</artifactId>
            <version>[3.2.0, )</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-api-jdo</artifactId>
            <version>[3.2.0, )</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-rdbms</artifactId>
            <version>[3.2.0, )</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.jdo</groupId>
            <artifactId>jdo-api</artifactId>
            <version>[3.0, )</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>oracle</groupId>
            <artifactId>ojdbc14_g</artifactId>
            <version>10.2.0.4</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>oracle</groupId>
            <artifactId>sdoapi</artifactId>
            <version>1.0</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>oracle</groupId>
            <artifactId>sdoutl</artifactId>
            <version>1.0</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.vividsolutions</groupId>
            <artifactId>jts</artifactId>
            <version>1.12</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.vividsolutions</groupId>
            <artifactId>jtsio</artifactId>
            <version>1.12</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>9.1-901-1.jdbc4</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>postgis</groupId>
            <artifactId>postgis-jdbc</artifactId>
            <version>1.1.5</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>postgis</groupId>
            <artifactId>postgis-jdbc-jts</artifactId>
            <version>1.1.5</version>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/java</sourceDirectory>
        <resources>
            <resource>
                <filtering>true</filtering>
                <directory>src/java</directory>
                <includes>
                    <include>**/plugin.xml</include>
                    <include>**/*.properties</include>
                    <include>**/*.dtd</include>
                    <include>**/*.xsd</include>
                    <include>**/*.jdo</include>
                    <include>**/META-INF/services/*</include>
                </includes>
            </resource>
            <resource>
                <directory>${basedir}</directory>
                <includes>
                    <include>plugin.xml</include>
                    <include>schema/*</include>
                </includes>
            </resource>
            <resource>
                <!-- Need to have MANIFEST-MF in place before packaging, so unit-tests will work -->
                <directory>${basedir}/META-INF</directory>
                <targetPath>META-INF</targetPath>
                <includes>
                    <include>MANIFEST.MF</include>
                    <include>LICENSE.txt</include>
                    <include>NOTICE.txt</include>
                    <include>README.txt</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration />
            </plugin>

            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <archive>
                        <manifestFile>META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                    <excludes>
                        <exclude>com/esri/**</exclude>
                        <exclude>com/linar/**</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <excludePackageNames>com.esri.*:com.linar.jintegra</excludePackageNames>
                </configuration>
            </plugin>
        </plugins>

        <extensions> 
            <extension> 
                <groupId>org.apache.maven.wagon</groupId> 
                <artifactId>wagon-ssh-external</artifactId> 
                <version>2.2</version> 
            </extension> 
        </extensions> 
    </build>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
