use of org.apache.ivy.core.resolve.ResolveData in project ant-ivy by apache.
the class PomModuleDescriptorParserTest method testOverrideParentProperties.
@Test
public void testOverrideParentProperties() throws ParseException, IOException {
settings.setDictatorResolver(new MockResolver() {
public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws ParseException {
try {
ModuleDescriptor moduleDescriptor = PomModuleDescriptorParser.getInstance().parseDescriptor(settings, getClass().getResource("test-version.pom"), false);
return new ResolvedModuleRevision(null, null, moduleDescriptor, null);
} catch (IOException e) {
throw new AssertionError(e);
}
}
});
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(settings, getClass().getResource("test-override-parent-properties.pom"), false);
assertNotNull(md);
assertEquals("1.0", md.getRevision());
DependencyDescriptor[] dds = md.getDependencies();
assertNotNull(dds);
assertEquals(2, dds.length);
// 2 are inherited from parent. Only the first one is important for this test
assertEquals(ModuleRevisionId.newInstance("org.apache", "test-yet-other", "5.79"), dds[1].getDependencyRevisionId());
}
use of org.apache.ivy.core.resolve.ResolveData in project ant-ivy by apache.
the class ChainResolverTest method setUp.
@Before
public void setUp() {
settings = new IvySettings();
engine = new ResolveEngine(settings, new EventManager(), new SortEngine(settings));
TestHelper.createCache();
data = new ResolveData(engine, new ResolveOptions());
settings.setDefaultCache(TestHelper.cache);
}
use of org.apache.ivy.core.resolve.ResolveData in project ant-ivy by apache.
the class DualResolverTest method setUp.
@Before
public void setUp() {
settings = new IvySettings();
engine = new ResolveEngine(settings, new EventManager(), new SortEngine(settings));
cache = new File("build/cache");
data = new ResolveData(engine, new ResolveOptions());
cache.mkdirs();
settings.setDefaultCache(cache);
}
use of org.apache.ivy.core.resolve.ResolveData in project ant-ivy by apache.
the class IvyRepResolverTest method setUp.
@Before
public void setUp() {
settings = new IvySettings();
engine = new ResolveEngine(settings, new EventManager(), new SortEngine(settings));
data = new ResolveData(engine, new ResolveOptions());
TestHelper.createCache();
settings.setDefaultCache(TestHelper.cache);
}
use of org.apache.ivy.core.resolve.ResolveData in project ant-ivy by apache.
the class BintrayResolverTest method setUp.
@Before
public void setUp() {
settings = new IvySettings();
engine = new ResolveEngine(settings, new EventManager(), new SortEngine(settings));
data = new ResolveData(engine, new ResolveOptions());
settings.setDefaultCache(TestHelper.cache);
}
Aggregations