Why does this project exist?

This project was motivated by a fundamental problem with seam-gen reverse engineering from the database. Quite simply, the strategy results in too much lost information. For example:

  • seam-gen is unable to determine that a field is an enum
  • for some database systems, seam-gen is unable to determine the temporal type for a date/time field
  • seam-gen has trouble with char fields (vs. varchar)
  • complex validation is unavailable (eg. @Length(min=3))
If you instead start with the Java model, then DDL and CRUD are simply derivations of the Java model. This approach is consistent with Domain Driven Design. Use hibernate3-maven-plugin for DDL generation, and this plugin for the CRUD generation.

In addition, this project aims to simplify using JBoss Seam by leveraging Maven.


How do I use the plugin?

Specify the plugin in your pom.xml:


The entityClasses must list the classes that you want CRUD generation.


What are the plugin goals?

The following goals are available:

Creates CRUD interfaces for the Entity Classes
Outputs code for the message resource bundle for the Entity Classes


Can I customize the CRUD generation?

Yes, of course! There are several things that you can do:

  1. You can define your own templates instead of using the built-in templates.
  2. You can define your own properties that are made available to the template engine.
Groovy templates are used.


What other projects provided inspiration?

If you are considering this tool, you may also be interested in looking at:

  1. AppFuse is a clever tool that can be used to jump start an application. Version 2.0 includes support for Maven as well as CRUD generation. Several frameworks are supported, but not yet Seam.
  2. Taylor is a Model Driven Architecture implementation. If you like to start with UML, and generate JBoss Seam applications, check this out.