<?xml version="1.0" encoding="UTF-8"?>
<!--

  Copyright (C) Christian Schulte, 2005-206
  All rights reserved.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:

    o Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.

    o Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in
      the documentation and/or other materials provided with the
      distribution.

  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

  $JOMC: pom.xml 4266 2012-02-16 23:02:14Z schulte2005 $

-->
<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>jomc-parent</artifactId>
    <groupId>org.jomc</groupId>
    <version>1.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jomc-model</artifactId>
  <name>JOMC Model</name>
  <description>Object management and configuration model.</description>
  <url>${jomc.artifacts.url}/${project.artifactId}-${project.version}</url>
  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <filtering>false</filtering>
        <directory>src/main/schemas</directory>
        <targetPath>org/jomc/model</targetPath>
        <includes>
          <include>jomc-1.2.xsd</include>
        </includes>
      </resource>
      <resource>
        <filtering>false</filtering>
        <directory>${project.build.directory}/deprecated-schemas</directory>
        <targetPath>org/jomc/model</targetPath>
        <includes>
          <include>*.xsd</include>
        </includes>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <filtering>true</filtering>
        <directory>src/test/resources</directory>
      </testResource>
      <testResource>
        <filtering>false</filtering>
        <directory>src/test/objects</directory>
      </testResource>
      <testResource>
        <filtering>false</filtering>
        <directory>src/test/schemas</directory>
        <targetPath>org/jomc/model/test</targetPath>
        <includes>
          <include>jomc-test-1.2.xsd</include>
        </includes>
      </testResource>
    </testResources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>xml-maven-plugin</artifactId>
          <executions>
            <execution>
              <id>default-transform-testsuite</id>
              <phase>generate-test-sources</phase>
              <goals>
                <goal>transform</goal>
              </goals>
              <configuration>
                <transformationSets>
                  <transformationSet>
                    <stylesheet>src/test/xslt/ModulesTestSuite.xsl</stylesheet>
                    <dir>src/test/resources/org/jomc/model/test</dir>
                    <outputDir>${project.build.directory}/generated-test-sources/testsuite/org/jomc/model/test</outputDir>
                    <includes>
                      <include>ModulesTestSuite.xml</include>
                    </includes>
                    <fileMappers>
                      <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
                        <targetExtension>.java</targetExtension>
                      </fileMapper>
                    </fileMappers>
                  </transformationSet>
                  <transformationSet>
                    <stylesheet>src/test/xslt/DefaultModelValidatorTestSuite.xsl</stylesheet>
                    <dir>src/test/resources/org/jomc/model/modlet/test</dir>
                    <outputDir>${project.build.directory}/generated-test-sources/testsuite/org/jomc/model/modlet/test</outputDir>
                    <includes>
                      <include>DefaultModelValidatorTestSuite.xml</include>
                    </includes>
                    <fileMappers>
                      <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
                        <targetExtension>.java</targetExtension>
                      </fileMapper>
                    </fileMappers>
                  </transformationSet>
                </transformationSets>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <executions>
            <execution>
              <id>default-add-test-source</id>
              <phase>generate-test-sources</phase>
              <goals>
                <goal>add-test-source</goal>
              </goals>
              <configuration>
                <sources>
                  <source>${project.build.directory}/generated-test-sources/testsuite</source>
                </sources>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <executions>
            <execution>
              <id>default-schemas-copy</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>copy-resources</goal>
              </goals>
              <configuration>
                <outputDirectory>${project.build.directory}/schemas</outputDirectory>
                <resources>
                  <resource>
                    <directory>src/main/schemas</directory>
                    <filtering>false</filtering>
                    <includes>
                      <include>*.xsd</include>
                      <include>*.xjb</include>
                    </includes>
                  </resource>
                  <resource>
                    <directory>${remoteResourcesOutputDirectory}</directory>
                    <filtering>false</filtering>
                    <includes>
                      <include>**/*.txt</include>
                    </includes>
                  </resource>
                </resources>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <executions>
            <execution>
              <id>default-schemas-unpack</id>
              <phase>generate-resources</phase>
              <goals>
                <goal>unpack</goal>
              </goals>
              <configuration>
                <artifactItems>
                  <artifactItem>
                    <groupId>org.jomc</groupId>
                    <artifactId>jomc-model</artifactId>
                    <version>1.0</version>
                    <classifier>schemas</classifier>
                    <outputDirectory>${project.build.directory}/deprecated-schemas</outputDirectory>
                  </artifactItem>
                </artifactItems>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <executions>
            <execution>
              <id>default-schemas-jar</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <classesDirectory>${project.build.directory}/schemas</classesDirectory>
                <classifier>schemas</classifier>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>wagon-maven-plugin</artifactId>
          <executions>
            <execution>
              <id>site-deploy-upload</id>
              <phase>site-deploy</phase>
              <goals>
                <goal>upload</goal>
              </goals>
              <configuration>
                <fromDir>${basedir}/src/main/schemas</fromDir>
                <includes>*.xsd</includes>
                <serverId>jomc.sourceforge.net</serverId>
                <toDir>model</toDir>
                <url>${jomc.artifacts.distribution.base.url}</url>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.jvnet.jaxb2.maven2</groupId>
          <artifactId>maven-jaxb21-plugin</artifactId>
          <executions>
            <execution>
              <id>default-test-generate</id>
              <phase>generate-test-sources</phase>
              <goals>
                <goal>generate</goal>
              </goals>
              <configuration>
                <args>
                  <arg>-npa</arg>
                  <arg>-copy-constructor</arg>
                  <arg>-mark-generated</arg>
                  <arg>-Xinject-code</arg>
                  <arg>-Xinheritance</arg>
                </args>
                <addCompileSourceRoot>false</addCompileSourceRoot>
                <addTestCompileSourceRoot>true</addTestCompileSourceRoot>
                <bindingDirectory>src/test/schemas</bindingDirectory>
                <extension>true</extension>
                <generateDirectory>${xjcTestOutputDirectory}</generateDirectory>
                <readOnly>true</readOnly>
                <schemaDirectory>src/test/schemas</schemaDirectory>
                <plugins>
                  <plugin>
                    <groupId>org.jvnet.jaxb2_commons</groupId>
                    <artifactId>jaxb2-basics</artifactId>
                    <version>${jaxb2-basics.version}</version>
                  </plugin>
                  <plugin>
                    <groupId>net.sourceforge.ccxjc</groupId>
                    <artifactId>cc-xjc-plugin</artifactId>
                    <version>${cc-xjc-plugin.version}</version>
                  </plugin>
                </plugins>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.jvnet.jaxb2.maven2</groupId>
        <artifactId>maven-jaxb21-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>wagon-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.jomc</groupId>
      <artifactId>jomc-util</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.jomc</groupId>
      <artifactId>jomc-modlet</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <distributionManagement>
    <site>
      <id>jomc.sourceforge.net</id>
      <name>JOMC Site</name>
      <url>${jomc.artifacts.distribution.url}/${project.artifactId}-${project.version}</url>
    </site>
  </distributionManagement>
  <profiles>
    <profile>
      <id>jdk15</id>
      <activation>
        <jdk>1.5</jdk>
      </activation>
      <dependencies>
        <dependency>
          <groupId>javax.annotation</groupId>
          <artifactId>jsr250-api</artifactId>
          <scope>compile</scope>
          <optional>true</optional>
        </dependency>
        <dependency>
          <groupId>javax.activation</groupId>
          <artifactId>activation</artifactId>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>javax.xml.bind</groupId>
          <artifactId>jaxb-api</artifactId>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>com.sun.xml.bind</groupId>
          <artifactId>jaxb-impl</artifactId>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
