Search in sources :

Example 6 with DefaultMessageLogger

use of org.apache.ivy.util.DefaultMessageLogger in project ant-ivy by apache.

the class IvyPublishTest method setUp.

@Before
public void setUp() {
    cleanTestDir();
    cleanRep();
    createCache();
    project = TestHelper.newProject();
    project.init();
    project.setProperty("ivy.settings.file", "test/repositories/ivysettings.xml");
    project.setProperty("build", "build/test/publish");
    publish = new IvyPublish();
    publish.setProject(project);
    System.setProperty("ivy.cache.dir", cache.getAbsolutePath());
    Message.setDefaultLogger(new DefaultMessageLogger(10));
}
Also used : DefaultMessageLogger(org.apache.ivy.util.DefaultMessageLogger) Before(org.junit.Before)

Example 7 with DefaultMessageLogger

use of org.apache.ivy.util.DefaultMessageLogger 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

DefaultMessageLogger (org.apache.ivy.util.DefaultMessageLogger)7 Before (org.junit.Before)6 File (java.io.File)5 IvySettings (org.apache.ivy.core.settings.IvySettings)4 Artifact (org.apache.ivy.core.module.descriptor.Artifact)2 Ivy (org.apache.ivy.Ivy)1 EventManager (org.apache.ivy.core.event.EventManager)1 Configuration (org.apache.ivy.core.module.descriptor.Configuration)1 DefaultArtifact (org.apache.ivy.core.module.descriptor.DefaultArtifact)1 DefaultDependencyDescriptor (org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor)1 DependencyDescriptor (org.apache.ivy.core.module.descriptor.DependencyDescriptor)1 ModuleDescriptor (org.apache.ivy.core.module.descriptor.ModuleDescriptor)1 ModuleRevisionId (org.apache.ivy.core.module.id.ModuleRevisionId)1 ResolveData (org.apache.ivy.core.resolve.ResolveData)1 ResolveEngine (org.apache.ivy.core.resolve.ResolveEngine)1 ResolveOptions (org.apache.ivy.core.resolve.ResolveOptions)1 SortEngine (org.apache.ivy.core.sort.SortEngine)1 Test (org.junit.Test)1