Support core extension more configuration (#1216)

Fixes #1163

Signed-off-by: crazyhzm <crazyhzm@apache.org>
This commit is contained in:
Jermaine Hua
2024-12-17 20:50:43 +08:00
committed by GitHub
parent 89f8cbfe65
commit 7b309de9ab
7 changed files with 93 additions and 67 deletions

View File

@@ -54,7 +54,6 @@ class ExtensionsNativeIT {
client.execute(o, "-v").assertSuccess();
assertDaemonRegistrySize(1);
DaemonInfo daemon = registry.getAll().iterator().next();
assertTrue(daemon.getOptions().contains("mvnd.coreExtensions=fr.jcgay.maven:maven-profiler:3.0"));
registry.awaitIdle(daemon.getId());
@@ -67,4 +66,20 @@ class ExtensionsNativeIT {
.as("Daemon registry size should be " + size)
.isEqualTo(size);
}
@Test
void coreExtensionFilePathOption() throws InterruptedException {
registry.killAll();
assertDaemonRegistrySize(0);
final TestClientOutput o = new TestClientOutput();
client.execute(o, "-v").assertSuccess();
assertDaemonRegistrySize(1);
DaemonInfo daemon = registry.getAll().iterator().next();
daemon.getOptions().stream()
.filter(s -> s.startsWith("mvnd.coreExtensionFilePath="))
.findFirst()
.ifPresent(s -> assertTrue(s.endsWith(".mvn\\extensions.xml") || s.endsWith(".mvn/extensions.xml")));
}
}