mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-13 14:39:29 +00:00
mvnd fails when version range is used in extensions.xml, fixes #275
This commit is contained in:
@@ -361,7 +361,7 @@ public class DaemonParameters {
|
|||||||
List<String> extensions = readCoreExtensionsDescriptor(multiModuleProjectDirectory()).stream()
|
List<String> extensions = readCoreExtensionsDescriptor(multiModuleProjectDirectory()).stream()
|
||||||
.map(e -> e.getGroupId() + ":" + e.getArtifactId() + ":" + e.getVersion())
|
.map(e -> e.getGroupId() + ":" + e.getArtifactId() + ":" + e.getVersion())
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
return String.join(",", extensions);
|
return String.join(";", extensions);
|
||||||
} catch (IOException | XmlPullParserException e) {
|
} catch (IOException | XmlPullParserException e) {
|
||||||
throw new RuntimeException("Unable to parse core extensions", e);
|
throw new RuntimeException("Unable to parse core extensions", e);
|
||||||
}
|
}
|
||||||
|
@@ -439,7 +439,7 @@ public class DaemonMavenCli {
|
|||||||
CoreExtensionEntry coreEntry = CoreExtensionEntry.discoverFrom(coreRealm);
|
CoreExtensionEntry coreEntry = CoreExtensionEntry.discoverFrom(coreRealm);
|
||||||
|
|
||||||
List<CoreExtension> extensions = Stream
|
List<CoreExtension> extensions = Stream
|
||||||
.of(Environment.MVND_CORE_EXTENSIONS.asString().split(","))
|
.of(Environment.MVND_CORE_EXTENSIONS.asString().split(";"))
|
||||||
.filter(s -> s != null && !s.isEmpty())
|
.filter(s -> s != null && !s.isEmpty())
|
||||||
.map(s -> {
|
.map(s -> {
|
||||||
String[] parts = s.split(":");
|
String[] parts = s.split(":");
|
||||||
|
@@ -49,7 +49,7 @@ public class ExtensionsNativeIT {
|
|||||||
client.execute(o, "-v").assertSuccess();
|
client.execute(o, "-v").assertSuccess();
|
||||||
assertDaemonRegistrySize(1);
|
assertDaemonRegistrySize(1);
|
||||||
DaemonInfo daemon = registry.getAll().iterator().next();
|
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,)"));
|
||||||
|
|
||||||
registry.awaitIdle(daemon.getUid());
|
registry.awaitIdle(daemon.getUid());
|
||||||
|
|
||||||
|
@@ -20,6 +20,6 @@
|
|||||||
<extension>
|
<extension>
|
||||||
<groupId>io.takari.aether</groupId>
|
<groupId>io.takari.aether</groupId>
|
||||||
<artifactId>takari-local-repository</artifactId>
|
<artifactId>takari-local-repository</artifactId>
|
||||||
<version>0.11.3</version>
|
<version>[0.11.3,)</version>
|
||||||
</extension>
|
</extension>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
Reference in New Issue
Block a user