ddls
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>com.jpmorgan.quorum</groupId>
<artifactId>ddls</artifactId>
<version>0.11.0.30092019161842</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jpmorgan.quorum</groupId>
<artifactId>tessera</artifactId>
<version>0.11.0.30092019161842</version>
</parent>
<artifactId>ddls</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.jpmorgan.quorum</groupId>
<artifactId>tessera-core</artifactId>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>create-table</directory>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>com.jpmorgan.quorum</groupId>
<artifactId>tessera-core</artifactId>
<version>0.11.0.30092019161842</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.23.1</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.199</version>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.4.1</version>
</dependency>
</dependencies>
<configuration>
<properties>
<eclipselink.ddlgen-terminate-statements>true</eclipselink.ddlgen-terminate-statements>
<eclipselink.weaving>false</eclipselink.weaving>
<eclipselink.logging.level>INFO</eclipselink.logging.level>
<javax.persistence.schema-generation.scripts.action>create</javax.persistence.schema-generation.scripts.action>
</properties>
<source>
def file = new java.io.File(properties["javax.persistence.schema-generation.scripts.create-target"])
file.getParentFile().mkdirs()
javax.persistence.Persistence.generateSchema("tessera",properties)
</source>
</configuration>
<executions>
<execution>
<id>h2-generate</id>
<phase>process-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<properties>
<javax.persistence.jdbc.url>jdbc:h2:mem:</javax.persistence.jdbc.url>
<javax.persistence.jdbc.user>sa</javax.persistence.jdbc.user>
<javax.persistence.jdbc.password />
<javax.persistence.schema-generation.scripts.create-target>${project.build.outputDirectory}/h2-ddl.sql</javax.persistence.schema-generation.scripts.create-target>
</properties>
</configuration>
</execution>
<!-- FIXME: Work out why alter table lines break. using static file in create-table for now
<execution>
<id>hsql-generate</id>
<phase>process-resources</phase>
<configuration>
<properties>
<javax.persistence.jdbc.url>jdbc:hsqldb:mem:mydb</javax.persistence.jdbc.url>
<javax.persistence.jdbc.user>sa</javax.persistence.jdbc.user>
<javax.persistence.jdbc.password></javax.persistence.jdbc.password>
<javax.persistence.schema-generation.scripts.create-target>${project.build.outputDirectory}/hsql-ddl.sql</javax.persistence.schema-generation.scripts.create-target>
</properties>
</configuration>
<goals>
<goal>execute</goal>
</goals>
</execution>-->
<execution>
<id>sqlite-generate</id>
<phase>process-resources</phase>
<configuration>
<properties>
<javax.persistence.jdbc.url>jdbc:sqlite::memory:</javax.persistence.jdbc.url>
<javax.persistence.jdbc.user>sa</javax.persistence.jdbc.user>
<javax.persistence.jdbc.password />
<javax.persistence.schema-generation.scripts.create-target>${project.build.outputDirectory}/sqlite-ddl.sql</javax.persistence.schema-generation.scripts.create-target>
</properties>
</configuration>
<goals>
<goal>execute</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>mysql</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>mysql-generate</id>
<phase>process-resources</phase>
<configuration>
<properties>
<javax.persistence.jdbc.url>jdbc:mysql://localhost/test</javax.persistence.jdbc.url>
<javax.persistence.jdbc.user>sa</javax.persistence.jdbc.user>
<javax.persistence.jdbc.password />
<javax.persistence.schema-generation.scripts.create-target>${project.build.outputDirectory}/mysql-ddl.sql</javax.persistence.schema-generation.scripts.create-target>
</properties>
</configuration>
<goals>
<goal>execute</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>postgres</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>postgres-generate</id>
<phase>process-resources</phase>
<configuration>
<properties>
<javax.persistence.jdbc.url>jdbc:postgresql://localhost/test</javax.persistence.jdbc.url>
<javax.persistence.jdbc.user>someone</javax.persistence.jdbc.user>
<javax.persistence.jdbc.password />
<javax.persistence.schema-generation.scripts.create-target>${project.build.outputDirectory}/postgresql-ddl.sql</javax.persistence.schema-generation.scripts.create-target>
</properties>
</configuration>
<goals>
<goal>execute</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>oracle</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>18.3.0.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>postgres-generate</id>
<phase>process-resources</phase>
<configuration>
<properties>
<javax.persistence.jdbc.url>jdbc:oracle:thin:@localhost:1521:xe</javax.persistence.jdbc.url>
<javax.persistence.jdbc.user>someone</javax.persistence.jdbc.user>
<javax.persistence.jdbc.password />
<javax.persistence.schema-generation.scripts.create-target>${project.build.outputDirectory}/oracle-ddl.sql</javax.persistence.schema-generation.scripts.create-target>
</properties>
</configuration>
<goals>
<goal>execute</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>