<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>schema-utils</artifactId>
  <version>1.8</version>
  <packaging>jar</packaging>
  <name>Schema Validation Utilities</name>
  <description>
  Provides support for validating XML representations using the following 
  schema languages: W3C XML Schema 1.0, Schematron (ISO/IEC 19757-3:2006), 
  and RELAX NG (ISO/IEC 19757-2:2008). It is also possible to access and 
  query the post-schema-validation infoset (PSVI) using the Xerces XML 
  Schema API.
  </description>
  <url>http://opengeospatial.github.io/schema-utils/</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/schema-utils.git</connection>
    <developerConnection>scm:git:git@github.com:opengeospatial/schema-utils.git</developerConnection>
    <url>https://github.com/opengeospatial/schema-utils</url>
    <tag>1.8</tag>
  </scm>
  <issueManagement>
    <system>GitHub Issue Tracker</system>
    <url>https://github.com/opengeospatial/schema-utils/issues</url>
  </issueManagement>
  <developers>
    <developer>
      <name>R. Martell</name>
      <url>https://github.com/rjmartell</url>
      <timezone>America/Vancouver</timezone>
    </developer>
  </developers>

  <build>
    <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-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <configuration>
          <docfilessubdirs>true</docfilessubdirs>
          <show>package</show>
          <links>
            <link>http://xerces.apache.org/xerces2-j/javadocs/xerces2/</link>
            <link>http://xerces.apache.org/xerces2-j/javadocs/xni/</link>
            <link>http://xerces.apache.org/xml-commons/components/apidocs/resolver/</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.5.1</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-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-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>
  </build>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
    <saxon.version>9.0.0.8</saxon.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.opengis.cite.saxon</groupId>
      <artifactId>saxon9</artifactId>
      <version>${saxon.version}</version>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.11.0</version>
    </dependency>
    <dependency>
      <groupId>xml-resolver</groupId>
      <artifactId>xml-resolver</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>com.thaiopensource</groupId>
      <artifactId>jing</artifactId>
      <version>20091111</version>
      <exclusions>
        <exclusion>
          <groupId>net.sf.saxon</groupId>
          <artifactId>saxon</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xerces</groupId>
          <artifactId>xercesImpl</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <configuration>
          <docfilessubdirs>true</docfilessubdirs>
          <show>package</show>
          <links>
            <link>http://xerces.apache.org/xerces2-j/javadocs/xerces2/</link>
            <link>http://xerces.apache.org/xerces2-j/javadocs/xni/</link>
            <link>http://xerces.apache.org/xml-commons/components/apidocs/resolver/</link>
          </links>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <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>
    </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>
