From: Kai Moritz Date: Wed, 18 Sep 2013 16:15:38 +0000 (+0200) Subject: No configuration for hibernate.dialect might be a valid configuration too X-Git-Tag: hibernate4-maven-plugin-1.0.3~8 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=7d935b61a3d80260b9cacf959984e14708c3a96b;p=hibernate4-maven-plugin No configuration for hibernate.dialect might be a valid configuration too --- diff --git a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java index 6c4c31a4..5c3b5c7e 100644 --- a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java +++ b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java @@ -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 */