<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">

  <parent>
    <groupId>org.opengis.cite</groupId>
    <artifactId>ets-common</artifactId>
    <version>14</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>ets-cat30</artifactId>
  <version>1.6</version>
  <packaging>jar</packaging>

  <name>OGC Catalogue 3.0 Conformance Test Suite</name>
  <description>Checks a catalogue service implementation for conformance to
    "OGC Catalogue Services 3.0 Specification -- HTTP Protocol Binding" (OGC
    12-176r6) and related specifications.
  </description>
  <url>https://opengeospatial.github.io/ets-cat30/</url>
  <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-cat30.git</connection>
    <developerConnection>scm:git:git@github.com:opengeospatial/ets-cat30.git</developerConnection>
    <url>https://github.com/opengeospatial/ets-cat30</url>
    <tag>1.6</tag>
  </scm>
  <issueManagement>
    <system>GitHub Issue Tracker</system>
    <url>https://github.com/opengeospatial/ets-cat30/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>cat30</ets-code>
    <spec-version>3.0.0</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>http://demo.pycsw.org/cite/csw?service=CSW&amp;version=3.0.0&amp;request=GetCapabilities</soapui.iut>
    <soapui.tests.passed>52</soapui.tests.passed>
    <soapui.tests.skipped>0</soapui.tests.skipped>
    <soapui.tests.failed>0</soapui.tests.failed>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.opengis.cite</groupId>
      <artifactId>geomatics-geotk</artifactId>
    </dependency>
    <!--
      Do not specify GeoAPI, SIS or Geotk. Inherit them from `geomatics-geotk`
      transitive dependencies instead, in order to inherit the same versions.
    -->
    <dependency>
      <groupId>org.opengis.cite.teamengine</groupId>
      <artifactId>teamengine-spi</artifactId>
      <exclusions>
        <exclusion>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.opengis.cite</groupId>
      <artifactId>schema-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-server</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.connectors</groupId>
      <artifactId>jersey-apache-connector</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-jaxb</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.inject</groupId>
      <artifactId>jersey-hk2</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opengis</groupId>
      <artifactId>geoapi-pending</artifactId>
    </dependency>
    <dependency>
      <groupId>com.beust</groupId>
      <artifactId>jcommander</artifactId>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <exclusions>
        <exclusion>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>jakarta.ws.rs</groupId>
      <artifactId>jakarta.ws.rs-api</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.opengis.cite.cat30.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-cat30-soapui-project.xml</projectFile>
            <settingsFile>src/test/resources/soapui/ets-cat30-soapui-settings.xml</settingsFile>
            <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>
  </build>

  <profiles>
    <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>
    <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>
  </profiles>

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

  <repositories>
    <!-- Geotk is 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-cat30.git</url>
    </site>
  </distributionManagement>
</project>
