JPA-XJC

Introduction

JPA-XJC is a JAXB 2.1 XJC plugin for annotating schema derived classes with Java persistence annotations. It does not generate code depending on libraries other than JPA 1.0 and does not introduce non-standard customization elements. The plugin provides a '-jpa' option which is enabled by adding its jar file to the XJC classpath. When enabled, the following options can be used to control the behavior of the plugin.

-jpa unit-name unit-root

The '-jpa' option itself takes two mandatory arguments. The 'unit-name' argument specifies the name of the persistence unit and the 'unit-root' argument specifies the name of the persistence unit root directory.

-persistenceSystemId system-id (since 1.0-beta-6)

The optional '-persistenceSystemId' option can be used to specify a system id to use in the 'schemaLocation' attribute of generated persistence unit XML documents. Default: http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd

-ormSystemId system-id (since 1.0-beta-6)

The optional '-ormSystemId' option can be used to specify a system id to use in the 'schemaLocation' attribute of generated orm XML documents. Default: http://java.sun.com/xml/ns/persistence/orm_1_0.xsd

Support

Development of JPA-XJC is community driven. Please file any issues with the MantisBT bugtracker or subscribe to the jpaxjc-users mailing list for discussing issues or asking questions. You may also want to use the wiki for providing content related to JPA-XJC yourself. Please note that applications provided by Sourceforge may require you to login to Sourceforge. If you do not have a Sourceforge account, you can create an account for free at Sourceforge.