All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kuali.common.deploy.mvn.impex-with-sql.xml Maven / Gradle / Ivy

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

    Copyright 2004-2013 The Kuali Foundation

    Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php

    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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>${parent.groupId}</groupId>
    <artifactId>${parent.artifactId}</artifactId>
    <version>${parent.version}</version>
  </parent>
  <groupId>${project.groupId}</groupId>
  <artifactId>kuali-impex-with-sql</artifactId>
  <version>${project.version}</version>
  <name>Kuali Impex with SQL</name>
  <description>
    Convert Ant Impex XML files into Maven Impex XML files
    Put the Maven Impex data XML files into ${project.build.directory}/impex/xml
    Generate Maven Impex schema XML at ${project.build.directory}/impex/${impex.schema.name}.xml
    Generate a DTD into ${project.build.directory}/impex/${impex.schema.name}.dtd
    Generate SQL for Oracle + MySQL into ${project.build.directory}/impex/sql
  </description>
  <properties>
    <!--
      This pom requires 3 properties:
      1 - impex.basedir
      2 - impex.schema.name
      3 - plugin.impex.version
    -->

    <impex.oracle.phase>process-resources</impex.oracle.phase>
    <impex.mysql.phase>process-resources</impex.mysql.phase>
    <!-- Once H2 support is ready, default this to "process-resources" -->
    <impex.h2.phase>none</impex.h2.phase>
    <impex.ant.dir>${impex.basedir}/src/main/resources</impex.ant.dir>
    <impex.ant.schema>${impex.ant.dir}/schema.xml</impex.ant.schema>
    <impex.mvn.dir>${impex.basedir}/target/impex</impex.mvn.dir>
    <impex.mvn.xml>${impex.mvn.dir}/xml</impex.mvn.xml>
    <impex.mvn.sql>${impex.mvn.dir}/sql</impex.mvn.sql>
    <impex.mvn.schema>${impex.mvn.dir}/${impex.schema.name}.xml</impex.mvn.schema>
    <impex.mvn.dtd>${impex.mvn.dir}/${impex.schema.name}.dtd</impex.mvn.dtd>
    <impex.context.path>${impex.basedir}/target/reports/context.datadtd.properties</impex.context.path>
    <impex.report.file>../reports/report.${impex.schema.name}.datadtd.generation</impex.report.file>
  </properties>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.kuali.maven.plugins</groupId>
          <artifactId>maven-impex-plugin</artifactId>
          <version>${plugin.impex.version}</version>
          <configuration>
            <artifactId>${impex.schema.name}</artifactId>
            <oldSchemaXMLFile>${impex.ant.schema}</oldSchemaXMLFile>
            <newSchemaXMLFile>${impex.mvn.schema}</newSchemaXMLFile>
            <oldDataXMLDir>${impex.ant.dir}</oldDataXMLDir>
            <newDataOutputDir>${impex.mvn.xml}</newDataOutputDir>
            <includeVersionInComment>false</includeVersionInComment>
            <antCompatibilityMode>false</antCompatibilityMode>
            <schemaXMLFile>${impex.mvn.schema}</schemaXMLFile>
            <schemaIncludes>${impex.schema.name}.xml</schemaIncludes>
            <schemaDir>${impex.mvn.dir}</schemaDir>
            <dataDTD>${impex.mvn.dtd}</dataDTD>
            <dataXMLDir>${impex.mvn.xml}</dataXMLDir>
            <baseSqlDir>${impex.mvn.sql}</baseSqlDir>
          </configuration>
          <executions>
            <execution>
              <id>prepare</id>
              <phase>process-resources</phase>
              <goals>
                <goal>morphschema</goal>
                <goal>morphdata</goal>
                <goal>datadtd</goal>
              </goals>
              <configuration>
                <outputDir>${impex.mvn.dir}</outputDir>
                <contextPropertiesPath>${impex.context.path}</contextPropertiesPath>
                <reportFile>${impex.report.file}</reportFile>
              </configuration>
            </execution>
            <execution>
              <id>oracle</id>
              <phase>${impex.oracle.phase}</phase>
              <goals>
                <goal>schemasql</goal>
                <goal>datasql</goal>
                <goal>generatetablelisting</goal>
              </goals>
              <configuration>
                <targetDatabase>oracle</targetDatabase>
                <outputDir>${impex.mvn.sql}</outputDir>
              </configuration>
            </execution>
            <execution>
              <id>mysql</id>
              <phase>${impex.mysql.phase}</phase>
              <goals>
                <goal>schemasql</goal>
                <goal>datasql</goal>
                <goal>generatetablelisting</goal>
              </goals>
              <configuration>
                <targetDatabase>mysql</targetDatabase>
                <outputDir>${impex.mvn.sql}</outputDir>
              </configuration>
            </execution>
            <execution>
              <id>h2</id>
              <phase>${impex.h2.phase}</phase>
              <goals>
                <goal>schemasql</goal>
                <goal>datasql</goal>
              </goals>
              <configuration>
                <targetDatabase>h2</targetDatabase>
                <outputDir>${impex.mvn.sql}</outputDir>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.kuali.maven.plugins</groupId>
        <artifactId>maven-impex-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy