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

    Elemental
    Copyright (C) 2024, Evolved Binary Ltd

    admin@evolvedbinary.com
    https://www.evolvedbinary.com | https://www.elemental.xyz

    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; version 2.1.

    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

    NOTE: Parts of this file contain code from 'The eXist-db Authors'.
          The original license header is included below.

    =====================================================================

    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>xyz.elemental.fork.org.exist-db</groupId>
        <artifactId>exist-indexes</artifactId>
        <version>7.7.0</version>
        <relativePath>..</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/evolvedbinary/elemental.git</connection>
        <developerConnection>scm:git:https://github.com/evolvedbinary/elemental.git</developerConnection>
        <url>scm:git:https://github.com/evolvedbinary/elemental.git</url>
      <tag>elemental-7.7.0</tag>
  </scm>

    <properties>
        <geotools.version>34.1</geotools.version>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>xyz.elemental.fork.org.exist-db</groupId>
            <artifactId>exist-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>xyz.elemental</groupId>
            <artifactId>elemental-media-type-api</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.evolvedbinary.j8fu</groupId>
            <artifactId>j8fu</artifactId>
            <scope>test</scope>
        </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.4</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.3.1</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>com.evolvedbinary.thirdparty.xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
        </dependency>

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

    </dependencies>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>false</filtering>
            </testResource>
            <testResource>
                <directory>src/test/resources-filtered</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>

        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <licenseSets>

                        <licenseSet>
                            <!--
                                Elemental License - (LGPL 2.1 only)
                            -->
                            <header>${project.parent.relativePath}/../../elemental-parent/elemental-LGPL-21-ONLY-license.template.txt</header>
                            <excludes>
                                <exclude>hsql.bat</exclude>
                                <exclude>hsql.sh</exclude>
                                <exclude>ivysettings.xml</exclude>
                                <exclude>pom.xml</exclude>
                                <exclude>src/**</exclude>
                            </excludes>
                        </licenseSet>

                        <licenseSet>
                            <!--
                                Combined: Elemental License (LGPL 2.1 only) + eXist-db License (LGPL 2.1 or later)
                            -->
                            <multi>
                                <header>${project.parent.relativePath}/../../elemental-parent/elemental-LGPL-21-ONLY-license.template.txt</header>
                                <separator><![CDATA[NOTE: Parts of this file contain code from 'The eXist-db Authors'.
      The original license header is included below.

=====================================================================
                                        ]]></separator>
                                <header>${project.parent.relativePath}/../../exist-parent/existdb-LGPL-21-license.template.txt</header>
                            </multi>
                            <includes>
                                <include>pom.xml</include>
                                <include>src/test/resources-filtered/conf.xml</include>
                                <include>src/test/resources/log4j2.xml</include>
                                <include>src/main/java/org/exist/indexing/spatial/GMLHSQLIndex.java</include>
                                <include>src/main/java/org/exist/indexing/spatial/GMLIndexConfig.java</include>
                                <include>src/test/java/org/exist/indexing/spatial/GMLIndexTest.java</include>
                            </includes>
                        </licenseSet>

                        <licenseSet>
                            <!--
                                eXist-db License (LGPL 2.1 or later)
                            -->
                            <header>${project.parent.relativePath}/../../exist-parent/existdb-LGPL-21-license.template.txt</header>
                            <excludes>
                                <exclude>pom.xml</exclude>
                                <exclude>src/test/resources-filtered/conf.xml</exclude>
                                <exclude>src/test/resources/log4j2.xml</exclude>
                                <exclude>src/main/java/org/exist/indexing/spatial/GMLHSQLIndex.java</exclude>
                                <exclude>src/main/java/org/exist/indexing/spatial/GMLIndexConfig.java</exclude>
                                <exclude>src/test/java/org/exist/indexing/spatial/GMLIndexTest.java</exclude>
                            </excludes>
                        </licenseSet>
                    </licenseSets>

                    <headerDefinitions>
                        <headerDefinition>${project.parent.relativePath}/../../exist-parent/xquery-license-style.xml</headerDefinition>
                    </headerDefinitions>

                </configuration>
            </plugin>

            <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:1.3.1</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>javax.media:jai_core:jar:1.1.3</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.junit.vintage:junit-vintage-engine: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>
                            <alwaysVerifyChecksum>true</alwaysVerifyChecksum>
                            <unpack>true</unpack>
                            <outputFileName>15385-SS7886-5i1.gml.gzip</outputFileName>
                            <outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>osgeo</id>
            <url>https://repo.osgeo.org/repository/geotools-releases/</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>
    
</project>