X-Git-Url: http://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=blobdiff_plain;f=src%2Fsite%2Fapt%2Fpitfalls.apt;h=61b5bc955ed74c57b878e770238886ddb4d77340;hp=5bbbff126e548669147a8eea55ab7c874bacb57a;hb=1ba817af3ae5ab23232fca001061f8050cecd6a7;hpb=02312592d27d628cc7e0d8e28cc40bf74a80de21 diff --git a/src/site/apt/pitfalls.apt b/src/site/apt/pitfalls.apt index 5bbbff12..61b5bc95 100644 --- a/src/site/apt/pitfalls.apt +++ b/src/site/apt/pitfalls.apt @@ -1,5 +1,22 @@ Known Pitfalls +* hibernate4-maven-plugin always needs a database-connection + + The default-configuration uses the EXPORT-target of the SchemaExport-Tool. + If you do not need to create a database with the evaluated schema, you can + use the NONE- or the SCRIPT-target. + This can be achieved with the commandline-parameter + <<<-Dhibernate.export.target=SCRIPT>>> or with the following configuration: + +------------ + + SCRIPT + +------------ + + But even when no database is to be created, hibernate always needs to know + the dialect. Hence, the plugin will fail if this parameter is missing! + * Dependency for driver-class XYZ is missing One regular problem is the scope of the jdbc-driver-dependency. @@ -95,3 +112,24 @@ Known Pitfalls ------------ + +* The database will not be recreated after a manual drop/clean + + If one manually drops the database or removes the hsqldb-files, it will not + be recreated by the hibernate4-maven-plugin, because it cannot detect, that + the database needs to be recreated. + This happens, because the plugin will not recreate the database if neither + the configuration nor the annotated classes have changed, because an + unnecessary drop-create-cycle might take a long time. The plugin will + report that like this: +------------- +[INFO] No modified annotated classes found and dialect unchanged. +[INFO] Skipping schema generation! +[------------ + + If one always uses <<>> for cleanup, this will not happen. + Otherwise the recreation must be forced: + +------------- +mvn hibernate4:export -Dhibernate.export.force=true +-------------