<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>hu.blackbelt.judo.tatami</groupId>
    <artifactId>judo-tatami-base-parent</artifactId>
    <version>1.1.5</version>
  </parent>
  <groupId>hu.blackbelt.judo.tatami</groupId>
  <artifactId>judo-tatami-asm2rdbms</artifactId>
  <version>1.1.5</version>
  <packaging>bundle</packaging>
  <name>Judo :: Tatami :: Asm2Rdbms</name>
  <licenses>
    <license>
      <name>Eclipse Public License 2.0</name>
      <url>https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>hu.blackbelt.epsilon</groupId>
      <artifactId>epsilon-runtime-execution</artifactId>
    </dependency>
    <dependency>
      <groupId>hu.blackbelt.epsilon</groupId>
      <artifactId>epsilon-runtime-osgi</artifactId>
    </dependency>
    <dependency>
      <groupId>hu.blackbelt.judo.meta</groupId>
      <artifactId>hu.blackbelt.judo.meta.asm.model</artifactId>
    </dependency>
    <dependency>
      <groupId>hu.blackbelt.judo.meta</groupId>
      <artifactId>hu.blackbelt.judo.meta.rdbms.model</artifactId>
    </dependency>
    <dependency>
      <groupId>hu.blackbelt.judo.tatami</groupId>
      <artifactId>judo-tatami-core</artifactId>
    </dependency>
    <dependency>
      <groupId>hu.blackbelt.judo.tatami</groupId>
      <artifactId>judo-tatami-psm2asm</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>hu.blackbelt.judo.meta</groupId>
      <artifactId>hu.blackbelt.judo.meta.psm.model.northwind</artifactId>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-scripts</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/classes/tatami/asm2rdbms</outputDirectory>
              <resources>
                <resource>
                  <directory>src/main/epsilon</directory>
                  <filtering>false</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>copy-models</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/classes/tatami/asm2rdbms/model</outputDirectory>
              <resources>
                <resource>
                  <directory>model</directory>
                  <filtering>false</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>generate-hsqldb-mapping</id>
            <phase>compile</phase>
            <goals>
              <goal>java</goal>
            </goals>
            <configuration>
              <mainClass>hu.blackbelt.judo.tatami.asm2rdbms.ExcelMappingModels2Rdbms</mainClass>
              <systemProperties>
                <property>
                  <key>logback.configurationFile</key>
                  <value>${basedir}/src/main/resources/logback.xml</value>
                </property>
              </systemProperties>
              <arguments>
                <argument>${basedir}/target/classes/tatami/asm2rdbms/model/mapping-hsqldb-rdbms.model</argument>
                <argument>hsqldb</argument>
              </arguments>
              <includeProjectDependencies>true</includeProjectDependencies>
              <includePluginDependencies>true</includePluginDependencies>
              <cleanupDaemonThreads>false</cleanupDaemonThreads>
            </configuration>
          </execution>
          <execution>
            <id>generate-postgresql-mapping</id>
            <phase>compile</phase>
            <goals>
              <goal>java</goal>
            </goals>
            <configuration>
              <mainClass>hu.blackbelt.judo.tatami.asm2rdbms.ExcelMappingModels2Rdbms</mainClass>
              <systemProperties>
                <property>
                  <key>logback.configurationFile</key>
                  <value>${basedir}/src/main/resources/logback.xml</value>
                </property>
              </systemProperties>
              <arguments>
                <argument>${basedir}/target/classes/tatami/asm2rdbms/model/mapping-postgresql-rdbms.model</argument>
                <argument>postgresql</argument>
              </arguments>
              <includeProjectDependencies>true</includeProjectDependencies>
              <includePluginDependencies>true</includePluginDependencies>
              <cleanupDaemonThreads>false</cleanupDaemonThreads>
            </configuration>
          </execution>
          <execution>
            <id>generate-oracle-mapping</id>
            <phase>compile</phase>
            <goals>
              <goal>java</goal>
            </goals>
            <configuration>
              <mainClass>hu.blackbelt.judo.tatami.asm2rdbms.ExcelMappingModels2Rdbms</mainClass>
              <arguments>
                <argument>${basedir}/target/classes/tatami/asm2rdbms/model/mapping-oracle-rdbms.model</argument>
                <argument>oracle</argument>
              </arguments>
              <includeProjectDependencies>true</includeProjectDependencies>
              <includePluginDependencies>true</includePluginDependencies>
              <cleanupDaemonThreads>false</cleanupDaemonThreads>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <obrRepository>NONE</obrRepository>
          <instructions>
            <Export-Package>tatami/asm2rdbms;version=${project.version},
							hu.blackbelt.judo.tatami.asm2rdbms.*;version=${project.version}</Export-Package>
            <Include-Resource>{maven-resources},
							tatami=target/classes/tatami</Include-Resource>
            <Import-Package>${osgi-default-import},
                            *</Import-Package>
            <Asm2Rdbms-Transformation-ModelRoot>tatami/asm2rdbms/model</Asm2Rdbms-Transformation-ModelRoot>
            <Asm2Rdbms-Transformation-ScriptRoot>tatami/asm2rdbms/transformations</Asm2Rdbms-Transformation-ScriptRoot>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
