Search in sources :

Example 31 with ResolveOptions

use of org.apache.ivy.core.resolve.ResolveOptions 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);
}
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) File(java.io.File) ResolveOptions(org.apache.ivy.core.resolve.ResolveOptions) Before(org.junit.Before)

Example 32 with ResolveOptions

use of org.apache.ivy.core.resolve.ResolveOptions 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 33 with ResolveOptions

use of org.apache.ivy.core.resolve.ResolveOptions 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 34 with ResolveOptions

use of org.apache.ivy.core.resolve.ResolveOptions 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 35 with ResolveOptions

use of org.apache.ivy.core.resolve.ResolveOptions 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

ResolveOptions (org.apache.ivy.core.resolve.ResolveOptions)36 File (java.io.File)23 IvySettings (org.apache.ivy.core.settings.IvySettings)21 ResolveData (org.apache.ivy.core.resolve.ResolveData)19 Before (org.junit.Before)16 ResolveReport (org.apache.ivy.core.report.ResolveReport)13 ResolveEngine (org.apache.ivy.core.resolve.ResolveEngine)13 EventManager (org.apache.ivy.core.event.EventManager)12 SortEngine (org.apache.ivy.core.sort.SortEngine)12 ModuleDescriptor (org.apache.ivy.core.module.descriptor.ModuleDescriptor)10 IOException (java.io.IOException)7 ParseException (java.text.ParseException)6 Ivy (org.apache.ivy.Ivy)6 DefaultModuleDescriptor (org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor)6 ModuleRevisionId (org.apache.ivy.core.module.id.ModuleRevisionId)6 URL (java.net.URL)5 HashSet (java.util.HashSet)5 RepositoryCacheManager (org.apache.ivy.core.cache.RepositoryCacheManager)5 BuildException (org.apache.tools.ant.BuildException)5 DefaultDependencyDescriptor (org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor)3