<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>
    <groupId>org.opengis.cite</groupId>
    <artifactId>ets-common</artifactId>
    <version>12</version>
  </parent>
  <artifactId>ets-gml32</artifactId>
  <version>1.33</version>
  <packaging>jar</packaging>

  <name>GML 3.2 (ISO 19136:2007) Conformance Test Suite</name>
  <description>
    Checks GML application schemas or data sets for conformance to ISO 19136:2007.
  </description>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://opensource.org/licenses/Apache-2.0</url>
    </license>
  </licenses>

  <organization>
    <name>Open Geospatial Consortium</name>
    <url>https://www.ogc.org/</url>
  </organization>
  <scm>
    <connection>scm:git:https://github.com/opengeospatial/ets-gml32.git</connection>
    <developerConnection>scm:git:git@github.com:opengeospatial/ets-gml32.git</developerConnection>
    <url>https://github.com/opengeospatial/ets-gml32</url>
    <tag>1.33</tag>
  </scm>
  <issueManagement>
    <system>GitHub Issue Tracker</system>
    <url>https://github.com/opengeospatial/ets-gml32/issues</url>
  </issueManagement>
  <developers>
    <developer>
      <name>R. Martell</name>
      <url>https://github.com/rjmartell</url>
      <timezone>Canada/Pacific</timezone>
    </developer>
    <developer>
      <name>D. Stenger</name>
      <url>https://github.com/dstenger</url>
      <timezone>Europe/Berlin</timezone>
    </developer>
  </developers>

  <properties>
    <ets-code>gml32</ets-code>
    <spec-version>3.2</spec-version>
    <soapui.teamengine.endpoint>http://localhost:8081/teamengine</soapui.teamengine.endpoint>
    <soapui.teamengine.user>ogctest</soapui.teamengine.user>
    <soapui.teamengine.password>ogctest</soapui.teamengine.password>
    <soapui.iut>https://cite.deegree.org/deegree-webservices-3.5.6/services/gml321?service=WFS&amp;request=GetFeature&amp;Version=2.0.0&amp;typenames=app:Autos</soapui.iut>
    <soapui.tests.passed>22</soapui.tests.passed>
    <soapui.tests.skipped>11</soapui.tests.skipped>
    <soapui.tests.failed>0</soapui.tests.failed>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.opengis.cite.teamengine</groupId>
      <artifactId>teamengine-spi</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opengis.cite</groupId>
      <artifactId>schema-utils</artifactId>
      <exclusions>
        <exclusion>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.opengis.cite</groupId>
      <artifactId>geomatics-geotk</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
    </dependency>
    <!--
      Do not specify JTS, GeoAPI or Geotk dependencies. We will inherit them from
      `geomatics-geotk` as transitive dependencies in order get the same versions.
    -->
    <dependency>
      <groupId>org.opengis.cite.saxon</groupId>
      <artifactId>saxon9</artifactId>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.opengis.cite.iso19136.TestNGController</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-scm-publish-plugin</artifactId>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.smartbear.soapui</groupId>
          <artifactId>soapui-maven-plugin</artifactId>
          <configuration>
            <projectFile>src/test/resources/soapui/ets-gml32-soapui-project.xml</projectFile>
            <projectProperties>
              <value>teamengine.endpoint=${soapui.teamengine.endpoint}</value>
              <value>teamengine.user=${soapui.teamengine.user}</value>
              <value>teamengine.password=${soapui.teamengine.password}</value>
              <value>iut=${soapui.iut}</value>
              <value>tests.passed=${soapui.tests.passed}</value>
              <value>tests.skipped=${soapui.tests.skipped}</value>
              <value>tests.failed=${soapui.tests.failed}</value>
            </projectProperties>
          </configuration>
        </plugin>
        <plugin>
          <groupId>io.fabric8</groupId>
          <artifactId>docker-maven-plugin</artifactId>
          <configuration>
            <images>
              <image>
                <run>
                  <ports>
                    <port>8081:8080</port>
                  </ports>
                  <wait>
                    <http>
                      <url>http://localhost:8081/teamengine</url>
                    </http>
                    <time>120000</time>
                  </wait>
                </run>
              </image>
            </images>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <testResources>
      <testResource>
        <directory>${basedir}/src/test/resources</directory>
        <filtering>true</filtering>
      </testResource>
    </testResources>
  </build>

  <profiles>
    <profile>
      <id>integration-tests</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.smartbear.soapui</groupId>
            <artifactId>soapui-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>integration-test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>start</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>build</goal>
                  <goal>start</goal>
                </goals>
              </execution>
              <execution>
                <id>stop</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop</goal>
                  <goal>remove</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>copy</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>docker</id>
      <build>
        <plugins>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>build</id>
                <goals>
                  <goal>build</goal>
                </goals>
              </execution>
              <execution>
                <id>push</id>
                <goals>
                  <goal>push</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>copy</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <pluginRepositories>
    <pluginRepository>
      <id>smartbear-sweden-plugin-repository</id>
      <url>https://www.soapui.org/repository/maven2/</url>
    </pluginRepository>
  </pluginRepositories>

  <repositories>
    <!-- Geotk milestones are not deployed in Central repository. -->
    <repository>
      <id>geotoolkit</id>
      <name>Geotk Modules</name>
      <url>https://nexus.geomatys.com/repository/maven-public</url>
      <layout>default</layout>
    </repository>
  </repositories>

  <distributionManagement>
    <site>
      <id>site</id>
      <url>scm:git:git@github.com:opengeospatial/ets-gml32.git</url>
    </site>
  </distributionManagement>
</project>
