You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ma...@apache.org on 2009/07/03 23:41:36 UTC
svn commit: r791026 [3/3] - in /ant/ivy/core/branches/2.1.x: ./ doc/
doc/dev/ doc/ivyfile/ doc/settings/ doc/use/ src/java/org/apache/ivy/
src/java/org/apache/ivy/ant/ src/java/org/apache/ivy/core/
src/java/org/apache/ivy/core/cache/ src/java/org/apach...
Modified: ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java?rev=791026&r1=791025&r2=791026&view=diff
==============================================================================
--- ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java (original)
+++ ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/core/resolve/ResolveTest.java Fri Jul 3 21:41:32 2009
@@ -29,7 +29,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
import java.util.Set;
import javax.xml.parsers.SAXParser;
@@ -101,40 +100,69 @@
public void testResolveWithRetainingArtifactName() throws Exception {
- ivy.pushContext();
- try {
- ((DefaultRepositoryCacheManager) settings.getDefaultRepositoryCacheManager())
+ ((DefaultRepositoryCacheManager) settings.getDefaultRepositoryCacheManager())
.setArtifactPattern(ivy.substitute("[module]/[originalname].[ext]"));
- ResolveReport report = ivy.resolve(new File("test/repositories/2/mod15.2/ivy-1.1.xml")
- .toURL(), getResolveOptions(new String[] {"default"}));
- assertNotNull(report);
+ ResolveReport report = ivy.resolve(new File("test/repositories/2/mod15.2/ivy-1.1.xml")
+ .toURL(), getResolveOptions(new String[] {"default"}));
+ assertNotNull(report);
- ArtifactDownloadReport[] dReports = report.getConfigurationReport("default")
- .getDownloadReports(ModuleRevisionId.newInstance("org15", "mod15.1", "1.1"));
- assertNotNull(dReports);
- assertEquals("number of downloaded artifacts not correct", 1, dReports.length);
+ ArtifactDownloadReport[] dReports = report.getConfigurationReport("default")
+ .getDownloadReports(ModuleRevisionId.newInstance("org15", "mod15.1", "1.1"));
+ assertNotNull(dReports);
+ assertEquals("number of downloaded artifacts not correct", 1, dReports.length);
- Artifact artifact = dReports[0].getArtifact();
- assertNotNull(artifact);
+ Artifact artifact = dReports[0].getArtifact();
+ assertNotNull(artifact);
- String cachePath = getArchivePathInCache(artifact);
- assertTrue("artifact name has not been retained: " + cachePath, cachePath
+ String cachePath = getArchivePathInCache(artifact);
+ assertTrue("artifact name has not been retained: " + cachePath, cachePath
.endsWith("library.jar"));
- dReports = report.getConfigurationReport("default").getDownloadReports(
+ dReports = report.getConfigurationReport("default").getDownloadReports(
ModuleRevisionId.newInstance("org14", "mod14.1", "1.1"));
- assertNotNull(dReports);
- assertEquals("number of downloaded artifacts not correct", 1, dReports.length);
+ assertNotNull(dReports);
+ assertEquals("number of downloaded artifacts not correct", 1, dReports.length);
- artifact = dReports[0].getArtifact();
- assertNotNull(artifact);
+ artifact = dReports[0].getArtifact();
+ assertNotNull(artifact);
- cachePath = getArchivePathInCache(artifact);
- assertTrue("artifact name has not been retained: " + cachePath, cachePath
+ cachePath = getArchivePathInCache(artifact);
+ assertTrue("artifact name has not been retained: " + cachePath, cachePath
+ .endsWith("mod14.1-1.1.jar"));
+ }
+
+ public void testResolveWithRetainingArtifactNameAndExtraAttributes() throws Exception {
+ ((DefaultRepositoryCacheManager) settings.getDefaultRepositoryCacheManager())
+ .setArtifactPattern(ivy.substitute("[module]/[originalname].[ext]"));
+ ResolveReport report = ivy.resolve(new File("test/repositories/2/mod15.4/ivy-1.1.xml")
+ .toURL(), getResolveOptions(new String[] {"default"}).setValidate(false));
+ assertNotNull(report);
+
+ Map extra = new HashMap();
+ extra.put("extra", "foo");
+ ArtifactDownloadReport[] dReports = report.getConfigurationReport("default")
+ .getDownloadReports(ModuleRevisionId.newInstance("org15", "mod15.3", "1.1", extra));
+ assertNotNull(dReports);
+ assertEquals("number of downloaded artifacts not correct", 1, dReports.length);
+
+ Artifact artifact = dReports[0].getArtifact();
+ assertNotNull(artifact);
+
+ String cachePath = getArchivePathInCache(artifact);
+ assertTrue("artifact name has not been retained: " + cachePath, cachePath
+ .endsWith("library.jar"));
+
+ dReports = report.getConfigurationReport("default").getDownloadReports(
+ ModuleRevisionId.newInstance("org14", "mod14.1", "1.1"));
+ assertNotNull(dReports);
+ assertEquals("number of downloaded artifacts not correct", 1, dReports.length);
+
+ artifact = dReports[0].getArtifact();
+ assertNotNull(artifact);
+
+ cachePath = getArchivePathInCache(artifact);
+ assertTrue("artifact name has not been retained: " + cachePath, cachePath
.endsWith("mod14.1-1.1.jar"));
- } finally {
- ivy.popContext();
- }
}
public void testArtifactOrigin() throws Exception {
@@ -1992,6 +2020,26 @@
"commons-lang", "jar", "jar").exists());
}
+ public void testResolveMergeTransitiveAfterConflict() throws Exception {
+ // mod20.4 -> mod20.3;1.0 mod20.2;1.0
+ // mod20.3;1.0 -> mod20.1;1.0
+ // mod20.2;1.0 -> mod20.1;1.1 (transitive false)
+ // mod20.1;1.0 -> mod1.2;1.0
+ // mod20.1;1.1 -> mod1.2;1.0
+ ResolveReport report = ivy.resolve(new File("test/repositories/1/org20/mod20.4/ivys/ivy-1.0.xml")
+ .toURL(), getResolveOptions(new String[] {"*"}));
+
+ // dependencies
+ ConfigurationResolveReport crr = report.getConfigurationReport("default");
+ assertNotNull(crr);
+ assertEquals(1, crr.getDownloadReports(ModuleRevisionId
+ .newInstance("org1", "mod1.2", "1.0")).length);
+
+ assertTrue(getIvyFileInCache(
+ ModuleRevisionId.newInstance("org1", "mod1.2", "1.0")).exists());
+ assertTrue(getArchiveFileInCache("org1", "mod1.2", "1.0", "mod1.2", "jar", "jar").exists());
+ }
+
/**
* Test IVY-618.
*/
@@ -3585,6 +3633,34 @@
assertFalse(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
}
+ public void testResolveExcludesConf() throws Exception {
+ // mod2.6 depends on mod2.3 in conf default and mod2.5 in conf exclude
+ // mod2.5 depends on mod2.3
+ // mod2.6 globally exclude mod2.3 in conf exclude
+ ResolveReport report = ivy.resolve(new File(
+ "test/repositories/1/org2/mod2.6/ivys/ivy-0.13.xml").toURL(),
+ getResolveOptions(new String[] {"include"}));
+ ModuleDescriptor md = report.getModuleDescriptor();
+ assertEquals(ModuleRevisionId.newInstance("org2", "mod2.6", "0.13"), md
+ .getModuleRevisionId());
+
+ assertTrue(getIvyFileInCache(
+ ModuleRevisionId.newInstance("org2", "mod2.3", "0.4")).exists());
+ }
+
+ public void testResolveExcludesConf2() throws Exception {
+ // same as testResolveExcludesConf
+ ResolveReport report = ivy.resolve(new File(
+ "test/repositories/1/org2/mod2.6/ivys/ivy-0.13.xml").toURL(),
+ getResolveOptions(new String[] {"exclude"}));
+ ModuleDescriptor md = report.getModuleDescriptor();
+ assertEquals(ModuleRevisionId.newInstance("org2", "mod2.6", "0.13"), md
+ .getModuleRevisionId());
+
+ assertFalse(getIvyFileInCache(
+ ModuleRevisionId.newInstance("org2", "mod2.3", "0.4")).exists());
+ }
+
public void testResolveExceptConfiguration() throws Exception {
// mod10.2 depends on mod5.1 conf *, !A
ivy.resolve(new File("test/repositories/2/mod10.2/ivy-2.0.xml").toURL(),
@@ -3594,6 +3670,110 @@
assertTrue(getArchiveFileInCache("org5", "mod5.1", "4.1", "art51B", "jar", "jar").exists());
}
+ public void testResolveIntersectConfiguration1() throws Exception {
+ // mod5.2;3.0 -> mod5.1;4.4 (*->@)
+ // mod5.1;4.4 -> mod1.2;2.0 (B,xplatform->default)
+ // mod5.1;4.4 -> mod2.2;0.9 (B,windows->myconf1;B,linux->myconf2)
+ // mod5.1;4.4 -> mod2.1;0.5 (B,windows->A+B)
+ ivy.resolve(new File("test/repositories/2/mod5.2/ivy-3.0.xml").toURL(),
+ getResolveOptions(new String[] {"A"}));
+
+ assertTrue(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51A", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "dll", "dll").exists());
+ assertFalse(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "so", "so").exists());
+ }
+
+ public void testResolveIntersectConfiguration2() throws Exception {
+ // mod5.2;3.0 -> mod5.1;4.4 (*->@)
+ // mod5.1;4.4 -> mod1.2;2.0 (B,xplatform->default)
+ // mod5.1;4.4 -> mod2.2;0.9 (B,windows->myconf1;B,linux->myconf2)
+ // mod5.1;4.4 -> mod2.1;0.5 (B,windows->A+B)
+ ivy.resolve(new File("test/repositories/2/mod5.2/ivy-3.0.xml").toURL(),
+ getResolveOptions(new String[] {"B"}));
+
+ assertFalse(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51A", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "dll", "dll").exists());
+ assertTrue(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "so", "so").exists());
+ assertTrue(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org2", "mod2.2", "0.9", "art22-1", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org2", "mod2.2", "0.9", "art22-2", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21A", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21B", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21AB", "jar", "jar").exists());
+ }
+
+ public void testResolveIntersectConfiguration3() throws Exception {
+ // mod5.2;3.0 -> mod5.1;4.4 (*->@)
+ // mod5.1;4.4 -> mod1.2;2.0 (B,xplatform->default)
+ // mod5.1;4.4 -> mod2.2;0.9 (B,windows->myconf1;B,linux->myconf2)
+ // mod5.1;4.4 -> mod2.1;0.5 (B,windows->A+B)
+ ivy.resolve(new File("test/repositories/2/mod5.2/ivy-3.0.xml").toURL(),
+ getResolveOptions(new String[] {"B+windows"}));
+
+ assertFalse(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51A", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "dll", "dll").exists());
+ assertFalse(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "so", "so").exists());
+ assertTrue(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org2", "mod2.2", "0.9", "art22-1", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.2", "0.9", "art22-2", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21A", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21B", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21AB", "jar", "jar").exists());
+ }
+
+ public void testResolveIntersectConfiguration4() throws Exception {
+ // mod5.2;3.0 -> mod5.1;4.4 (*->@)
+ // mod5.1;4.4 -> mod1.2;2.0 (B,xplatform->default)
+ // mod5.1;4.4 -> mod2.2;0.9 (B,windows->myconf1;B,linux->myconf2)
+ // mod5.1;4.4 -> mod2.1;0.5 (B,windows->A+B)
+ // mod5.1;4.4 -> mod2.8;0.6 (windows,linux->@+thread+debug;A,B->*)
+ ivy.resolve(new File("test/repositories/2/mod5.2/ivy-3.0.xml").toURL(),
+ getResolveOptions(new String[] {"B+linux"}));
+
+ assertFalse(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51A", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "dll", "dll").exists());
+ assertTrue(getArchiveFileInCache("org5", "mod5.1", "4.4", "art51B", "so", "so").exists());
+ assertTrue(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.2", "0.9", "art22-1", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org2", "mod2.2", "0.9", "art22-2", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21A", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21B", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21AB", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org2", "mod2.8", "0.6", "art28-linux-debug-thread", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.8", "0.6", "art28-linux-debug", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.8", "0.6", "art28-windows-debug-thread", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.8", "0.6", "art28-windows-debug", "jar", "jar").exists());
+ }
+
+ public void testConfigurationGroups() throws Exception {
+ // mod5.2;3.1 -> mod5.1;4.5 (*->@)
+ // mod5.1;4.5 -> mod1.2;2.0 (B,*[axis=platform]->default)
+ // mod5.1;4.5 -> mod2.2;0.9 (B,windows->myconf1;B,linux->myconf2)
+ // mod5.1;4.5 -> mod2.1;0.5 (B,windows->A+B)
+ // mod5.1;4.5 -> mod2.8;0.6 (windows,linux->@+thread+debug;A,B->*)
+ ivy.resolve(new File("test/repositories/2/mod5.2/ivy-3.1.xml").toURL(),
+ getResolveOptions(new String[] {"B+linux"}));
+
+ assertFalse(getArchiveFileInCache("org5", "mod5.1", "4.5", "art51A", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org5", "mod5.1", "4.5", "art51B", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org5", "mod5.1", "4.5", "art51B", "dll", "dll").exists());
+ assertTrue(getArchiveFileInCache("org5", "mod5.1", "4.5", "art51B", "so", "so").exists());
+ assertTrue(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.2", "0.9", "art22-1", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org2", "mod2.2", "0.9", "art22-2", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21A", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21B", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.1", "0.5", "art21AB", "jar", "jar").exists());
+ assertTrue(getArchiveFileInCache("org2", "mod2.8", "0.6", "art28-linux-debug-thread", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.8", "0.6", "art28-linux-debug", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.8", "0.6", "art28-windows-debug-thread", "jar", "jar").exists());
+ assertFalse(getArchiveFileInCache("org2", "mod2.8", "0.6", "art28-windows-debug", "jar", "jar").exists());
+ }
+
public void testResolveFallbackConfiguration() throws Exception {
// mod10.2 depends on mod5.1 conf runtime(default)
ivy.resolve(new File("test/repositories/2/mod10.2/ivy-1.0.xml").toURL(),
Modified: ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java?rev=791026&r1=791025&r2=791026&view=diff
==============================================================================
--- ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java (original)
+++ ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java Fri Jul 3 21:41:32 2009
@@ -21,6 +21,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import junit.framework.TestCase;
@@ -28,9 +29,12 @@
import org.apache.ivy.core.IvyPatternHelper;
import org.apache.ivy.core.event.IvyEvent;
import org.apache.ivy.core.event.IvyListener;
+import org.apache.ivy.core.event.retrieve.EndRetrieveArtifactEvent;
import org.apache.ivy.core.event.retrieve.EndRetrieveEvent;
+import org.apache.ivy.core.event.retrieve.StartRetrieveArtifactEvent;
import org.apache.ivy.core.event.retrieve.StartRetrieveEvent;
import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.module.id.ModuleRevisionId;
import org.apache.ivy.core.report.ResolveReport;
import org.apache.ivy.core.resolve.ResolveOptions;
import org.apache.ivy.util.Message;
@@ -141,10 +145,12 @@
ModuleDescriptor md = report.getModuleDescriptor();
String pattern = "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]";
ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
- assertEquals(2, events.size());
+ assertEquals(4, events.size());
assertTrue(events.get(0) instanceof StartRetrieveEvent);
- assertTrue(events.get(1) instanceof EndRetrieveEvent);
- EndRetrieveEvent ev = (EndRetrieveEvent) events.get(1);
+ assertTrue(events.get(1) instanceof StartRetrieveArtifactEvent);
+ assertTrue(events.get(2) instanceof EndRetrieveArtifactEvent);
+ assertTrue(events.get(3) instanceof EndRetrieveEvent);
+ EndRetrieveEvent ev = (EndRetrieveEvent) events.get(3);
assertEquals(1, ev.getNbCopied());
assertEquals(0, ev.getNbUpToDate());
@@ -246,6 +252,33 @@
"jar", "jar", "default")).exists());
}
+ public void testRetrieveReport() throws Exception {
+ // mod1.1 depends on mod1.2
+ ResolveReport report = ivy.resolve(new File(
+ "test/repositories/1/org20/mod20.1/ivys/ivy-1.2.xml").toURL(),
+ getResolveOptions(new String[] {"*"}));
+ assertNotNull(report);
+ ModuleDescriptor md = report.getModuleDescriptor();
+ assertNotNull(md);
+
+ ModuleRevisionId mrid = md.getModuleRevisionId();
+ RetrieveOptions options = getRetrieveOptions();
+ options.setConfs(new String[] {"A"});
+ Map artifactsToCopy = ivy.getRetrieveEngine().determineArtifactsToCopy(mrid,
+ "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]", options);
+ assertEquals(2, artifactsToCopy.size());
+
+ options.setConfs(new String[] {"B"});
+ artifactsToCopy = ivy.getRetrieveEngine().determineArtifactsToCopy(mrid,
+ "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]", options);
+ assertEquals(2, artifactsToCopy.size());
+
+ options.setConfs(new String[] {"A", "B"});
+ artifactsToCopy = ivy.getRetrieveEngine().determineArtifactsToCopy(mrid,
+ "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]", options);
+ assertEquals(3, artifactsToCopy.size());
+ }
+
private RetrieveOptions getRetrieveOptions() {
return new RetrieveOptions();
}
Modified: ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java?rev=791026&r1=791025&r2=791026&view=diff
==============================================================================
--- ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java (original)
+++ ant/ivy/core/branches/2.1.x/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java Fri Jul 3 21:41:32 2009
@@ -27,6 +27,7 @@
import org.apache.ivy.core.module.descriptor.Artifact;
import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
+import org.apache.ivy.core.module.descriptor.DependencyArtifactDescriptor;
import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
import org.apache.ivy.core.module.descriptor.ExcludeRule;
import org.apache.ivy.core.module.descriptor.License;
@@ -148,6 +149,26 @@
assertEquals("ejb", artifact[0].getType());
}
+ public void testEjbType() throws Exception {
+ ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
+ settings, getClass().getResource("test-ejb-type.pom"), false);
+ assertNotNull(md);
+
+ ModuleRevisionId mrid = ModuleRevisionId.newInstance("org.apache", "test", "1.0");
+ assertEquals(mrid, md.getModuleRevisionId());
+
+ DependencyDescriptor[] deps = md.getDependencies();
+ assertNotNull(deps);
+ assertEquals(1, deps.length);
+
+ DependencyArtifactDescriptor[] artifacts = deps[0].getAllDependencyArtifacts();
+ assertNotNull(artifacts);
+ assertEquals(1, artifacts.length);
+ assertEquals("test", artifacts[0].getName());
+ assertEquals("jar", artifacts[0].getExt());
+ assertEquals("ejb", artifacts[0].getType());
+ }
+
public void testParent() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
settings, getClass().getResource("test-parent.pom"), false);
Modified: ant/ivy/core/branches/2.1.x/test/repositories/2/mod15.2/ivy-1.1.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.1.x/test/repositories/2/mod15.2/ivy-1.1.xml?rev=791026&r1=791025&r2=791026&view=diff
==============================================================================
--- ant/ivy/core/branches/2.1.x/test/repositories/2/mod15.2/ivy-1.1.xml (original)
+++ ant/ivy/core/branches/2.1.x/test/repositories/2/mod15.2/ivy-1.1.xml Fri Jul 3 21:41:32 2009
@@ -25,6 +25,6 @@
/>
<dependencies>
<dependency org="org15" name="mod15.1" rev="1.1" conf="default->default"/>
- <dependency org="org14" name="mod14.1" rev="1.1" conf="default->default" transitive="false" />
+ <dependency org="org14" name="mod14.1" rev="1.1" conf="default->default" transitive="false" />
</dependencies>
</ivy-module>
Modified: ant/ivy/core/branches/2.1.x/version.properties
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.1.x/version.properties?rev=791026&r1=791025&r2=791026&view=diff
==============================================================================
--- ant/ivy/core/branches/2.1.x/version.properties (original)
+++ ant/ivy/core/branches/2.1.x/version.properties Fri Jul 3 21:41:32 2009
@@ -16,9 +16,9 @@
# * specific language governing permissions and limitations
# * under the License.
# ***************************************************************
-target.ivy.version=2.1.0-rc1
+target.ivy.version=2.1.0-rc2
# Following OSGi spec: have to be 3 numbers separated by dots
target.ivy.bundle.version=2.1.0
# in case we want to add a qualifier such as alpha, beta, etc...
# if non empty, add a '_' at the end of the qualifier, so the version would look like 1.2.3.alpha_200901011200
-target.ivy.bundle.version.qualifier=cr1_
\ No newline at end of file
+target.ivy.bundle.version.qualifier=cr2_
\ No newline at end of file