use of org.apache.ivy.core.settings.XmlSettingsParser in project ant-ivy by apache.
the class ChainResolverTest method testOrderFromConf.
@Test
public void testOrderFromConf() throws Exception {
new XmlSettingsParser(settings).parse(ChainResolverTest.class.getResource("chainresolverconf.xml"));
DependencyResolver resolver = settings.getResolver("chain");
assertNotNull(resolver);
assertTrue(resolver instanceof ChainResolver);
ChainResolver chain = (ChainResolver) resolver;
assertResolversSizeAndNames(chain, 3);
}
use of org.apache.ivy.core.settings.XmlSettingsParser in project ant-ivy by apache.
the class DualResolverTest method testFromConf.
@Test
public void testFromConf() throws Exception {
new XmlSettingsParser(settings).parse(DualResolverTest.class.getResource("dualresolverconf.xml"));
DependencyResolver resolver = settings.getResolver("dualok");
assertNotNull(resolver);
assertTrue(resolver instanceof DualResolver);
DualResolver dual = (DualResolver) resolver;
assertNotNull(dual.getIvyResolver());
assertEquals("ivy", dual.getIvyResolver().getName());
assertNotNull(dual.getArtifactResolver());
assertEquals("artifact", dual.getArtifactResolver().getName());
resolver = settings.getResolver("dualnotenough");
assertNotNull(resolver);
assertTrue(resolver instanceof DualResolver);
dual = (DualResolver) resolver;
assertNotNull(dual.getIvyResolver());
assertNull(dual.getArtifactResolver());
}
use of org.apache.ivy.core.settings.XmlSettingsParser in project ant-ivy by apache.
the class MirroredURLResolverTest method setUp.
@Before
public void setUp() throws Exception {
settings = new IvySettings();
engine = new ResolveEngine(settings, new EventManager(), new SortEngine(settings));
data = new ResolveData(engine, new ResolveOptions());
TestHelper.createCache();
settings.setDefaultCache(TestHelper.cache);
settings.setVariable("test.mirroredurl.mirrorlist-solo.url", this.getClass().getResource("mirrorlist-solo.txt").toExternalForm());
settings.setVariable("test.mirroredurl.mirrorlist-failover.url", this.getClass().getResource("mirrorlist-failover.txt").toExternalForm());
settings.setVariable("test.mirroredurl.mirrorlist-fail.url", this.getClass().getResource("mirrorlist-fail.txt").toExternalForm());
new XmlSettingsParser(settings).parse(MirroredURLResolverTest.class.getResource("mirror-resolver-settings.xml"));
}
Aggregations