<?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-model</artifactId>
  <name>GEDCOM X - Model</name>

  <parent>
    <groupId>org.gedcomx</groupId>
    <artifactId>gedcomx-parent</artifactId>
    <version>1.0.170.M1</version>
  </parent>

  <properties>
    <!--we either have to refer to the parent directory (making modules-->
    <!--incapable of building outside the context of the parent) or-->
    <!--we have to duplicate the config files to all modules. Currently-->
    <!--opting for the former.-->
    <root.basedir>${basedir}/..</root.basedir>
    <recipes.dir>${project.build.directory}/recipes</recipes.dir>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.enunciate</groupId>
        <artifactId>maven-enunciate-plugin</artifactId>
        <version>${enunciate.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>assemble</goal>
            </goals>
            <configuration>
              <stepTo>build</stepTo>
              <forceWarPackaging>false</forceWarPackaging>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.gedcomx</groupId>
            <artifactId>enunciate-gedcomx-support</artifactId>
            <version>${project.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <recipes.dir>${recipes.dir}</recipes.dir>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.outputDirectory}</outputDirectory>
              <resources>
                <resource>
                  <directory>${recipes.dir}</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>delete-recipes</id>
            <phase>process-test-classes</phase>
            <configuration>
              <tasks>
                <delete dir="${recipes.dir}" />
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.fasterxml.woodstox</groupId>
      <artifactId>woodstox-core</artifactId>
      <version>5.0.1</version>
    </dependency>
    <dependency>
      <groupId>org.gedcomx</groupId>
      <artifactId>gedcomx-rt-support</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.gedcomx</groupId>
      <artifactId>gedcomx-test-support</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>
