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

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

  <modelVersion>4.0.0</modelVersion>
  <artifactId>ets-sfs11</artifactId>
  <version>1.9</version>

  <name>OGC Simple Feature Access - SQL 1.1 Test-Suite - Executable Test Suite</name>
  <description>
    Verifies conformance of implementations to OGC Simple Feature Access - SQL 1.1 Test-Suite.
  </description>
  <url>https://github.com/opengeospatial/ets-sfs11</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>
    <url>https://github.com/opengeospatial/ets-sfs11</url>
    <connection>scm:git:https://github.com/opengeospatial/ets-sfs11.git</connection>
    <developerConnection>scm:git:git@github.com:opengeospatial/ets-sfs11.git</developerConnection>
    <tag>1.9</tag>
  </scm>
  <issueManagement>
    <system>GitHub Issue Tracker</system>
    <url>https://github.com/opengeospatial/ets-sfs11/issues</url>
  </issueManagement>

  <developers>
    <developer>
      <name>Dirk Stenger</name>
      <url>https://github.com/dstenger</url>
    </developer>
  </developers>

  <properties>
    <ets-code>sfs</ets-code>
    <spec-version>1.1</spec-version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>src/assembly/ctl-scripts.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
          <execution>
            <id>test-resources</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>src/assembly/test-resources.xml</descriptor>
              </descriptors>
              <finalName>SFSQL_1-1_Compliance_Test_Suite_Test_Resources</finalName>
              <appendAssemblyId>false</appendAssemblyId>
              <outputDirectory>${project.build.directory}/site</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-scm-publish-plugin</artifactId>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <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>

    <resources>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>true</filtering>
        <excludes>
          <exclude>**/*.tar.gz</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/scripts</directory>
        <targetPath>${ets-code}/${spec-version}</targetPath>
      </resource>
      <resource>
        <directory>src/main/javadoc</directory>
        <filtering>true</filtering>
        <targetPath>doc/${ets-code}/${project.version}</targetPath>
      </resource>
    </resources>
  </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>
  </profiles>

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