From: Kai Moritz Date: Sun, 6 Nov 2016 15:13:51 +0000 (+0100) Subject: Overwriting of a property with the same value is not reported as overwriting X-Git-Tag: hibernate-maven-plugin-2.1.0~17 X-Git-Url: https://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=commitdiff_plain;h=a20fb5535864f495b8117891e155f636a83f73bc Overwriting of a property with the same value is not reported as overwriting --- diff --git a/src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java b/src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java index e99aea4a..06024c21 100644 --- a/src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java +++ b/src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java @@ -1012,14 +1012,22 @@ public abstract class AbstractSchemaMojo extends AbstractMojo if (value != null) { if (properties.containsKey(key)) - getLog().info( - "Overwriting property " + key + "=\"" + - properties.getProperty(key) + - "\" with value \"" + value + "\"" - ); + { + if (!properties.getProperty(key).equals(value)) + { + getLog().info( + "Overwriting property " + key + "=\"" + + properties.getProperty(key) + + "\" with value \"" + value + "\"" + ); + properties.setProperty(key, value); + } + } else + { getLog().debug("Using value \"" + value + "\" for property " + key); - properties.setProperty(key, value); + properties.setProperty(key, value); + } } }