<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>
  <groupId>org.opengis.cite</groupId>
  <artifactId>ets-common</artifactId>
  <version>13</version>
  <packaging>pom</packaging>

  <name>Common ETS POM</name>
  <description>Top-level POM for OGC conformance test suite projects.</description>
  <url>https://github.com/opengeospatial/ets-common/</url>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://opensource.org/license/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-common</url>
    <connection>scm:git:https://github.com/opengeospatial/ets-common.git</connection>
    <developerConnection>scm:git:git@github.com:opengeospatial/ets-common.git</developerConnection>
    <tag>13</tag>
  </scm>
  <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>
    <teamengine.version>6.0.0-RC2</teamengine.version>
    <jackson.version>2.18.0</jackson.version>
    <jersey.version>3.1.8</jersey.version>
    <soapui.test.fail.ignore>false</soapui.test.fail.ignore>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <artifactId>teamengine-spi</artifactId>
        <groupId>org.opengis.cite.teamengine</groupId>
        <version>${teamengine.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.17.1</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.17.0</version>
      </dependency>
      <dependency>
        <groupId>commons-validator</groupId>
        <artifactId>commons-validator</artifactId>
        <version>1.9.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.17.0</version>
      </dependency>
      <dependency>
        <groupId>com.github.erosb</groupId>
        <artifactId>everit-json-schema</artifactId>
        <version>1.14.3</version>
      </dependency>
      <dependency>
        <groupId>org.opengis</groupId>
        <artifactId>geoapi-pending</artifactId>
        <version>4.0-M23</version>
      </dependency>
      <dependency>
        <groupId>org.opengis.cite</groupId>
        <artifactId>geomatics-geotk</artifactId>
        <version>1.18</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>2.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.14</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.4.16</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-yaml</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>jakarta.xml.ws</groupId>
        <artifactId>jakarta.xml.ws-api</artifactId>
        <version>4.0.2</version>
      </dependency>
      <dependency>
        <groupId>one.gfw</groupId>
        <artifactId>jakarta.xml.bind-api</artifactId>
        <version>4.0.0.1</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jaxb</groupId>
        <artifactId>jaxb-runtime</artifactId>
        <version>4.0.5</version>
      </dependency>
      <dependency>
        <groupId>com.beust</groupId>
        <artifactId>jcommander</artifactId>
        <version>1.82</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.media</groupId>
        <artifactId>jersey-media-jaxb</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-common</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-server</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-client</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.inject</groupId>
        <artifactId>jersey-hk2</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.connectors</groupId>
        <artifactId>jersey-apache-connector</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20240303</version>
      </dependency>
      <dependency>
        <groupId>jakarta.ws.rs</groupId>
        <artifactId>jakarta.ws.rs-api</artifactId>
        <version>3.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.locationtech.jts</groupId>
        <artifactId>jts-core</artifactId>
        <version>1.19.0</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>5.14.2</version>
      </dependency>
      <dependency>
        <groupId>com.reprezen.kaizen</groupId>
        <artifactId>openapi-parser</artifactId>
        <version>4.0.4</version>
      </dependency>
      <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>rest-assured</artifactId>
        <version>5.5.0</version>
      </dependency>
      <dependency>
        <groupId>org.opengis.cite.saxon</groupId>
        <artifactId>saxon9</artifactId>
        <version>9.0.0.8</version>
      </dependency>
      <dependency>
        <groupId>org.opengis.cite</groupId>
        <artifactId>schema-utils</artifactId>
        <version>1.8</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sis.non-free</groupId>
        <artifactId>sis-embedded-data</artifactId>
        <version>1.4</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>2.0.16</version>
      </dependency>
      <dependency>
        <groupId>org.yaml</groupId>
        <artifactId>snakeyaml</artifactId>
        <version>2.3</version>
      </dependency>
      <dependency>
        <groupId>org.xerial</groupId>
        <artifactId>sqlite-jdbc</artifactId>
        <!-- versions above this use SQLite 3.36.0 which causes unexpected
        failures in the featureGeometryEncodingTesting test of ets-gpkg12.
        Accessing the rowid of a VIEW is disallowed from this version on
        see https://sqlite.org/releaselog/3_36_0.html -->
        <version>3.35.0</version>
      </dependency>
      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>7.9.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.tika</groupId>
        <artifactId>tika-core</artifactId>
        <version>2.9.2</version>
      </dependency>
      <dependency>
        <groupId>xerces</groupId>
        <artifactId>xercesImpl</artifactId>
        <version>2.12.2</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!-- optional dependency of TestNG required to create test stubs -->
    <dependency>
      <groupId>com.google.inject</groupId>
      <artifactId>guice</artifactId>
      <version>7.0.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.smartbear.soapui</groupId>
          <artifactId>soapui-maven-plugin</artifactId>
          <version>5.7.2</version>
          <dependencies>
            <dependency>
              <groupId>com.jgoodies</groupId>
              <artifactId>forms</artifactId>
              <version>1.2.1</version>
            </dependency>
          </dependencies>
          <configuration>
            <outputFolder>${project.build.directory}/soapui</outputFolder>
            <junitReport>true</junitReport>
            <testFailIgnore>${soapui.test.fail.ignore}</testFailIgnore>
          </configuration>
        </plugin>
        <plugin>
          <groupId>io.fabric8</groupId>
          <artifactId>docker-maven-plugin</artifactId>
          <version>0.45.1</version>
          <configuration>
            <images>
              <image>
                <name>ogccite/${project.artifactId}</name>
                <build>
                  <dockerFileDir>${project.basedir}/src/docker</dockerFileDir>
                  <tags>
                    <tag>${project.version}-teamengine-${teamengine.version}</tag>
                  </tags>
                  <assembly>
                    <inline>
                      <fileSets>
                        <fileSet>
                          <directory>${project.build.directory}</directory>
                          <outputDirectory>.</outputDirectory>
                          <includes>
                            <include>dependency/*teamengine-*.war</include>
                            <include>dependency/*teamengine-*.zip</include>
                            <include>*ets-*.zip</include>
                          </includes>
                        </fileSet>
                      </fileSets>
                    </inline>
                  </assembly>
                </build>
              </image>
            </images>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.8.0</version>
          <configuration>
            <artifactItems>
              <artifactItem>
                <groupId>org.opengis.cite.teamengine</groupId>
                <artifactId>teamengine-web</artifactId>
                <version>${teamengine.version}</version>
                <type>war</type>
              </artifactItem>
              <artifactItem>
                <groupId>org.opengis.cite.teamengine</groupId>
                <artifactId>teamengine-web</artifactId>
                <version>${teamengine.version}</version>
                <classifier>common-libs</classifier>
                <type>zip</type>
              </artifactItem>
              <artifactItem>
                <groupId>org.opengis.cite.teamengine</groupId>
                <artifactId>teamengine-console</artifactId>
                <version>${teamengine.version}</version>
                <classifier>base</classifier>
                <type>zip</type>
              </artifactItem>
            </artifactItems>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.7.1</version>
          <configuration>
            <descriptors>
              <descriptor>${basedir}/src/assembly/deps.xml</descriptor>
              <descriptor>${basedir}/src/assembly/ctl-scripts.xml</descriptor>
              <descriptor>${basedir}/src/assembly/aio.xml</descriptor>
            </descriptors>
          </configuration>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>single</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-scm-publish-plugin</artifactId>
          <version>3.3.0</version>
          <configuration>
            <scmBranch>gh-pages</scmBranch>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>3.5.1</version>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.12</version>
          <executions>
            <execution>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>report</id>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.13.0</version>
        <configuration>
          <source>17</source>
          <target>17</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>io.spring.javaformat</groupId>
        <artifactId>spring-javaformat-maven-plugin</artifactId>
        <version>0.0.43</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <inherited>true</inherited>
            <goals>
              <goal>validate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>3.9</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>17</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.7.0</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>sonatype-nexus</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <doCheck>false</doCheck>
          <doUpdate>false</doUpdate>
          <shortRevisionLength>10</shortRevisionLength>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.1.1</version>
        <configuration>
          <tagNameFormat>@{project.version}</tagNameFormat>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <!-- Disable TestNG runner (enabled due to compile dependency) -->
          <testNGArtifactName>null:null</testNGArtifactName>
          <junitArtifactName>junit:junit</junitArtifactName>
          <includes>
            <include>**/Verify*.java</include>
            <include>**/*Tests.java</include>
            <include>**/*Test.java</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.4.2</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
              <Build-Host>${hostname}</Build-Host>
              <Build-Time>${maven.build.timestamp}</Build-Time>
              <Build-Revision>${buildNumber}</Build-Revision>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.11.1</version>
        <configuration>
          <docfilessubdirs>true</docfilessubdirs>
          <show>package</show>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.12.1</version>
        <executions>
          <execution>
            <id>site-package</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-module-xhtml</artifactId>
            <version>1.12.0</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-module-markdown</artifactId>
            <version>1.12.0</version>
          </dependency>
          <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-converter-doxia-module</artifactId>
            <version>3.0.0</version>
          </dependency>
        </dependencies>
        <configuration>
          <relativizeDecorationLinks>false</relativizeDecorationLinks>
        </configuration>
      </plugin>
    </plugins>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
      <resource>
        <directory>src/main/javadoc</directory>
        <filtering>true</filtering>
        <targetPath>doc/${ets-code}/${project.version}</targetPath>
      </resource>
    </resources>

    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.7.0</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>licenses</report>
              <report>issue-management</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.10.1</version>
        <reportSets>
          <reportSet>
            <id>default</id>
            <configuration>
              <docfilessubdirs>true</docfilessubdirs>
              <show>package</show>
              <additionalJOption>-Xdoclint:none</additionalJOption>
              <detectOfflineLinks>false</detectOfflineLinks>
            </configuration>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>windows</id>
      <activation>
        <os>
          <family>windows</family>
        </os>
      </activation>
      <properties>
        <hostname>${env.COMPUTERNAME}</hostname>
      </properties>
    </profile>
    <profile>
      <id>unix</id>
      <activation>
        <os>
          <family>unix</family>
        </os>
      </activation>
      <properties>
        <hostname>${env.HOSTNAME}</hostname>
      </properties>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.7</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.3.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
