<?xml version="1.0" encoding="UTF-8"?>
<!--

    eXist-db Open Source Native XML Database
    Copyright (C) 2001 The eXist-db Authors

    info@exist-db.org
    http://www.exist-db.org

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

-->
<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.exist-db</groupId>
        <artifactId>exist-parent</artifactId>
        <version>7.0.0-beta4</version>
        <relativePath>../../../exist-parent</relativePath>
    </parent>
    
    <artifactId>exist-index-spatial</artifactId>
    <packaging>jar</packaging>
    
    <name>eXist-db Spatial Index</name>
    <description>eXist-db NoSQL Database Spatial Index</description>
    
    <scm>
        <connection>scm:git:https://github.com/exist-db/exist.git</connection>
        <developerConnection>scm:git:https://github.com/exist-db/exist.git</developerConnection>
        <url>scm:git:https://github.com/exist-db/exist.git</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <geotools.version>35.1</geotools.version>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>org.exist-db</groupId>
            <artifactId>exist-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-api</artifactId>
            <version>${geotools.version}</version>
        </dependency>
        <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-main</artifactId>
            <version>${geotools.version}</version>
        </dependency>
        <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-referencing</artifactId>
            <version>${geotools.version}</version>
        </dependency>
        <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-xml</artifactId>
            <version>${geotools.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>2.7.1</version>
            <!-- NOTE: needed for both scopes: <scope>runtime</scope><scope>test</scope> -->
        </dependency>
        <dependency>
            <groupId>org.locationtech.jts</groupId>
            <artifactId>jts-core</artifactId>
            <version>1.20.0</version>
        </dependency>

        <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-epsg-wkt</artifactId>
            <version>${geotools.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>java3d</groupId>
            <artifactId>vecmath</artifactId>
            <version>1.5.2</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>javax.media</groupId>
            <artifactId>jai_core</artifactId>
            <version>1.1.3</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <repositories>
        <!-- GeoTools: use repository/release (official per docs.geotools.org); geotools-releases can timeout on Windows CI -->
        <repository>
            <id>osgeo</id>
            <url>https://repo.osgeo.org/repository/release/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>atlassian</id>
            <url>https://packages.atlassian.com/maven-3rdparty/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>false</filtering>
            </testResource>
            <testResource>
                <directory>src/test/resources-filtered</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>*.xsl</exclude>
                </excludes>
            </testResource>
            <testResource>
                <directory>${project.build.directory}/generated-test-resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>analyze</id>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <failOnWarning>true</failOnWarning>
                            <ignoredUnusedDeclaredDependencies>
                                <ignoredUnusedDeclaredDependency>org.geotools:gt-epsg-wkt:jar:${geotools.version}</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.hsqldb:hsqldb:jar</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>java3d:vecmath:jar</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>javax.media:jai_core:jar</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.jdom:jdom:jar</ignoredUnusedDeclaredDependency>
                            </ignoredUnusedDeclaredDependencies>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.googlecode.maven-download-plugin</groupId>
                <artifactId>download-maven-plugin</artifactId>
                <version>1.13.0</version>
                <executions>
                    <execution>
                        <id>os-mastermap-samples</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>wget</goal>
                        </goals>
                        <configuration>
                            <url>http://data.exist-db.org/spatial/os-mastermap-topography-layer-sample-data.gz</url>
                            <readTimeOut>120000</readTimeOut>
                            <sha1>ca14a6dafcdec4cbe9bbadcf65fa1e245665c0e5</sha1>
                            <checkSignature>true</checkSignature>
                            <unpack>true</unpack>
                            <outputFileName>15385-SS7886-5i1.gml.gzip</outputFileName>
                            <outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
</project>
