mirror of https://github.com/apache/ant-ivy
Compare commits
3 Commits
159aced142
...
1043263435
| Author | SHA1 | Date |
|---|---|---|
|
|
1043263435 | |
|
|
7eeb87114a | |
|
|
27584b72bf |
|
|
@ -25,12 +25,16 @@ import java.io.InputStreamReader;
|
|||
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 @@ public final class PomModuleDescriptorWriter {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<ExtraDependency> extraDeps = options.getExtraDependencies();
|
||||
|
|
@ -259,28 +288,29 @@ public final class PomModuleDescriptorWriter {
|
|||
|
||||
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<String, String> 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 final class PomModuleDescriptorWriter {
|
|||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,232 +17,179 @@
|
|||
*/
|
||||
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");
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
private String readEntirely(String resource) throws IOException {
|
||||
return FileUtil.readEntirely(new BufferedReader(new InputStreamReader(
|
||||
PomModuleDescriptorWriterTest.class.getResource(resource).openStream())));
|
||||
}
|
||||
|
||||
private PomWriterOptions getWriterOptions() {
|
||||
return (new PomWriterOptions()).setLicenseHeader(LICENSE).setPrintIvyInfo(false);
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
if (dest.exists()) {
|
||||
dest.delete();
|
||||
}
|
||||
if (!dest.getParentFile().exists()) {
|
||||
dest.getParentFile().mkdirs();
|
||||
private String readResourceContents(String resourceName) {
|
||||
try {
|
||||
return FileUtil.readEntirely(getClass().getResourceAsStream(resourceName));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
if (dest.exists()) {
|
||||
dest.delete();
|
||||
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 testSimple() {
|
||||
ModuleDescriptor md = readDescriptor("test-simple.pom");
|
||||
|
||||
String actual = writeDescriptor(md, new PomWriterOptions());
|
||||
|
||||
assertEquals(readResourceContents("test-write-simple.xml"), actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSimpleDependencies() {
|
||||
ModuleDescriptor md = readDescriptor("test-dependencies.pom");
|
||||
|
||||
String actual = writeDescriptor(md, new PomWriterOptions());
|
||||
|
||||
assertEquals(readResourceContents("test-write-simple-dependencies.xml"), actual);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for <a href="https://issues.apache.org/jira/browse/IVY-1655">IVY-1655</a>.
|
||||
*/
|
||||
@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");
|
||||
|
||||
String actual = writeDescriptor(md, new PomWriterOptions());
|
||||
|
||||
assertEquals(readResourceContents("test-write-dependencies-with-scope.xml"), actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
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 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 testOptional() {
|
||||
ModuleDescriptor md = readDescriptor("test-optional.pom");
|
||||
|
||||
String actual = writeDescriptor(md, new PomWriterOptions());
|
||||
|
||||
assertEquals(readResourceContents("test-write-dependencies-optional.xml"), actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTransitive() {
|
||||
ModuleDescriptor md = readDescriptor("test-transitive.xml");
|
||||
|
||||
String actual = writeDescriptor(md, new PomWriterOptions());
|
||||
|
||||
assertEquals(readResourceContents("test-transitive.pom"), actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
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 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 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 testWriteAllConfiguration() {
|
||||
ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom");
|
||||
|
||||
String actual = writeDescriptor(md, new PomWriterOptions().setConfs(new String[] {"*"}));
|
||||
|
||||
assertEquals(readResourceContents("test-write-dependencies-with-scope.xml"), actual);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWriteAllExceptRuntimeConfiguration() {
|
||||
ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom");
|
||||
|
||||
String actual = writeDescriptor(md, new PomWriterOptions().setConfs(new String[] {"*", "!runtime"}));
|
||||
|
||||
assertEquals(readResourceContents("test-write-compile-dependencies.xml"), actual);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<ivy-module version="1.0">
|
||||
<info organisation="apache" module="ranges" revision="1.0" />
|
||||
<dependencies>
|
||||
<dependency org="fizz" name="buzz" rev="]0.0,2.0[" />
|
||||
<dependency org="foo" name="bar" rev="1.1.+" />
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
|
|
@ -1,42 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>apache</groupId>
|
||||
<artifactId>test-transitive</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>apache</groupId>
|
||||
<artifactId>ivy</artifactId>
|
||||
<version>1.0</version>
|
||||
<optional>true</optional>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>apache</groupId>
|
||||
<artifactId>test-transitive</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>apache</groupId>
|
||||
<artifactId>ivy</artifactId>
|
||||
<version>1.0</version>
|
||||
<optional>true</optional>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<ivy-module version="1.0">
|
||||
<info organisation="apache" module="test-transitive" revision="1.0"/>
|
||||
<dependencies>
|
||||
<dependency org="apache" name="ivy" rev="1.0" transitive="false" />
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<ivy-module version="1.0">
|
||||
<info organisation="apache" module="test-transitive" revision="1.0"/>
|
||||
<dependencies>
|
||||
<dependency org="apache" name="ivy" rev="1.0" transitive="false" />
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
|
|
|
|||
|
|
@ -1,38 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache</groupId>
|
||||
<artifactId>test</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0</version>
|
||||
<url>http://ant.apache.org/ivy</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.0.4</version>
|
||||
<classifier>asl</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache</groupId>
|
||||
<artifactId>test</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0</version>
|
||||
<url>http://ant.apache.org/ivy</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.0.4</version>
|
||||
<classifier>asl</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>apache</groupId>
|
||||
<artifactId>ranges</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>fizz</groupId>
|
||||
<artifactId>buzz</artifactId>
|
||||
<version>(0.0,2.0)</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>foo</groupId>
|
||||
<artifactId>bar</artifactId>
|
||||
<version>[1.1,1.2)</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -1,38 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache</groupId>
|
||||
<artifactId>test</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0</version>
|
||||
<url>http://ant.apache.org/ivy</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.0.4</version>
|
||||
<type>dll</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache</groupId>
|
||||
<artifactId>test</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0</version>
|
||||
<url>http://ant.apache.org/ivy</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.0.4</version>
|
||||
<type>dll</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
Loading…
Reference in New Issue