DDL Generator: Maven Plugin

A maven plugin to generate DDL file from a JPA+Hibernate project.

License

License

Categories

Categories

Maven Build Tools Net
GroupId

GroupId

net.ggtools.maven
ArtifactId

ArtifactId

ddlgenerator-maven-plugin
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

DDL Generator: Maven Plugin
A maven plugin to generate DDL file from a JPA+Hibernate project.

Download ddlgenerator-maven-plugin

How to add to project

<plugin>
    <groupId>net.ggtools.maven</groupId>
    <artifactId>ddlgenerator-maven-plugin</artifactId>
    <version>0.1</version>
</plugin>

Dependencies

compile (9)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.0.4
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.1
org.codehaus.plexus : plexus-utils jar 3.0.4
org.hibernate : hibernate-core jar 4.1.4.Final
org.springframework : spring-beans jar 3.1.2.RELEASE
org.springframework : spring-orm jar 3.1.2.RELEASE
org.hibernate : hibernate-entitymanager jar 4.1.4.Final
org.apache.maven : maven-project jar 2.2.1
org.hibernate.javax.persistence : hibernate-jpa-2.0-api jar 1.0.1.Final

provided (1)

Group / Artifact Type Version
com.github.peichhorn : lombok-pg jar 0.11.3

runtime (1)

Group / Artifact Type Version
cglib : cglib jar 2.2.2

test (4)

Group / Artifact Type Version
org.testng : testng jar 6.4
org.mockito : mockito-all jar 1.9.0
org.springframework : spring-test jar 3.1.2.RELEASE
com.google.guava : guava jar 13.0.1

Project Modules

There are no modules declared in this project.

DDL Generator

A Maven plugin to create DDL file from a JPA+Hibernate project.

Usage

Just add the following configuration in pom.xml:

<plugin>
	<groupId>net.ggtools.maven</groupId>
	<artifactId>ddlgenerator-maven-plugin</artifactId>
	<version>0.1</version>
	<executions>
		<execution>
			<id>make-raw-sql</id>
			<goals>
				<goal>generate</goal>
			</goals>
			<phase>prepare-package</phase>
			<configuration>
				<ddlFile>${project.build.directory}/sql/ddl.sql</ddlFile>
				<defaultSchema>MY_SCHEMA</defaultSchema>
				<dialect>org.hibernate.dialect.Oracle10gDialect</dialect>
				<namingStrategy>your.naming.Strategy</namingStrategy>
				<persistenceUnitName>MYPU</persistenceUnitName>
				<persistenceXmlLocations>
					<param>classpath*:/META-INF/persistence.xml</param>
				</persistenceXmlLocations>
				<useNewGenerator>true</useNewGenerator>
			</configuration>
		</execution>
	</executions>
</plugin>

Until more documentation is available you should have a look to the samples directory.

Versions

Version
0.1