From 3ecdaaf14159b19cbbdad0387b4b9fd4fab36155 Mon Sep 17 00:00:00 2001 From: Eric Milles Date: Tue, 23 Jun 2026 13:03:06 -0500 Subject: [PATCH 1/2] regroup read and write steps --- .../m2/PomModuleDescriptorWriterTest.java | 281 +++++++----------- .../ivy/plugins/parser/m2/test-transitive.pom | 84 +++--- .../ivy/plugins/parser/m2/test-transitive.xml | 48 +-- ...est-write-dependencies-with-classifier.xml | 76 ++--- .../m2/test-write-dependencies-with-type.xml | 76 ++--- 5 files changed, 250 insertions(+), 315 deletions(-) diff --git a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java index 10abf6487..7711b51a9 100644 --- a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java +++ b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java @@ -17,232 +17,167 @@ */ package org.apache.ivy.plugins.parser.m2; -import java.io.BufferedReader; import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStreamReader; import org.apache.ivy.core.module.descriptor.ModuleDescriptor; import org.apache.ivy.core.settings.IvySettings; import org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry; import org.apache.ivy.util.FileUtil; -import org.junit.After; -import org.junit.Before; + import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -public class PomModuleDescriptorWriterTest { - private static String LICENSE; - static { +public final class PomModuleDescriptorWriterTest { + + private ModuleDescriptor readDescriptor(String resourceName) { try { - LICENSE = FileUtil.readEntirely(new BufferedReader(new InputStreamReader( - PomModuleDescriptorWriterTest.class.getResourceAsStream("license.xml")))); - } catch (IOException e) { - e.printStackTrace(); + return ModuleDescriptorParserRegistry.getInstance().parseDescriptor( + new IvySettings(), getClass().getResource(resourceName), false); + } catch (Exception e) { + throw new RuntimeException(e); } } - private File dest = new File("build/test/test-write.xml"); + private String readResourceContents(String resourceName) { + try { + return FileUtil.readEntirely(getClass().getResourceAsStream(resourceName)); + } catch (Exception e) { + throw new RuntimeException(e); + } + } - @Test - public void testSimple() throws Exception { - ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-simple.pom"), false); - PomModuleDescriptorWriter.write(md, dest, getWriterOptions()); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - String expected = readEntirely("test-write-simple.xml").replaceAll("\r\n", "\n").replace( - '\r', '\n'); - assertEquals(expected, wrote); + private String writeDescriptor(ModuleDescriptor md, + PomWriterOptions options) { + File pom = new File("build/test/test-write.pom"); + assertTrue(FileUtil.forceDelete(pom)); + if (!pom.getParentFile().exists()) { + pom.getParentFile().mkdirs(); + } + try { + String license = readResourceContents("license.xml"); + + PomModuleDescriptorWriter.write(md, pom, options.setLicenseHeader(license).setPrintIvyInfo(false)); + + String output = FileUtil.readEntirely(pom); + output = output.replace("\r\n", "\n"); + output = output.replace('\r', '\n'); + return output; + } catch (Exception e) { + throw new RuntimeException(e); + } finally { + FileUtil.forceDelete(pom); + } } + //-------------------------------------------------------------------------- + @Test - public void testSimpleDependencies() throws Exception { - ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-dependencies.pom"), false); - PomModuleDescriptorWriter.write(md, dest, getWriterOptions()); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - String expected = readEntirely("test-write-simple-dependencies.xml").replaceAll("\r\n", - "\n").replace('\r', '\n'); - assertEquals(expected, wrote); + public void testSimple() { + ModuleDescriptor md = readDescriptor("test-simple.pom"); + + String actual = writeDescriptor(md, new PomWriterOptions()); + + assertEquals(readResourceContents("test-write-simple.xml"), actual); } @Test - public void testDependenciesWithScope() throws Exception { - ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-dependencies-with-scope.pom"), false); - PomModuleDescriptorWriter.write(md, dest, getWriterOptions()); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - String expected = readEntirely("test-write-dependencies-with-scope.xml").replaceAll("\r\n", - "\n").replace('\r', '\n'); - assertEquals(expected, wrote); + public void testSimpleDependencies() { + ModuleDescriptor md = readDescriptor("test-dependencies.pom"); + + String actual = writeDescriptor(md, new PomWriterOptions()); + + assertEquals(readResourceContents("test-write-simple-dependencies.xml"), actual); } @Test - public void testDependenciesWithType() throws Exception { - ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-dependencies-with-type.pom"), false); - PomModuleDescriptorWriter.write(md, dest, getWriterOptions()); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - String expected = readEntirely("test-write-dependencies-with-type.xml").replaceAll("\r\n", - "\n").replace('\r', '\n'); - assertEquals(expected, wrote); + public void testDependenciesWithScope() { + ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom"); + + String actual = writeDescriptor(md, new PomWriterOptions()); + + assertEquals(readResourceContents("test-write-dependencies-with-scope.xml"), actual); } @Test - public void testDependenciesWithClassifier() throws Exception { - ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-dependencies-with-classifier.pom"), - false); - PomModuleDescriptorWriter.write(md, dest, getWriterOptions()); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - String expected = readEntirely("test-write-dependencies-with-classifier.xml").replaceAll( - "\r\n", "\n").replace('\r', '\n'); - assertEquals(expected, wrote); + public void testDependenciesWithType() { + ModuleDescriptor md = readDescriptor("test-dependencies-with-type.pom"); + + String actual = writeDescriptor(md, new PomWriterOptions()); + + assertEquals(readResourceContents("test-write-dependencies-with-type.xml"), actual); } @Test - public void testOptional() throws Exception { - ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-optional.pom"), false); - PomModuleDescriptorWriter.write(md, dest, getWriterOptions()); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - String expected = readEntirely("test-write-dependencies-optional.xml").replaceAll("\r\n", - "\n").replace('\r', '\n'); - assertEquals(expected, wrote); + public void testDependenciesWithClassifier() { + ModuleDescriptor md = readDescriptor("test-dependencies-with-classifier.pom"); + + String actual = writeDescriptor(md, new PomWriterOptions()); + + assertEquals(readResourceContents("test-write-dependencies-with-classifier.xml"), actual); } @Test - public void testTransitive() throws Exception { - ModuleDescriptor md = ModuleDescriptorParserRegistry.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-transitive.xml"), false); - PomModuleDescriptorWriter.write(md, dest, getWriterOptions()); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - System.out.println(wrote); - String expected = readEntirely("test-transitive.pom").replaceAll("\r\n", "\n").replace( - '\r', '\n'); - assertEquals(expected, wrote); + public void testOptional() { + ModuleDescriptor md = readDescriptor("test-optional.pom"); + + String actual = writeDescriptor(md, new PomWriterOptions()); + + assertEquals(readResourceContents("test-write-dependencies-optional.xml"), actual); } @Test - public void testPackaging() throws Exception { - ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-packaging.pom"), false); - PomModuleDescriptorWriter.write(md, dest, getWriterOptions()); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - String expected = readEntirely("test-write-packaging.xml").replaceAll("\r\n", "\n") - .replace('\r', '\n'); - assertEquals(expected, wrote); + public void testTransitive() { + ModuleDescriptor md = readDescriptor("test-transitive.xml"); + + String actual = writeDescriptor(md, new PomWriterOptions()); + + assertEquals(readResourceContents("test-transitive.pom"), actual); } @Test - public void testWriteCompileConfigurationOnly() throws Exception { - ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-dependencies-with-scope.pom"), false); - PomModuleDescriptorWriter.write(md, dest, - getWriterOptions().setConfs(new String[] {"compile"})); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - String expected = readEntirely("test-write-compile-dependencies.xml").replaceAll("\r\n", - "\n").replace('\r', '\n'); - assertEquals(expected, wrote); + public void testPackaging() { + ModuleDescriptor md = readDescriptor("test-packaging.pom"); + + String actual = writeDescriptor(md, new PomWriterOptions()); + + assertEquals(readResourceContents("test-write-packaging.xml"), actual); } @Test - public void testWriteRuntimeConfigurationOnly() throws Exception { - ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-dependencies-with-scope.pom"), false); - PomModuleDescriptorWriter.write(md, dest, - getWriterOptions().setConfs(new String[] {"runtime"})); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - String expected = readEntirely("test-write-dependencies-with-scope.xml").replaceAll("\r\n", - "\n").replace('\r', '\n'); - assertEquals(expected, wrote); + public void testWriteCompileConfigurationOnly() { + ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom"); + + String actual = writeDescriptor(md, new PomWriterOptions().setConfs(new String[] {"compile"})); + + assertEquals(readResourceContents("test-write-compile-dependencies.xml"), actual); } @Test - public void testWriteAllConfiguration() throws Exception { - ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-dependencies-with-scope.pom"), false); - PomModuleDescriptorWriter.write(md, dest, getWriterOptions().setConfs(new String[] {"*"})); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - String expected = readEntirely("test-write-dependencies-with-scope.xml").replaceAll("\r\n", - "\n").replace('\r', '\n'); - assertEquals(expected, wrote); + public void testWriteRuntimeConfigurationOnly() { + ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom"); + + String actual = writeDescriptor(md, new PomWriterOptions().setConfs(new String[] {"runtime"})); + + assertEquals(readResourceContents("test-write-dependencies-with-scope.xml"), actual); } @Test - public void testWriteAllExceptRuntimeConfiguration() throws Exception { - ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor( - new IvySettings(), getClass().getResource("test-dependencies-with-scope.pom"), false); - PomModuleDescriptorWriter.write(md, dest, - getWriterOptions().setConfs(new String[] {"*", "!runtime"})); - assertTrue(dest.exists()); - - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest))) - .replaceAll("\r\n", "\n").replace('\r', '\n'); - String expected = readEntirely("test-write-compile-dependencies.xml").replaceAll("\r\n", - "\n").replace('\r', '\n'); - assertEquals(expected, wrote); - } + public void testWriteAllConfiguration() { + ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom"); - private String readEntirely(String resource) throws IOException { - return FileUtil.readEntirely(new BufferedReader(new InputStreamReader( - PomModuleDescriptorWriterTest.class.getResource(resource).openStream()))); - } + String actual = writeDescriptor(md, new PomWriterOptions().setConfs(new String[] {"*"})); - private PomWriterOptions getWriterOptions() { - return (new PomWriterOptions()).setLicenseHeader(LICENSE).setPrintIvyInfo(false); + assertEquals(readResourceContents("test-write-dependencies-with-scope.xml"), actual); } - @Before - public void setUp() { - if (dest.exists()) { - dest.delete(); - } - if (!dest.getParentFile().exists()) { - dest.getParentFile().mkdirs(); - } - } + @Test + public void testWriteAllExceptRuntimeConfiguration() { + ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom"); - @After - public void tearDown() { - if (dest.exists()) { - dest.delete(); - } + String actual = writeDescriptor(md, new PomWriterOptions().setConfs(new String[] {"*", "!runtime"})); + + assertEquals(readResourceContents("test-write-compile-dependencies.xml"), actual); } } diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom b/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom index 24e72bdca..9f256f9b8 100644 --- a/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom +++ b/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom @@ -1,42 +1,42 @@ - - - - - 4.0.0 - apache - test-transitive - jar - 1.0 - - - apache - ivy - 1.0 - true - - - * - * - - - - - + + + + + 4.0.0 + apache + test-transitive + jar + 1.0 + + + apache + ivy + 1.0 + true + + + * + * + + + + + diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.xml index 1a48966bd..eab084d88 100644 --- a/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.xml +++ b/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.xml @@ -1,24 +1,24 @@ - - - - - - - + + + + + + + diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-classifier.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-classifier.xml index c3bffde86..906c783af 100644 --- a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-classifier.xml +++ b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-classifier.xml @@ -1,38 +1,38 @@ - - - - - 4.0.0 - org.apache - test - jar - 1.0 - http://ant.apache.org/ivy - - - commons-logging - commons-logging - 1.0.4 - asl - compile - - - + + + + + 4.0.0 + org.apache + test + jar + 1.0 + http://ant.apache.org/ivy + + + commons-logging + commons-logging + 1.0.4 + asl + compile + + + diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-type.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-type.xml index 41c997a73..be775889b 100644 --- a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-type.xml +++ b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-type.xml @@ -1,38 +1,38 @@ - - - - - 4.0.0 - org.apache - test - jar - 1.0 - http://ant.apache.org/ivy - - - commons-logging - commons-logging - 1.0.4 - dll - compile - - - + + + + + 4.0.0 + org.apache + test + jar + 1.0 + http://ant.apache.org/ivy + + + commons-logging + commons-logging + 1.0.4 + dll + compile + + + From 7f0b3aebc447e0d4c218ad9d82c5c2af721f831b Mon Sep 17 00:00:00 2001 From: Eric Milles Date: Tue, 23 Jun 2026 13:03:29 -0500 Subject: [PATCH 2/2] IVY-1614, IVY-1655: translate dynamic ranges to Maven-compatible formats --- .../parser/m2/PomModuleDescriptorWriter.java | 65 ++++++++++++++----- .../m2/PomModuleDescriptorWriterTest.java | 12 ++++ .../m2/test-dependencies-with-range.xml | 25 +++++++ .../m2/test-write-dependencies-with-range.xml | 42 ++++++++++++ 4 files changed, 126 insertions(+), 18 deletions(-) create mode 100644 test/java/org/apache/ivy/plugins/parser/m2/test-dependencies-with-range.xml create mode 100644 test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-range.xml diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java index 72bac057e..dc6eb46c5 100644 --- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java +++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java @@ -25,12 +25,16 @@ import java.io.LineNumberReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; +import java.math.BigInteger; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.function.BiConsumer; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.apache.ivy.Ivy; import org.apache.ivy.core.IvyContext; @@ -226,6 +230,31 @@ private static void indent(PrintWriter out, int indent) { } } + /** + * Translates dynamic revision to Maven-compatible version string. + */ + private static String translate(String version) { + version = version.trim(); + if (version.endsWith("+")) { // 1+, 1.+, 1.2+, 1.2.+ + version = version.replaceFirst("\\.?\\s*\\+$", ""); // drop dot-plus + String[] tokens = version.split("\\s*\\.\\s*"); // split on the dots + // try to increment the least-significant token; the exclusive limit + Matcher matcher = Pattern.compile("(\\D*)(\\d+)").matcher(tokens[tokens.length - 1]); + if (matcher.matches()) { + tokens[tokens.length - 1] = matcher.group(1) + new BigInteger(matcher.group(2)).add(new BigInteger("1")); + } + version = "[" + version + "," + String.join(".", tokens) + ")"; + } else { + if (version.startsWith("]")) { + version = "(" + version.substring(1, version.length()); + } + if (version.endsWith("[")) { + version = version.substring(0, version.length() - 1) + ")"; + } + } + return version; + } + private static void printDependencies(ModuleDescriptor md, PrintWriter out, PomWriterOptions options, int indent, boolean printDependencies) { List extraDeps = options.getExtraDependencies(); @@ -259,28 +288,29 @@ private static void printDependencies(ModuleDescriptor md, PrintWriter out, for (DependencyDescriptor dd : dds) { ModuleRevisionId mrid = dd.getDependencyRevisionId(); - ExcludeRule[] excludes = null; - if (dd.canExclude()) { - excludes = dd.getAllExcludeRules(); - } + String safer = translate(mrid.getRevision()); // IVY-1655 + String scope = mapping.getScope(dd.getModuleConfigurations()); + boolean optional = mapping.isOptional(dd.getModuleConfigurations()); + BiConsumer dependencyPrinter = (type, classifier) -> { + printDependency(out, indent, + mrid.getOrganisation(), + mrid.getName(), + safer, + type, + classifier, + scope, + optional, + dd.isTransitive(), + dd.canExclude() ? dd.getAllExcludeRules() : null); + }; + DependencyArtifactDescriptor[] dads = dd.getAllDependencyArtifacts(); if (dads.length > 0) { for (DependencyArtifactDescriptor dad : dads) { - String type = dad.getType(); - String classifier = dad.getExtraAttribute("classifier"); - String scope = mapping.getScope(dd.getModuleConfigurations()); - boolean optional = mapping.isOptional(dd.getModuleConfigurations()); - printDependency(out, indent, mrid.getOrganisation(), mrid.getName(), - mrid.getRevision(), type, classifier, scope, optional, - dd.isTransitive(), excludes); + dependencyPrinter.accept(dad.getType(), dad.getExtraAttribute("classifier")); } } else { - String scope = mapping.getScope(dd.getModuleConfigurations()); - boolean optional = mapping.isOptional(dd.getModuleConfigurations()); - final String classifier = dd.getExtraAttribute("classifier"); - printDependency(out, indent, mrid.getOrganisation(), mrid.getName(), - mrid.getRevision(), null, classifier, scope, optional, dd.isTransitive(), - excludes); + dependencyPrinter.accept(null, dd.getExtraAttribute("classifier")); } } @@ -460,5 +490,4 @@ public Object clone() { throw new UnsupportedOperationException(); } } - } diff --git a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java index 7711b51a9..e491d8242 100644 --- a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java +++ b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java @@ -91,6 +91,18 @@ public void testSimpleDependencies() { assertEquals(readResourceContents("test-write-simple-dependencies.xml"), actual); } + /** + * Test case for IVY-1655. + */ + @Test + public void testDependenciesWithRange() { + ModuleDescriptor md = readDescriptor("test-dependencies-with-range.xml"); + + String actual = writeDescriptor(md, new PomWriterOptions()); + + assertEquals(readResourceContents("test-write-dependencies-with-range.xml"), actual); + } + @Test public void testDependenciesWithScope() { ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom"); diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-dependencies-with-range.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-dependencies-with-range.xml new file mode 100644 index 000000000..f40d2d01e --- /dev/null +++ b/test/java/org/apache/ivy/plugins/parser/m2/test-dependencies-with-range.xml @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-range.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-range.xml new file mode 100644 index 000000000..29033abb4 --- /dev/null +++ b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-range.xml @@ -0,0 +1,42 @@ + + + + + 4.0.0 + apache + ranges + jar + 1.0 + + + fizz + buzz + (0.0,2.0) + true + + + foo + bar + [1.1,1.2) + true + + +