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

  <groupId>org.terracotta</groupId>
  <artifactId>tcconfig-schema</artifactId>
  <packaging>jar</packaging>
  <name>tcconfig-schema</name>

  <build>
    <resources>
      <resource>
        <directory>src/main/xsd</directory>
        <filtering>true</filtering>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.jvnet.jaxb2.maven2</groupId>
        <artifactId>maven-jaxb2-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <schemaDirectory>src/main/xsd</schemaDirectory>
              <bindingDirectory>src/main/xjb</bindingDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-resources-all-nodes</id>
            <phase>compile</phase>
            <configuration>
              <tasks>
                <copy file="target/classes/terracotta.xsd" toFile="target/terracotta-${project.version}.xsd"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </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.apache.maven.plugins
                    </groupId>
                    <artifactId>
                      maven-jar-plugin
                    </artifactId>
                    <versionRange>
                      [2.3.1,)
                    </versionRange>
                    <goals>
                      <goal>jar</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <versionRange>[1.7,)</versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>
