From f84f1e0c4b2075a918faee55d9e60a702ff2f178 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Wed, 6 Jan 2021 15:26:01 +0100 Subject: [PATCH] Fix extension resolution that use jdk activation, fixes #300 --- .../src/main/java/org/apache/maven/cli/DaemonMavenCli.java | 1 + .../test/java/org/mvndaemon/mvnd/it/ExtensionsNativeIT.java | 3 ++- .../src/test/projects/extensions/.mvn/extensions.xml | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/daemon/src/main/java/org/apache/maven/cli/DaemonMavenCli.java b/daemon/src/main/java/org/apache/maven/cli/DaemonMavenCli.java index f5ead2d4b..d677f590b 100644 --- a/daemon/src/main/java/org/apache/maven/cli/DaemonMavenCli.java +++ b/daemon/src/main/java/org/apache/maven/cli/DaemonMavenCli.java @@ -541,6 +541,7 @@ protected void configure() { final Map configurationProcessors = container .lookupMap(ConfigurationProcessor.class); final EventSpyDispatcher eventSpyDispatcher = container.lookup(EventSpyDispatcher.class); + properties(cliRequest); configure(cliRequest, eventSpyDispatcher, configurationProcessors); populateRequest(cliRequest, cliRequest.request, slf4jLogger, eventSpyDispatcher, container.lookup(ModelProcessor.class), createTransferListener(cliRequest), loggingSpy); diff --git a/integration-tests/src/test/java/org/mvndaemon/mvnd/it/ExtensionsNativeIT.java b/integration-tests/src/test/java/org/mvndaemon/mvnd/it/ExtensionsNativeIT.java index de76da28e..26f9d2608 100644 --- a/integration-tests/src/test/java/org/mvndaemon/mvnd/it/ExtensionsNativeIT.java +++ b/integration-tests/src/test/java/org/mvndaemon/mvnd/it/ExtensionsNativeIT.java @@ -49,7 +49,8 @@ void version() throws IOException, InterruptedException { client.execute(o, "-v").assertSuccess(); assertDaemonRegistrySize(1); DaemonInfo daemon = registry.getAll().iterator().next(); - assertTrue(daemon.getOptions().contains("mvnd.coreExtensions=io.takari.aether:takari-local-repository:[0.11.3,)")); + assertTrue(daemon.getOptions().contains( + "mvnd.coreExtensions=io.takari.aether:takari-local-repository:[0.11.3,);fr.jcgay.maven:maven-profiler:3.0")); registry.awaitIdle(daemon.getUid()); diff --git a/integration-tests/src/test/projects/extensions/.mvn/extensions.xml b/integration-tests/src/test/projects/extensions/.mvn/extensions.xml index 89065ff75..c8351d380 100644 --- a/integration-tests/src/test/projects/extensions/.mvn/extensions.xml +++ b/integration-tests/src/test/projects/extensions/.mvn/extensions.xml @@ -22,4 +22,9 @@ takari-local-repository [0.11.3,) + + fr.jcgay.maven + maven-profiler + 3.0 +