<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (C) 2014 - Open Source Geospatial Foundation. All rights reserved.
    This code is licensed under the GPL 2.0 license, available at the root
    application directory.
-->
<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.geoserver.extension</groupId>
    <artifactId>gs-app-schema</artifactId>
    <version>C105.2.21.4.01</version>
  </parent>

  <groupId>org.geoserver.extension</groupId>
  <artifactId>gs-app-schema-test</artifactId>
  <name>Application Schema Integration Test</name>

  <dependencies>
    <dependency>
      <groupId>org.geoserver</groupId>
      <artifactId>gs-main</artifactId>
    </dependency>
    <dependency>
      <groupId>org.geoserver.extension</groupId>
      <artifactId>gs-app-schema-core</artifactId>
      <version>${gs.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geoserver</groupId>
      <artifactId>gs-main</artifactId>
      <classifier>tests</classifier>
    </dependency>
    <dependency>
      <!--
                wfs required to get applicationContext.xml. Without it, code will
                compile but will not run.
            -->
      <groupId>org.geoserver</groupId>
      <artifactId>gs-wfs</artifactId>
    </dependency>
    <dependency>
      <groupId>org.geoserver</groupId>
      <artifactId>gs-kml</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <!--
                //NC - wms package required for wms support
            -->
      <groupId>org.geoserver</groupId>
      <artifactId>gs-wms</artifactId>
    </dependency>
    <dependency>
      <groupId>net.sf.opencsv</groupId>
      <artifactId>opencsv</artifactId>
      <version>1.8</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geoserver</groupId>
      <artifactId>gs-restconfig</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geoserver</groupId>
      <artifactId>gs-restconfig</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-app-schema</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-app-schema</artifactId>
      <version>${gt.version}</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <!--
            maven-eclipse-plugin does not correctly add transitive test dependencies
            geosciml-2.0 and earthresourceml-1.1 should be included by depending on
            gt-app-schema tests
        -->
    <dependency>
      <groupId>org.geotools.schemas</groupId>
      <artifactId>geosciml-2.0</artifactId>
      <version>2.0.2-4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools.schemas</groupId>
      <artifactId>earthresourceml-1.1</artifactId>
      <version>1.1.0-3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools.schemas</groupId>
      <artifactId>wfs-1.1</artifactId>
      <version>1.1.2-2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-sample-data</artifactId>
      <version>${gt.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-jdbc</artifactId>
      <version>${gt.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools.jdbc</groupId>
      <artifactId>gt-jdbc-postgis</artifactId>
      <version>${gt.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools.jdbc</groupId>
      <artifactId>gt-jdbc-oracle</artifactId>
      <version>${gt.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools.data</groupId>
      <artifactId>refdataset-1.0</artifactId>
      <version>1.0.7</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools.schemas</groupId>
      <artifactId>geosciml-3.0-seegrid</artifactId>
      <version>3.0.0-1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools.schemas</groupId>
      <artifactId>geosciml-3.2</artifactId>
      <version>3.2.0-1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools.schemas</groupId>
      <artifactId>wfs-2.0</artifactId>
      <version>2.0.0-2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools.schemas</groupId>
      <artifactId>samplingSpecimen-2.0</artifactId>
      <version>2.0.0-1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- required for Web UI tests -->
    <dependency>
      <groupId>org.geoserver.web</groupId>
      <artifactId>gs-web-core</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geoserver.web</groupId>
      <artifactId>gs-web-demo</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geoserver.web</groupId>
      <artifactId>gs-web-demo</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <!-- Include data ref set tests -->
      <id>app-schema-online-test</id>
      <build>
        <testResources>
          <testResource>
            <directory>src/test/resources</directory>
            <includes>
              <include>**/*.properties</include>
              <include>**/*.xml</include>
              <include>**/*.xsd</include>
              <include>**/*.sql</include>
              <include>**/*.sld</include>
              <include>**/*.png</include>
              <include>**/*.json</include>
            </includes>
          </testResource>
        </testResources>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <excludes>
                <!-- To be run separately online in app-schema-oracle-test and app-schema-postgis-test -->
                <exclude>**/SortByTest.java</exclude>
                <exclude>**/IdFunctionWfsWithJoiningTest.java</exclude>
                <exclude>**/XPathPredicateTest.java</exclude>
                <exclude>**/PagingTest.java</exclude>
                <exclude>**/DefaultGeometryTest.java</exclude>
                <exclude>**/GetFeaturesNumberMatchedTest.java</exclude>
                <exclude>**/GetFeatureNumberMatchedFeatureChainingTest.java</exclude>
                <exclude>**/FeatureChainingWfsTest.java</exclude>
                <exclude>**/NoIdExpressionTest.java</exclude>
                <exclude>${test.exclude.pattern}</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>com.oracle.database.jdbc</groupId>
          <artifactId>ojdbc8</artifactId>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <!-- Default profile, exclude online tests -->
      <id>offline</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <testResources>
          <testResource>
            <directory>src/test/resources</directory>
            <includes>
              <include>**/*.properties</include>
              <include>**/*.xml</include>
              <include>**/*.xsd</include>
              <include>**/*.sql</include>
              <include>**/*.sld</include>
              <include>**/*.png</include>
              <include>**/*.json</include>
            </includes>
          </testResource>
        </testResources>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/DataReferenceWfsOracleTest.java</exclude>
                <exclude>**/DataReferenceWfsPostgisTest.java</exclude>
                <exclude>**/DataReferenceWfsOracleWithJoiningTest.java</exclude>
                <exclude>**/DataReferenceWfsPostgisWithJoiningTest.java</exclude>
                <exclude>**/WfsOnlineOracleTest.java</exclude>
                <exclude>**/WfsOnlinePostgisTest.java</exclude>
                <exclude>**/DataReferenceWmsOracleTest.java</exclude>
                <exclude>**/DataReferenceWmsPostgisTest.java</exclude>
                <exclude>**/DataReferenceWmsOracleWithJoiningTest.java</exclude>
                <exclude>**/DataReferenceWmsPostgisWithJoiningTest.java</exclude>
                <exclude>**/SortByTest.java</exclude>
                <exclude>**/PagingTest.java</exclude>
                <exclude>**/IdFunctionWfsWithJoiningTest.java</exclude>
                <exclude>**/XPathPredicateTest.java</exclude>
                <exclude>${test.exclude.pattern}</exclude>
                <exclude>**/GetFeatureNumberMatchedGMLTest.java</exclude>
                <exclude>**/GetFeatureNumberMatchedGeoJSONTest.java</exclude>
                <exclude>**/FeatureChainingWfsTest.java</exclude>
                <exclude>**/NoIdExpressionTest.java</exclude>
              </excludes>
              <argLine>-Xmx${test.maxHeapSize} -enableassertions ${jvm.opts}
                                -Djava.awt.headless=${java.awt.headless} -DquietTests=${quietTests}</argLine>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
