1 Hibernate-4 maven plugin Envers sample project
7 This is a sample project that can be used to demonstrate the [Hibernate4-maven-plugin](http://juplo.de/hibernate4-maven-plugin/)
8 in combination with the Hibernate Envers module.
10 The Maven pom.xml file contains the definitions to run the Hibernate4-maven-plugin.
12 The project code contains a JPA entity, an Envers audit revision entity and
13 a single integration test using an in-memory HSQLDB database.
15 The integration test performs the following actions:
17 * Initialize a JTA environment using [Atomikos transaction essentials](http://www.atomikos.com/Main/TransactionsEssentials/)
18 * Startup an XA datasource
19 * Run the SQL-script to drop any existing tables in the HSQLDB database (script/drop-tables-hsqldb.sql)
20 * Run the SQL-script to create the tables in the HSQLDB database (create-tables-hsqldb.sql)
22 Note: this script is created by the Hibernate4-maven-plugin
24 * Load the Hibernate (and Envers) configuration, including the validation of the database schema
25 * Persist and update entities that are audited by Hibernate Envers
26 * Verify the revisions and the audit tables
31 __Rebuild the SQL-script using the Hibernate4-maven-plugin to create the database__
33 mvn -PcreateHsqlDbScript clean compile hibernate4:export
35 __Build and run the integration tests__