Search in sources :

Example 16 with EventManager

use of org.apache.ivy.core.event.EventManager 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);
}
Also used : ResolveEngine(org.apache.ivy.core.resolve.ResolveEngine) SortEngine(org.apache.ivy.core.sort.SortEngine) ResolveData(org.apache.ivy.core.resolve.ResolveData) EventManager(org.apache.ivy.core.event.EventManager) IvySettings(org.apache.ivy.core.settings.IvySettings) ResolveOptions(org.apache.ivy.core.resolve.ResolveOptions) Before(org.junit.Before)

Example 17 with EventManager

use of org.apache.ivy.core.event.EventManager 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);
}
Also used : ResolveEngine(org.apache.ivy.core.resolve.ResolveEngine) SortEngine(org.apache.ivy.core.sort.SortEngine) ResolveData(org.apache.ivy.core.resolve.ResolveData) EventManager(org.apache.ivy.core.event.EventManager) IvySettings(org.apache.ivy.core.settings.IvySettings) ResolveOptions(org.apache.ivy.core.resolve.ResolveOptions) Before(org.junit.Before)

Example 18 with EventManager

use of org.apache.ivy.core.event.EventManager 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"));
}
Also used : ResolveEngine(org.apache.ivy.core.resolve.ResolveEngine) SortEngine(org.apache.ivy.core.sort.SortEngine) ResolveData(org.apache.ivy.core.resolve.ResolveData) EventManager(org.apache.ivy.core.event.EventManager) IvySettings(org.apache.ivy.core.settings.IvySettings) ResolveOptions(org.apache.ivy.core.resolve.ResolveOptions) XmlSettingsParser(org.apache.ivy.core.settings.XmlSettingsParser) Before(org.junit.Before)

Example 19 with EventManager

use of org.apache.ivy.core.event.EventManager in project ant-ivy by apache.

the class PackagerResolverTest method setUp.

@Before
public void setUp() throws Exception {
    Message.setDefaultLogger(new DefaultMessageLogger(99));
    settings = new IvySettings();
    ResolveEngine 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);
    // Create work space with build and resource cache directories
    workdir = new File("build/test/PackagerResolverTest");
    builddir = new File(workdir, "build");
    cachedir = new File(workdir, "resources");
    cleanupTempDirs();
    if (!builddir.mkdirs() || !cachedir.mkdirs()) {
        throw new Exception("can't create directories under " + workdir);
    }
}
Also used : ResolveEngine(org.apache.ivy.core.resolve.ResolveEngine) SortEngine(org.apache.ivy.core.sort.SortEngine) ResolveData(org.apache.ivy.core.resolve.ResolveData) EventManager(org.apache.ivy.core.event.EventManager) DefaultMessageLogger(org.apache.ivy.util.DefaultMessageLogger) IvySettings(org.apache.ivy.core.settings.IvySettings) File(java.io.File) ResolveOptions(org.apache.ivy.core.resolve.ResolveOptions) Before(org.junit.Before)

Aggregations

EventManager (org.apache.ivy.core.event.EventManager)19 ResolveEngine (org.apache.ivy.core.resolve.ResolveEngine)15 IvySettings (org.apache.ivy.core.settings.IvySettings)15 SortEngine (org.apache.ivy.core.sort.SortEngine)14 ResolveData (org.apache.ivy.core.resolve.ResolveData)13 ResolveOptions (org.apache.ivy.core.resolve.ResolveOptions)12 Before (org.junit.Before)12 File (java.io.File)7 IOException (java.io.IOException)2 CacheResourceOptions (org.apache.ivy.core.cache.CacheResourceOptions)2 ArtifactDownloadReport (org.apache.ivy.core.report.ArtifactDownloadReport)2 SearchEngine (org.apache.ivy.core.search.SearchEngine)2 Resource (org.apache.ivy.plugins.repository.Resource)2 URLResource (org.apache.ivy.plugins.repository.url.URLResource)2 MalformedURLException (java.net.MalformedURLException)1 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 URL (java.net.URL)1 TestFixture (org.apache.ivy.TestFixture)1 IvyAntSettings (org.apache.ivy.ant.IvyAntSettings)1