Search in sources :

Example 1 with IvyRepResolver

use of org.apache.ivy.plugins.resolver.IvyRepResolver in project ant-ivy by apache.

the class IvyConfigureTest method testDefault14.

@Test
public void testDefault14() {
    // by default settings look in the current directory for an ivysettings.xml file...
    // but Ivy itself has one, and we don't want to use it
    configure.getProject().setProperty("ivy.settings.file", "no/settings/will/use/default.xml");
    configure.getProject().setProperty("ivy.14.compatible", "true");
    configure.execute();
    IvySettings settings = getIvyInstance().getSettings();
    assertNotNull(settings.getDefaultResolver());
    DependencyResolver publicResolver = settings.getResolver("public");
    assertTrue(publicResolver instanceof IvyRepResolver);
}
Also used : IvySettings(org.apache.ivy.core.settings.IvySettings) DependencyResolver(org.apache.ivy.plugins.resolver.DependencyResolver) IvyRepResolver(org.apache.ivy.plugins.resolver.IvyRepResolver) Test(org.junit.Test)

Example 2 with IvyRepResolver

use of org.apache.ivy.plugins.resolver.IvyRepResolver in project ant-ivy by apache.

the class OnlineXmlSettingsParserTest method testIncludeHttpUrl.

// remote.test
@Test
public void testIncludeHttpUrl() throws Exception {
    configureURLHandler();
    IvySettings settings = new IvySettings();
    XmlSettingsParser parser = new XmlSettingsParser(settings);
    parser.parse(new URL("http://ant.apache.org/ivy/test/ivysettings-include-http-url.xml"));
    DependencyResolver resolver = settings.getResolver("ivyrep");
    assertNotNull(resolver);
    assertTrue(resolver instanceof IvyRepResolver);
}
Also used : URL(java.net.URL) DependencyResolver(org.apache.ivy.plugins.resolver.DependencyResolver) IvyRepResolver(org.apache.ivy.plugins.resolver.IvyRepResolver) Test(org.junit.Test)

Example 3 with IvyRepResolver

use of org.apache.ivy.plugins.resolver.IvyRepResolver in project ant-ivy by apache.

the class ConfigureTest method testDefault14.

@Test
public void testDefault14() throws ParseException, IOException {
    Ivy ivy = new Ivy();
    ivy.configureDefault14();
    IvySettings settings = ivy.getSettings();
    assertNotNull(settings.getDefaultResolver());
    DependencyResolver publicResolver = settings.getResolver("public");
    assertTrue(publicResolver instanceof IvyRepResolver);
}
Also used : Ivy(org.apache.ivy.Ivy) DependencyResolver(org.apache.ivy.plugins.resolver.DependencyResolver) IvyRepResolver(org.apache.ivy.plugins.resolver.IvyRepResolver) Test(org.junit.Test)

Example 4 with IvyRepResolver

use of org.apache.ivy.plugins.resolver.IvyRepResolver in project ant-ivy by apache.

the class OnlineXmlSettingsParserTest method testIncludeHttpRelativeUrl.

@Test
public void testIncludeHttpRelativeUrl() throws Exception {
    // Use a settings file via http that use an include with relative url
    configureURLHandler();
    IvySettings settings = new IvySettings();
    XmlSettingsParser parser = new XmlSettingsParser(settings);
    parser.parse(new URL("http://ant.apache.org/ivy/test/ivysettings-include-http-relative-url.xml"));
    DependencyResolver resolver = settings.getResolver("ivyrep");
    assertNotNull(resolver);
    assertTrue(resolver instanceof IvyRepResolver);
}
Also used : URL(java.net.URL) DependencyResolver(org.apache.ivy.plugins.resolver.DependencyResolver) IvyRepResolver(org.apache.ivy.plugins.resolver.IvyRepResolver) Test(org.junit.Test)

Example 5 with IvyRepResolver

use of org.apache.ivy.plugins.resolver.IvyRepResolver in project ant-ivy by apache.

the class OnlineXmlSettingsParserTest method testIncludeHttpRelativeFile.

@Test
public void testIncludeHttpRelativeFile() throws Exception {
    // Use a settings file via http that use an include with relative file
    configureURLHandler();
    IvySettings settings = new IvySettings();
    XmlSettingsParser parser = new XmlSettingsParser(settings);
    parser.parse(new URL("http://ant.apache.org/ivy/test/ivysettings-include-http-relative-file.xml"));
    DependencyResolver resolver = settings.getResolver("ivyrep");
    assertNotNull(resolver);
    assertTrue(resolver instanceof IvyRepResolver);
}
Also used : URL(java.net.URL) DependencyResolver(org.apache.ivy.plugins.resolver.DependencyResolver) IvyRepResolver(org.apache.ivy.plugins.resolver.IvyRepResolver) Test(org.junit.Test)

Aggregations

DependencyResolver (org.apache.ivy.plugins.resolver.DependencyResolver)5 IvyRepResolver (org.apache.ivy.plugins.resolver.IvyRepResolver)5 Test (org.junit.Test)5 URL (java.net.URL)3 Ivy (org.apache.ivy.Ivy)1 IvySettings (org.apache.ivy.core.settings.IvySettings)1