Giter Site home page Giter Site logo

andyglick / eclipselink-maven-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ethlo/eclipselink-maven-plugin

0.0 1.0 0.0 75 KB

Eclipselink JPA 2.x static weaving and canonical model generation made easy!

License: Apache License 2.0

Java 100.00%

eclipselink-maven-plugin's Introduction

eclipselink-maven-plugin

Maven Central Hex.pm Build Status DepShield Badge

Eclipselink JPA maven plugin made to simplify life of the Eclipselink JPA developer.

Features

  • No need to setup special APT processor for canonical model generation, just use goal modelgen.
  • Allows you to get rid of the persistence.xml file as the classes are detected automatically and a persistence.xml file is generated.
  • If the persistence.xml file already exists, missing <class>...</class> entries are added automatically. This allows you to have a basic configuration, but you do not have to manually add class entries.

Test project

A simple test project can be found here

Usage

Static weaving:

<plugin>
	<groupId>com.ethlo.persistence.tools</groupId>
	<artifactId>eclipselink-maven-plugin</artifactId>
	<version>${eclipselink-maven-plugin.version}</version>
	<executions>
		<execution>
			<phase>process-classes</phase>
			<goals>
				<goal>weave</goal>
			</goals>
		</execution>
	</executions>
</plugin>

Meta-model generation:

<plugin>
	<groupId>com.ethlo.persistence.tools</groupId>
	<artifactId>eclipselink-maven-plugin</artifactId>
	<version>${eclipselink-maven-plugin.version}</version>
	<executions>
		<execution>
			<phase>generate-sources</phase>
			<goals>
				<goal>modelgen</goal>
			</goals>
		</execution>
	</executions>
</plugin>

Both weave, DDL and meta-model generation and setting basePackages:

<plugin>
	<groupId>com.ethlo.persistence.tools</groupId>
	<artifactId>eclipselink-maven-plugin</artifactId>
	<version>${eclipselink-maven-plugin.version}</version>
	<executions>
		<execution>
			<id>weave</id>
			<phase>process-classes</phase>
			<goals>
				<goal>weave</goal>
			</goals>
		</execution>
		<execution>
			<id>ddl</id>
			<phase>process-classes</phase>
			<goals>
				<goal>ddl</goal>
			</goals>
			<configuration>
				<databaseProductName>mysql</databaseProductName>
			</configuration>
		</execution>
		<execution>
			<id>modelgen</id>
			<phase>generate-sources</phase>
			<goals>
				<goal>modelgen</goal>
			</goals>
		</execution>
	</executions>
	<configuration>
		<basePackages>
			<basePackage>org.my.projectA</basePackage>
			<basePackage>org.my.projectB</basePackage>
		</basePackages>
	</configuration>
</plugin>

eclipselink-maven-plugin's People

Contributors

andyglick avatar ethlo avatar mortenharaldsen avatar timomeinen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.