diff --git a/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java b/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java index 881d2d7cdf..2055c54b60 100644 --- a/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java +++ b/maven-cli/src/main/java/org/apache/maven/cling/invoker/LookupInvoker.java @@ -621,7 +621,7 @@ public abstract class LookupInvoker< } // settings userDefinedLocalRepo = context.effectiveSettings.getLocalRepository(); - if (userDefinedLocalRepo != null) { + if (userDefinedLocalRepo != null && !userDefinedLocalRepo.isEmpty()) { return context.userResolver.apply(userDefinedLocalRepo); } // defaults