<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>
  <groupId>org.opengis.cite</groupId>
  <artifactId>geomatics-geotk</artifactId>
  <version>1.7</version>
  <packaging>jar</packaging>
  <name>Geomatics Utilities</name>
  <description>
  Provides support for processing spatial data and associated metadata using
  various Geotk modules (see http://www.geotoolkit.org/).
  </description>
  <url>http://opengeospatial.github.io/geomatics-geotk/</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>
    <connection>scm:git:https://github.com/opengeospatial/geomatics-geotk.git</connection>
    <developerConnection>scm:git:git@github.com:opengeospatial/geomatics-geotk.git</developerConnection>
    <url>https://github.com/opengeospatial/geomatics-geotk</url>
    <tag>1.7</tag>
  </scm>
  <issueManagement>
    <system>GitHub Issue Tracker</system>
    <url>https://github.com/opengeospatial/geomatics-geotk/issues</url>
  </issueManagement>
  <developers>
    <developer>
      <name>R. Martell</name>
      <url>https://github.com/rjmartell</url>
      <timezone>America/Vancouver</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>
    <geotk.version>3.21</geotk.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.17</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-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <configuration>
          <docfilessubdirs>true</docfilessubdirs>
          <show>package</show>
          <links>
            <link>http://www.geoapi.org/3.0/javadoc/</link>
            <link>http://tsusiatsoftware.net/jts/javadoc/</link>
          </links>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </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.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</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.4</version>
        <configuration>
          <descriptors>
            <descriptor>${basedir}/src/assembly/with-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-release-plugin</artifactId>
        <version>2.5</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.3</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.5</version>
          </dependency>
        </dependencies>
        <configuration>
          <relativizeDecorationLinks>false</relativizeDecorationLinks>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.3</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>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.geotoolkit.pending</groupId>
      <artifactId>geotk-xml-gml</artifactId>
      <version>${geotk.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotoolkit.pending</groupId>
      <artifactId>geotk-jtswrapper</artifactId>
      <version>${geotk.version}</version>
      <exclusions>
        <exclusion>
          <groupId>com.vividsolutions</groupId>
          <artifactId>jts</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.vividsolutions</groupId>
      <artifactId>jts</artifactId>
      <version>1.13</version>
    </dependency>
    <dependency>
      <groupId>org.geotoolkit</groupId>
      <artifactId>geotk-epsg</artifactId>
      <version>${geotk.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derby</artifactId>
      <version>10.10.1.1</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</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.9.1</version>
        <reportSets>
          <reportSet>
            <id>default</id>
            <configuration>
              <docfilessubdirs>true</docfilessubdirs>
              <show>package</show>
              <links>
                <link>http://www.geoapi.org/3.0/javadoc/</link>
                <link>http://tsusiatsoftware.net/jts/javadoc/</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.5</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>2.2.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <repositories>
    <!-- Geotk 3.21 not available in Central repository -->
    <repository>
      <id>geotoolkit</id>
      <name>Geotk Modules</name>
      <url>http://maven.geotoolkit.org/</url>
      <layout>default</layout>
    </repository>
  </repositories>
</project>
