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=5c3b5c7e814e535fac4c9bf5ccce54d3697e0ad0;hp=f9912536b76ffb7810c841bbb1815da49d89743c;hb=7d935b61a3d80260b9cacf959984e14708c3a96b;hpb=2b1147d5e99c764c1f6816f4d4f000abe260097c diff --git a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java index f9912536..5c3b5c7e 100644 --- a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java +++ b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java @@ -508,10 +508,10 @@ public class Hbm2DdlMojo extends AbstractMojo getLog().debug( "Overwriting property " + PASSWORD + "=" + properties.getProperty(PASSWORD) + - " with the value " + password + " with value " + password ); else - getLog().debug("Using the value " + password); + getLog().debug("Using value " + password + " for property " + PASSWORD); properties.setProperty(PASSWORD, password); } if (hibernateDialect != null) @@ -520,10 +520,12 @@ public class Hbm2DdlMojo extends AbstractMojo getLog().debug( "Overwriting property " + DIALECT + "=" + properties.getProperty(DIALECT) + - " with the value " + hibernateDialect + " with value " + hibernateDialect ); else - getLog().debug("Using the value " + hibernateDialect); + getLog().debug( + "Using value " + hibernateDialect + " for property " + DIALECT + ); properties.setProperty(DIALECT, hibernateDialect); } if ( hibernateNamingStrategy != null ) @@ -532,10 +534,13 @@ public class Hbm2DdlMojo extends AbstractMojo getLog().debug( "Overwriting property " + NAMING_STRATEGY + "=" + properties.getProperty(NAMING_STRATEGY) + - " with the value " + hibernateNamingStrategy + " with value " + hibernateNamingStrategy ); else - getLog().debug("Using the value " + hibernateNamingStrategy); + getLog().debug( + "Using value " + hibernateNamingStrategy + " for property " + + NAMING_STRATEGY + ); properties.setProperty(NAMING_STRATEGY, hibernateNamingStrategy); } @@ -547,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 */