Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

if (!mavenValue.equals(entry.getValue())) {
getLog().info("Ant property '" + key + "=" + entry.getValue()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

+ "' clashes with an existing Maven property value '" + mavenValue
+ "', SKIPPING this Ant property propagation.");
}
Comment on lines +466 to +470
continue;
}
Comment on lines +464 to 472
// it is safe to call toString directly since the value cannot be null in Hashtable
Expand Down
Loading