diff --git a/maven-resolver-supplier-mvn3/src/main/java/org/eclipse/aether/supplier/SessionBuilderSupplier.java b/maven-resolver-supplier-mvn3/src/main/java/org/eclipse/aether/supplier/SessionBuilderSupplier.java index 882edef62..07f0ea7ac 100644 --- a/maven-resolver-supplier-mvn3/src/main/java/org/eclipse/aether/supplier/SessionBuilderSupplier.java +++ b/maven-resolver-supplier-mvn3/src/main/java/org/eclipse/aether/supplier/SessionBuilderSupplier.java @@ -19,8 +19,10 @@ package org.eclipse.aether.supplier; import java.util.Arrays; +import java.util.Locale; import java.util.function.Supplier; +import org.apache.maven.utils.Os; import org.eclipse.aether.RepositorySystem; import org.eclipse.aether.RepositorySystemSession.CloseableSession; import org.eclipse.aether.RepositorySystemSession.SessionBuilder; @@ -70,6 +72,11 @@ public SessionBuilderSupplier(RepositorySystem repositorySystem) { protected void configureSessionBuilder(SessionBuilder session) { session.setSystemProperties(System.getProperties()); + boolean caseSensitive = !Os.IS_WINDOWS; + System.getenv().forEach((key, value) -> { + key = "env." + (caseSensitive ? key : key.toUpperCase(Locale.ENGLISH)); + session.setSystemProperty(key, value); + }); session.setDependencyTraverser(getDependencyTraverser()); session.setDependencyManager(getDependencyManager()); session.setDependencySelector(getDependencySelector());