<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>9</version>
  <packaging>pom</packaging>

  <name>Common ETS POM</name>
  <description>Top-level POM for OGC conformance test suite projects.</description>
  <url>http://cite.opengeospatial.org/</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-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>9</tag>
  </scm>
  <developers>
    <developer>
      <name>R. Martell</name>
      <url>https://github.com/rjmartell</url>
      <timezone>Canada/Pacific</timezone>
    </developer>
  </developers>

  <properties>
    <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>
        <groupId>org.opengis.cite.teamengine</groupId>
        <artifactId>teamengine-spi</artifactId>
        <version>4.9</version>
      </dependency>
      <dependency>
        <groupId>org.opengis.cite</groupId>
        <artifactId>schema-utils</artifactId>
        <version>1.8</version>
      </dependency>
      <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-client</artifactId>
        <version>1.19</version>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.9.4</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>1.10.19</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>4.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.19.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>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.6.0</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.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>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.6</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>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <tagNameFormat>@{project.version}</tagNameFormat>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <useReleaseProfile>false</useReleaseProfile>
            <releaseProfiles>release</releaseProfiles>
            <goals>deploy</goals>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.5.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.7</version>
            </dependency>
            <dependency>
              <groupId>org.apache.maven.doxia</groupId>
              <artifactId>doxia-module-markdown</artifactId>
              <version>1.7</version>
            </dependency>
          </dependencies>
          <configuration>
            <relativizeDecorationLinks>false</relativizeDecorationLinks>
          </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>
      </plugins>
    </pluginManagement>

    <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>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.9</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>license</report>
              <report>issue-tracking</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <reportSets>
          <reportSet>
            <id>default</id>
            <configuration>
              <docfilessubdirs>true</docfilessubdirs>
              <show>package</show>
              <links>
                <link>http://testng.org/javadocs/</link>
              </links>
            </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>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
