}
public void testResolveMaven2WithConflict() throws Exception {
Ivy ivy = new Ivy();
ivy.configure(new File("test/repositories/m2/ivysettings.xml"));
ResolveReport report = ivy.resolve(new File(
"test/repositories/m2/org/apache/test3/1.1/test3-1.1.pom"),
getResolveOptions(new String[] {"default"}));
assertFalse(report.hasError());
assertTrue(getIvyFileInCache(ModuleRevisionId.newInstance("org.apache", "test2", "1.1"))
.exists());
assertTrue(getArchiveFileInCache(ivy, "org.apache", "test2", "1.1", "test2", "jar", "jar")
.exists());
assertTrue(getIvyFileInCache(ModuleRevisionId.newInstance("org.apache", "test", "1.1"))
.exists());
assertTrue(getArchiveFileInCache(ivy, "org.apache", "test", "1.1", "test", "jar", "jar")
.exists());
assertContainsArtifact(report.getConfigurationReport("default"),
getArtifact("org.apache", "test2", "1.1", "test2", "jar", "jar"));
assertContainsArtifact(report.getConfigurationReport("default"),
getArtifact("org.apache", "test", "1.1", "test", "jar", "jar"));
}