use of org.apache.ivy.core.report.ResolveReport in project ant-ivy by apache.
the class IvyPostResolveTaskTest method testWithResolveIdAndPreviousResolveInSameBuildAndWildcard.
@Test
public void testWithResolveIdAndPreviousResolveInSameBuildAndWildcard() {
IvyResolve resolve = new IvyResolve();
resolve.setProject(project);
resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-multiconf.xml"));
resolve.setConf("*");
resolve.setResolveId("testResolveId");
resolve.execute();
ResolveReport report1 = project.getReference("ivy.resolved.report.testResolveId");
// perform another resolve
resolve = new IvyResolve();
resolve.setProject(project);
resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-simple.xml"));
resolve.setConf("*");
resolve.execute();
ResolveReport reportBefore = project.getReference("ivy.resolved.report");
task.setConf("default");
task.setResolveId("testResolveId");
task.execute();
ResolveReport reportAfter = project.getReference("ivy.resolved.report");
ResolveReport report2 = project.getReference("ivy.resolved.report.testResolveId");
assertSame("IvyPostResolveTask has performed a resolve where it shouldn't", reportBefore, reportAfter);
assertSame("IvyPostResolveTask has performed a resolve where it shouldn't", report1, report2);
}
use of org.apache.ivy.core.report.ResolveReport in project ant-ivy by apache.
the class IvyPostResolveTaskTest method testWithPreviousResolveInSameBuildAndMoreConfs.
@Test
public void testWithPreviousResolveInSameBuildAndMoreConfs() {
IvyResolve resolve = new IvyResolve();
resolve.setProject(project);
resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-multiconf.xml"));
resolve.setConf("compile");
resolve.execute();
ResolveReport reportBefore = project.getReference("ivy.resolved.report");
assertTrue(getArchiveFileInCache("org1", "mod1.1", "2.0", "mod1.1", "jar", "jar").exists());
assertFalse(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
task.setConf("*");
task.execute();
ResolveReport reportAfter = project.getReference("ivy.resolved.report");
assertNotSame("IvyPostResolveTask hasn't performed a resolve where it should have", reportBefore, reportAfter);
assertTrue(getArchiveFileInCache("org1", "mod1.2", "2.0", "mod1.2", "jar", "jar").exists());
}
use of org.apache.ivy.core.report.ResolveReport in project ant-ivy by apache.
the class IvyPostResolveTaskTest method testWithPreviousResolveInSameBuildAndSameConfs.
@Test
public void testWithPreviousResolveInSameBuildAndSameConfs() {
IvyResolve resolve = new IvyResolve();
resolve.setProject(project);
resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-multiconf.xml"));
resolve.setConf("default");
resolve.execute();
ResolveReport reportBefore = project.getReference("ivy.resolved.report");
task.setConf("default");
task.execute();
ResolveReport reportAfter = project.getReference("ivy.resolved.report");
assertSame("IvyPostResolveTask has performed a resolve where it shouldn't", reportBefore, reportAfter);
}
use of org.apache.ivy.core.report.ResolveReport in project ant-ivy by apache.
the class IvyPostResolveTaskTest method testWithResolveIdAndPreviousResolveInSameBuildAndSameConfs.
@Test
public void testWithResolveIdAndPreviousResolveInSameBuildAndSameConfs() {
IvyResolve resolve = new IvyResolve();
resolve.setProject(project);
resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-multiconf.xml"));
resolve.setConf("default");
resolve.setResolveId("testResolveId");
resolve.execute();
ResolveReport report1 = project.getReference("ivy.resolved.report.testResolveId");
// perform another resolve
resolve = new IvyResolve();
resolve.setProject(project);
resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-simple.xml"));
resolve.setConf("*");
resolve.execute();
ResolveReport reportBefore = project.getReference("ivy.resolved.report");
task.setConf("default");
task.setResolveId("testResolveId");
task.execute();
ResolveReport reportAfter = project.getReference("ivy.resolved.report");
ResolveReport report2 = project.getReference("ivy.resolved.report.testResolveId");
assertSame("IvyPostResolveTask has performed a resolve where it shouldn't", reportBefore, reportAfter);
assertSame("IvyPostResolveTask has performed a resolve where it shouldn't", report1, report2);
}
use of org.apache.ivy.core.report.ResolveReport in project ant-ivy by apache.
the class IvyPostResolveTaskTest method testWithPreviousResolveInSameBuildAndBothWildcard.
@Test
public void testWithPreviousResolveInSameBuildAndBothWildcard() {
IvyResolve resolve = new IvyResolve();
resolve.setProject(project);
resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-multiconf.xml"));
resolve.setConf("*");
resolve.execute();
ResolveReport reportBefore = project.getReference("ivy.resolved.report");
task.setConf("*");
task.execute();
ResolveReport reportAfter = project.getReference("ivy.resolved.report");
assertSame("IvyPostResolveTask has performed a resolve where it shouldn't", reportBefore, reportAfter);
}
Aggregations