<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <artifactId>gedcomx-parent</artifactId>
  <groupId>org.gedcomx</groupId>
  <name>GEDCOM X - Parent Project</name>
  <description>The Java implementation of the GEDCOM X specification set.</description>
  <url>https://github.com/FamilySearch/gedcomx-java</url>
  <version>1.0.182.M1</version>
  <packaging>pom</packaging>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <enunciate.version>1.29</enunciate.version>
    <root.basedir>${project.basedir}</root.basedir>
    <year>${inceptionYear}</year>

    <jersey.version>1.17</jersey.version>

    <java.compiler.version>1.6</java.compiler.version>
    <maven-surefire-plugin.version>2.14.1</maven-surefire-plugin.version>
    <maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
    <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
    <maven-resources-plugin.version>2.6</maven-resources-plugin.version>
    <show.output>false</show.output>
  </properties>

  <modules>
    <!--gedcomx-core modules-->
    <module>gedcomx-rt-support</module>
    <module>gedcomx-test-support</module>
    <module>enunciate-gedcomx-support</module>
    <module>gedcomx-model</module>
    <module>gedcomx-fileformat</module>
    <module>gedcomx-date</module>

    <!--gedcomx-rs modules-->
    <module>gedcomx-atom</module>
    <module>gedcomx-rs-rt-support</module>
    <module>gedcomx-rs-client</module>

    <!--extension modules-->
    <module>extensions/familysearch</module>

  </modules>

  <dependencies>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>5.14</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.enunciate</groupId>
      <artifactId>enunciate-core-rt</artifactId>
      <version>${enunciate.version}</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-jaxrs</artifactId>
      <version>1.8.0</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-xc</artifactId>
      <version>1.8.0</version>
    </dependency>
  </dependencies>

  <scm>
    <connection>scm:git:git@github.com:FamilySearch/gedcomx-java.git</connection>
    <developerConnection>scm:git:git@github.com:FamilySearch/gedcomx-java.git</developerConnection>
    <url>https://github.com/FamilySearch/gedcomx-java</url>
    <tag>1.0.182.M1</tag>
  </scm>

  <build>
    <resources>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <encoding>UTF-8</encoding>
          <source>${java.compiler.version}</source>
          <target>${java.compiler.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
          <systemPropertyVariables>
            <show.output>${show.output}</show.output>
            <recipes.dir>${project.build.directory}/recipes</recipes.dir>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-test-classes</phase>
            <configuration>
              <tasks>
                <delete dir="${project.build.directory}/recipes" />
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven-source-plugin.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>${maven-resources-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>com.google.code.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <version>1.4.0</version>
        <configuration>
          <header>${root.basedir}/LICENSE-header.txt</header>
          <includes>
            <include>src/main/java/**</include>
          </includes>
          <properties>
            <copyright.year>${inceptionYear}</copyright.year>
          </properties>
        </configuration>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.5</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.enunciate</groupId>
                    <artifactId>maven-enunciate-plugin</artifactId>
                    <versionRange>[1.25,)</versionRange>
                    <goals>
                      <goal>assemble</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                      <runOnIncremental>false</runOnIncremental>
                    </execute>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <versionRange>[1.3,)</versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                      <runOnIncremental>false</runOnIncremental>
                    </execute>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <licenses>
    <license>
      <name>Th Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Ryan Heaton</name>
      <url>https://github.com/stoicflame</url>
    </developer>
    <developer>
      <name>John Clark</name>
      <url>https://github.com/jonnymbgood</url>
    </developer>
    <developer>
      <name>Todd Chapman</name>
      <url>https://github.com/wahkara</url>
    </developer>
    <developer>
      <name>Robert Lee</name>
      <url>https://github.com/leerobertw</url>
    </developer>
    <developer>
      <name>David Nash</name>
      <url>https://github.com/dnash21e</url>
    </developer>
    <developer>
      <name>Randy Wilson</name>
      <url>https://github.com/ranbo</url>
    </developer>
  </developers>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.kohsuke</groupId>
            <artifactId>pgp-maven-plugin</artifactId>
            <version>1.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <secretkey>keyfile:${env.PGP_SECRET_KEYFILE}</secretkey>
              <passphrase>literal:</passphrase>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <repositories>
    <repository>
      <id>codehaus-release-repo</id>
      <name>Codehaus Release Repository</name>
      <url>http://repository.codehaus.org/</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>codehaus-release-repo</id>
      <name>Codehaus Release Repository</name>
      <url>http://repository.codehaus.org/</url>
    </pluginRepository>
  </pluginRepositories>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
</project>
