<?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">
  <modelVersion>4.0.0</modelVersion>
  <artifactId>ets-wms-client13</artifactId>
  <groupId>org.opengis.cite</groupId>
  <version>1.6.1</version>

  <name>Conformance Test Suite - OGC Web Map Service Client</name>
  <description>
  Verifies conformance of implementations to OGC Web Map Service Client.
  </description>
  <url>https://github.com/opengeospatial/ets-wms-client13</url>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://opensource.org/licenses/Apache-2.0</url>
    </license>
  </licenses>

  <organization>
    <name>Open Geospatial Consortium</name>
    <url>http://www.opengeospatial.org</url>
  </organization>
  <scm>
    <url>https://github.com/opengeospatial/ets-wms-client13</url>
    <connection>scm:git:https://github.com/opengeospatial/ets-wms-client13.git</connection>
    <developerConnection>scm:git:git@github.com:opengeospatial/ets-wms-client13.git</developerConnection>
    <tag>1.6.1</tag>
  </scm>
  <issueManagement>
    <system>GitHub Issue Tracker</system>
    <url>https://github.com/opengeospatial/ets-wms-client13/issues</url>
  </issueManagement>

  <developers>
    <developer>
      <name>Keshav Nangare</name>
      <url>https://github.com/keshav-nangare</url>
      <timezone>Asia/Kolkata</timezone>
    </developer> 
  </developers>

  <properties>
    <ets-code>wms-client</ets-code>
    <spec-version>1.3.0</spec-version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <docker.teamengine.version>5.4.1</docker.teamengine.version>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <!-- Dummy plugin to configure Eclipse m2e plug-in only -->
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-remote-resources-plugin</artifactId>
                    <versionRange>[1.5,)</versionRange>
                    <goals>
                      <goal>process</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                      <runOnIncremental>false</runOnIncremental>
                    </execute>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>io.fabric8</groupId>
          <artifactId>docker-maven-plugin</artifactId>
          <version>0.28.0</version>
          <configuration>
            <images>
              <image>
                <name>ogccite/${project.artifactId}</name>
                <build>
                  <dockerFileDir>${project.basedir}/src/docker</dockerFileDir>
                  <tags>
                    <tag>${project.version}-teamengine-${docker.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>
                <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>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.0.0</version>
          <configuration>
            <artifactItems>
              <artifactItem>
                <groupId>org.opengis.cite.teamengine</groupId>
                <artifactId>teamengine-web</artifactId>
                <version>${docker.teamengine.version}</version>
                <type>war</type>
              </artifactItem>
              <artifactItem>
                <groupId>org.opengis.cite.teamengine</groupId>
                <artifactId>teamengine-web</artifactId>
                <version>${docker.teamengine.version}</version>
                <classifier>common-libs</classifier>
                <type>zip</type>
              </artifactItem>
              <artifactItem>
                <groupId>org.opengis.cite.teamengine</groupId>
                <artifactId>teamengine-console</artifactId>
                <version>${docker.teamengine.version}</version>
                <classifier>base</classifier>
                <type>zip</type>
              </artifactItem>
            </artifactItems>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.6</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-assembly-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <descriptors>
            <descriptor>${basedir}/src/assembly/ctl.xml</descriptor>
            <descriptor>${basedir}/src/assembly/deps.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.4</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-markdown</artifactId>
            <version>1.6</version>
          </dependency>
        </dependencies>
        <configuration>
          <relativizeDecorationLinks>false</relativizeDecorationLinks>
          <generateReports>false</generateReports>
          <skipDeploy>true</skipDeploy>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19</version>
        <configuration>
          <includes>
            <include>**/Verify*.java</include>
            <include>**/*Tests.java</include>
            <include>**/*Test.java</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.4</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>2.5.3</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <tagNameFormat>@{project.version}</tagNameFormat>
          <releaseProfiles>release</releaseProfiles>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-scm-publish-plugin</artifactId>
        <version>1.1</version>
        <configuration>
          <scmBranch>gh-pages</scmBranch>
        </configuration>
      </plugin>
    </plugins>

    <testResources>
      <testResource>
        <directory>${basedir}/src/test/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>*.properties</include>
        </includes>
      </testResource>
    </testResources>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
        <reportSets>
          <reportSet>
            <reports>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <dependencies>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.7</version>
    </dependency>
    <dependency>
      <groupId>org.opengis.cite.teamengine</groupId>
      <artifactId>teamengine-spi</artifactId>
      <version>5.3</version>
    </dependency>
    <dependency>
      <groupId>org.opengis.cite.teamengine</groupId>
      <artifactId>teamengine-core</artifactId>
      <version>5.3</version>
    </dependency>
    <dependency>
      <groupId>com.googlecode.json-simple</groupId>
      <artifactId>json-simple</artifactId>
      <version>1.1.1</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>20080701</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.8.9</version>
      <type>jar</type>
    </dependency>
    <!--
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.16</version>
      <scope>runtime</scope>
    </dependency>
    -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</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>
        </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>

  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <site>
      <id>site</id>
      <url>scm:git:git@github.com:opengeospatial/ets-wms-client13.git</url>
    </site>
  </distributionManagement>
</project>
