elharo commented on code in PR #349:
URL: 
https://github.com/apache/maven-antrun-plugin/pull/349#discussion_r3690056235


##########
src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java:
##########
@@ -461,9 +461,13 @@ public void copyProperties(Project antProject, 
MavenProject mavenProject) {
 
         for (Map.Entry<String, Object> entry : antProps.entrySet()) {
             String key = entry.getKey();
-            if (mavenProperties.getProperty(key) != null) {
-                getLog().warn("Ant property '" + key + "=" + 
mavenProperties.getProperty(key)
-                        + "' clashes with an existing Maven property, SKIPPING 
this Ant property propagation.");
+            String mavenValue = mavenProperties.getProperty(key);
+            if (mavenValue != null) {

Review Comment:
   This part, checking if the maven property value matches the ant property 
value, seems like a good idea. 



##########
src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java:
##########
@@ -461,9 +461,13 @@ public void copyProperties(Project antProject, 
MavenProject mavenProject) {
 
         for (Map.Entry<String, Object> entry : antProps.entrySet()) {
             String key = entry.getKey();
-            if (mavenProperties.getProperty(key) != null) {
-                getLog().warn("Ant property '" + key + "=" + 
mavenProperties.getProperty(key)
-                        + "' clashes with an existing Maven property, SKIPPING 
this Ant property propagation.");
+            String mavenValue = mavenProperties.getProperty(key);
+            if (mavenValue != null) {
+                if (!mavenValue.equals(entry.getValue())) {
+                    getLog().info("Ant property '" + key + "=" + 
entry.getValue()

Review Comment:
   I think a warning is appropriate here, at least some of the time. Possibly 
this can be a little pickier about when it warns but if it's warn or info, it 
should be warn. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to