<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
  ~ The contents of this file are subject to the Terracotta Public License Version
  ~ 2.0 (the "License"); You may not use this file except in compliance with the
  ~ License. You may obtain a copy of the License at
  ~
  ~ http://terracotta.org/legal/terracotta-public-license.
  ~
  ~ Software distributed under the License is distributed on an "AS IS" basis,
  ~ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
  ~ the specific language governing rights and limitations under the License.
  ~
  ~ The Covered Software is Terracotta Configuration.
  ~
  ~ The Initial Developer of the Covered Software is
  ~ Terracotta, Inc., a Software AG company
  ~
  -->

<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>

  <parent>
    <groupId>org.terracotta.internal</groupId>
    <artifactId>tc-config-parent</artifactId>
    <version>10.7.3</version>
    <relativePath>..</relativePath>
  </parent>

  <artifactId>tc-config-parser</artifactId>
  <packaging>jar</packaging>
  <name>tc-config-parser</name>
  <dependencies>
    <dependency>
      <groupId>org.terracotta</groupId>
      <artifactId>entity-server-api</artifactId>
      <version>${terracotta-apis.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.terracotta</groupId>
      <artifactId>tcconfig-schema</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <build>
    <testResources>
      <testResource>
        <directory>src/test/xsd/</directory>
      </testResource>
      <testResource>
        <directory>src/test/resources</directory>
        <filtering>true</filtering>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.jvnet.jaxb2.maven2</groupId>
        <artifactId>maven-jaxb2-plugin</artifactId>
        <executions>
          <execution>
            <id>test</id>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <strict>false</strict>
          <schemaDirectory>src/test/xsd</schemaDirectory>
          <catalogs>
            <catalog>
              <dependencyResource>
                <groupId>org.terracotta</groupId>
                <artifactId>tcconfig-schema</artifactId>
                <resource>catalog.cat</resource>
              </dependencyResource>
            </catalog>
          </catalogs>
          <episodes>
            <episode>
              <groupId>org.terracotta</groupId>
              <artifactId>tcconfig-schema</artifactId>
            </episode>
          </episodes>
          <generateDirectory>${project.build.directory}/generated-test-sources/xjc</generateDirectory>
          <addCompileSourceRoot>false</addCompileSourceRoot>
          <addTestCompileSourceRoot>true</addTestCompileSourceRoot>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <configuration>
              <tasks>
                <delete dir="${project.build.directory}/generated-test-sources/xjc/org"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
