X-Git-Url: https://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fplugins%2Fhibernate4%2FHbm2DdlMojo.java;h=2e232bf1cbb7080be6f917bfc85ae2296e865acb;hp=6c4c31a4ed51068a57e1e1834ce6841c5caa0dd8;hb=d38b2386641c7ca00f54d69cb3f576c20b0cdccc;hpb=caa492b70dc1daeaef436748db38df1c19554943 diff --git a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java index 6c4c31a4..2e232bf1 100644 --- a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java +++ b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java @@ -153,7 +153,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="hibernate.export.skip" default-value="false" + * @parameter property="maven.test.skip" default-value="false" */ private boolean skip; @@ -552,15 +552,27 @@ public class Hbm2DdlMojo extends AbstractMojo getLog().debug("SQL-dialect unchanged."); else { - getLog().debug("SQL-dialect changed: " + dialect); modified = true; - md5s.put(DIALECT, dialect); + if (dialect == null) + { + getLog().debug("SQL-dialect was unset."); + md5s.remove(DIALECT); + } + else + { + getLog().debug("SQL-dialect changed: " + dialect); + md5s.put(DIALECT, dialect); + } } } else { - modified = true; - md5s.put(DIALECT, properties.getProperty(DIALECT)); + String dialect = properties.getProperty(DIALECT); + if (dialect != null) + { + modified = true; + md5s.put(DIALECT, properties.getProperty(DIALECT)); + } } /** The generated SQL varies with the envers-configuration */