From 97a45d03e1144d30b90f2f566517be22aca39358 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 10 Sep 2013 20:29:15 +0200 Subject: [PATCH] Execution is only skipped, if explicitly told so --- .../juplo/plugins/hibernate4/Hbm2DdlMojo.java | 2 +- src/site/apt/force.apt | 4 +-- src/site/apt/pitfalls.apt | 29 ++++++++++++++++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java index 24178c19..96848edc 100644 --- a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java +++ b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java @@ -151,7 +151,7 @@ public class Hbm2DdlMojo extends AbstractMojo * The excecution is skipped automatically, if no modified or newly added * annotated classes are found and the dialect was not changed. * - * @parameter property="maven.test.skip" default-value="false" + * @parameter property="hibernate.export.skip" default-value="false" */ private boolean skip; diff --git a/src/site/apt/force.apt b/src/site/apt/force.apt index 26554d1a..566811ae 100644 --- a/src/site/apt/force.apt +++ b/src/site/apt/force.apt @@ -12,8 +12,8 @@ Force execution {{{http://mojo.codehaus.org/dbunit-maven-plugin/}dbunit-plugin}} {{{./pitfalls.html#fails}may fail}}, when the execution is skipped. - If you need the hibernate4-maven-plugin to - execution, you can force it to do so, if you set the parameter <<>> to + If you need the hibernate4-maven-plugin to , + you can force it to do so, if you set the parameter <<>> to <<>>: ---------------- diff --git a/src/site/apt/pitfalls.apt b/src/site/apt/pitfalls.apt index 6c921b08..0640e7fe 100644 --- a/src/site/apt/pitfalls.apt +++ b/src/site/apt/pitfalls.apt @@ -122,10 +122,11 @@ Known Pitfalls 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 {{{./force.html}forced}}: @@ -133,3 +134,29 @@ Known Pitfalls ------------- mvn hibernate4:export -Dhibernate.export.force=true ------------- + +* The hibernate4:export goal is executed, even if <<>> is + <<>> + + Up to version 1.0.2 the hibernate4-maven-plugin automatically skipped + its execution, when <<>> was set to <<>>. Starting + with version 1.0.3 this behaviour was changed. The plugin now only skips + its execution, when explicitliy told so via the configuration-parameter + <<>> or via the property <<>>. + + This change was made, because in some use-cases it is necessary, that the + database-schema is always build and/or exported, even if the tests are + skipped, which was not possible with the old behaviour. + + If you need/like the old behaviour, you can turn it on in your configuration: + +------------ + + de.juplo + hibernate4-maven-plugin + ... + + ${maven.test.skip} + + +------------ -- 2.20.1