From a20fb5535864f495b8117891e155f636a83f73bc Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 6 Nov 2016 16:13:51 +0100 Subject: [PATCH] Overwriting of a property with the same value is not reported as overwriting --- .../plugins/hibernate/AbstractSchemaMojo.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) 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); + } } } -- 2.20.1