<?xml version="1.0"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache 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://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<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">
  <parent>
    <artifactId>continuum-data-management</artifactId>
    <groupId>org.apache.continuum</groupId>
    <version>1.3.4</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>continuum-legacy</artifactId>
  <name>Continuum :: Legacy Model</name>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.modello</groupId>
        <artifactId>modello-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>modello-continuum-metadata</id>
            <goals>
              <goal>java</goal>
              <goal>stax-reader</goal>
              <goal>stax-writer</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <version>1.0.9</version>
          <packageWithVersion>true</packageWithVersion>
          <models>
            <model>src/main/mdo/continuum.xml</model>
          </models>
          <useJava5>true</useJava5>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jpox-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>enhance</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>hack-resources</id>
            <phase>process-classes</phase>
            <configuration>
              <tasks>
                <move file="target/classes/META-INF/package.jdorepl" tofile="target/classes/META-INF/package.jdorepl109" />
                <move file="target/classes/META-INF/package.jdo" tofile="target/classes/META-INF/package.jdo109" />
                <delete file="target/classes/package.jdo" />
                <delete file="target/classes/package.jdorepl" />
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
          <execution>
            <id>copy-resources</id>
            <!-- Need to perform the workaround for MODELLO-91 first -->
            <phase>process-classes</phase>
            <configuration>
              <tasks>
                <copy file="target/classes/META-INF/package.jdorepl109" todir="target/classes" />
                <copy file="target/classes/META-INF/package.jdo109" todir="target/classes" />
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>net.java.dev.stax-utils</groupId>
      <artifactId>stax-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>stax</groupId>
      <artifactId>stax-api</artifactId>
    </dependency>
  </dependencies>
</project>
