From b9ab24b21d3eb65e2a2208be658ff447c1846894 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 18 Dec 2012 00:31:22 +0100 Subject: [PATCH] Implemented new parameter "force" If -Dhibernate.export.force is specified, the schema-export will be forced. --- .../java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java index a2306acc..81cef938 100644 --- a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java +++ b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java @@ -110,6 +110,16 @@ public class Hbm2DdlMojo extends AbstractMojo */ private boolean skip; + /** + * Force execution + *

+ * Force execution, even if no modified or newly added annotated classes + * where found. skip takes precedence over force. + * + * @parameter expression="${hibernate.export.force}" default-value="false" + */ + private boolean force; + /** * SQL-Driver name. * @@ -507,6 +517,7 @@ public class Hbm2DdlMojo extends AbstractMojo !modified && !target.equals(Target.SCRIPT) && !target.equals(Target.NONE) + && !force ) { getLog().info("No modified annotated classes found and dialect unchanged."); -- 2.20.1