diff --git a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java index 0149ade904..e302e1d9ba 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java @@ -84,6 +84,12 @@ public class DefaultProjectDependenciesResolver return resolved; } + if ( ( scopesToCollect == null || scopesToCollect.isEmpty() ) + && ( scopesToResolve == null || scopesToResolve.isEmpty() ) ) + { + return resolved; + } + /* Logic for transitve global exclusions diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java index 8195bcd927..2908e62746 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java @@ -181,6 +181,8 @@ public class DefaultLifecycleExecutor { logger.debug( "=== PROJECT BUILD PLAN ================================================" ); logger.debug( "Project: " + getKey( currentProject ) ); + logger.debug( "Dependencies (collect): " + executionPlan.getRequiredCollectionScopes() ); + logger.debug( "Dependencies (resolve): " + executionPlan.getRequiredResolutionScopes() ); for ( MojoExecution mojoExecution : executionPlan.getExecutions() ) {