<?xml version="1.0" encoding="UTF-8"?>
<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>
        <artifactId>tools</artifactId>
        <groupId>net.postgis</groupId>
        <version>2.2.2-SNAPSHOT</version>
    </parent>

    <artifactId>osgeo-postgis-jdbc-test-util</artifactId>
    <version>2.2.2-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>osgeo-postgis-jdbc-test-util</name>
    <description>
        Simple smoke test util for verifying functionality postgis jdbc jar against a postgresql database with posgis
        extensions on OSGeo-Live.
    </description>

    <properties>
        <maven.test.skip>true</maven.test.skip>
        <testTablePrefix>SMOKE_TEST</testTablePrefix>
        <jdbcUrl>jdbc:postgresql://localhost:5432/postgis1</jdbcUrl>
        <jdbcUsername>postgis1</jdbcUsername>
        <jdbcPassword>postgis1</jdbcPassword>
    </properties>

    <dependencies>
        <dependency>
            <groupId>net.postgis</groupId>
            <artifactId>postgis-jdbc</artifactId>
            <version>2.2.2-SNAPSHOT</version>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${dependency.logback.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>${dependency.logback.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${dependency.slfj.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <id>shade</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <excludes>
                                    <exclude>net.postgis:postgis-jdbc</exclude>
                                </excludes>
                            </artifactSet>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>net.postgis.osgeo.util.Main</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>${maven.test.skip}</skip>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                    <systemPropertyVariables>
                        <testTablePrefix>${testTablePrefix}</testTablePrefix>
                        <jdbcUrl>${jdbcUrl}</jdbcUrl>
                        <jdbcUsername>${jdbcUsername}</jdbcUsername>
                        <jdbcPassword>${jdbcPassword}</jdbcPassword>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>