From 34afec69c866f731f3f9d9b3606bbc31b51d64e7 Mon Sep 17 00:00:00 2001 From: Christian Schulte Date: Wed, 27 Jan 2016 03:46:11 +0100 Subject: [PATCH] [MNG-6183] Dependency management debug message enhancements. o Updated to add debug log messages about optional flag management. --- .../maven/project/DefaultProjectDependenciesResolver.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java index 16b60c2004..21dfaa2395 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java @@ -273,6 +273,14 @@ public class DefaultProjectDependenciesResolver appendManagementSource( buffer, art, "version" ); buffer.append( ')' ); } + + Boolean premanagedOptional = DependencyManagerUtils.getPremanagedOptional( node ); + if ( premanagedOptional != null && !premanagedOptional.equals( dep.getOptional() ) ) + { + buffer.append( " (optionality managed from " ).append( premanagedOptional ); + appendManagementSource( buffer, art, "optional" ); + buffer.append( ')' ); + } } else {