X-Git-Url: https://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=blobdiff_plain;f=src%2Fit%2Fhmp-testclasses-annotationscanning%2Freadme.txt;fp=src%2Fit%2Fhmp-testclasses-annotationscanning%2Freadme.txt;h=172800784941f301620cdeb4c0eb13d7ca11afaa;hp=0000000000000000000000000000000000000000;hb=ef0947b306d9515d6af6dbc1fdfd675efcd9eca4;hpb=653ab8054c9232471c3c1192d5074010f378a067 diff --git a/src/it/hmp-testclasses-annotationscanning/readme.txt b/src/it/hmp-testclasses-annotationscanning/readme.txt new file mode 100644 index 00000000..17280078 --- /dev/null +++ b/src/it/hmp-testclasses-annotationscanning/readme.txt @@ -0,0 +1,19 @@ +Example-Project "Hibernate-Maven-Plugin Testclasses Annotation-Scanning" + +This is a small Exampleproject for a base Database-Integrationtest, with the use of the "Hibernate Maven Plugin" from de.juplo for the automatic Generation and the Execution of the create-schema-sql-script. + +The hibernate-maven-plugin - defined in the plugins-section in the pom.xml - scans the code for Entities to create the schema-script. Entity-Scanning is or can be done in following 3 locations: +*) Project-Classes: By default, the plugin scans for @Entitiy-Annotated classes under "target/classes". +*) Project-Testclasses: By default, the plugin scans for @Entitiy-Annotated classes under "target/test-classes". +*) Project-Dependencies: Compile-Time-Dependencies wil also be scanned. + +Test-Structure: +-) Basic Code for User-Change-Tracking over JPA EntityListener: Some basic Interfaces and Classes for a automatic tracking of the User and the Date at the Phases PRE-PERSIST and PRE-UPDATE are located under src/main/java. +-) The important Test-Entity "UserChangeInfoTest" for testing the userinfo-tracking and the Testservice-Declaration and -Implementation for storing/updating/reading such Test-Entity is located under src/test/java. +-) Integrationtest(s): The Integrationtest "UserChangeInfoTest" is based on Arquillian. Arquillian starts an OpenEJB Embedded Container, seeds the Database with Testdata, and executes the Integrationtest. +-) Dataset-Files, and different configurationfiles for Arquillian, JPA, Logback,... are located under src/test/resources. + + +Building the Project: +As usual: To build and install the project into your local maven-repository, execute "mvn install". +