diff --git a/pom.xml b/pom.xml index a68b19393..f6ecd3164 100644 --- a/pom.xml +++ b/pom.xml @@ -50,8 +50,8 @@ 3.0.2 3.25.0 3.8.0 - 1.9.21 - 3.6.3 + 1.9.22 + 3.9.3 2.1.1 1.27 3.5.0 diff --git a/prospero-common/src/main/java/org/wildfly/prospero/wfchannel/MavenSessionManager.java b/prospero-common/src/main/java/org/wildfly/prospero/wfchannel/MavenSessionManager.java index 8fc901a17..3979c8c6e 100644 --- a/prospero-common/src/main/java/org/wildfly/prospero/wfchannel/MavenSessionManager.java +++ b/prospero-common/src/main/java/org/wildfly/prospero/wfchannel/MavenSessionManager.java @@ -65,12 +65,6 @@ public MavenSessionManager(MavenOptions mavenOptions) throws ProvisioningExcepti } else { this.provisioningRepo = mavenOptions.getLocalCache().toAbsolutePath(); } - - // allow to resolve file-system repositories in offline mode - if (System.getProperty(AETHER_OFFLINE_PROTOCOLS_PROPERTY) == null) { - System.setProperty(AETHER_OFFLINE_PROTOCOLS_PROPERTY, AETHER_OFFLINE_PROTOCOLS_VALUE); - Runtime.getRuntime().addShutdownHook(new Thread(()-> System.clearProperty(AETHER_OFFLINE_PROTOCOLS_PROPERTY))); - } } public MavenSessionManager(MavenSessionManager base) { @@ -102,6 +96,7 @@ public DefaultRepositorySystemSession newRepositorySystemSession(RepositorySyste final LocalRepository localRepo = new LocalRepository(provisioningRepo.toAbsolutePath().toFile()); session.setRepositoryListener(repositoryListener); session.setLocalRepositoryManager(system.newLocalRepositoryManager(session, localRepo)); + session.setConfigProperty(AETHER_OFFLINE_PROTOCOLS_PROPERTY, AETHER_OFFLINE_PROTOCOLS_VALUE); session.setOffline(offline); return session; }