Search in sources :

Example 36 with ResolveOptions

use of org.apache.ivy.core.resolve.ResolveOptions in project ant-ivy by apache.

the class PomModuleDescriptorParser method parseOtherPom.

private ResolvedModuleRevision parseOtherPom(ParserSettings ivySettings, ModuleRevisionId parentModRevID) throws ParseException {
    DependencyDescriptor dd = new DefaultDependencyDescriptor(parentModRevID, true);
    ResolveData data = IvyContext.getContext().getResolveData();
    if (data == null) {
        ResolveEngine engine = IvyContext.getContext().getIvy().getResolveEngine();
        ResolveOptions options = new ResolveOptions();
        options.setDownload(false);
        data = new ResolveData(engine, options);
    }
    DependencyResolver resolver = ivySettings.getResolver(parentModRevID);
    if (resolver == null) {
        // TODO: Throw exception here?
        return null;
    }
    dd = toSystem(dd, ivySettings.getContextNamespace());
    return resolver.getDependency(dd, data);
}
Also used : ResolveEngine(org.apache.ivy.core.resolve.ResolveEngine) ResolveData(org.apache.ivy.core.resolve.ResolveData) DependencyDescriptor(org.apache.ivy.core.module.descriptor.DependencyDescriptor) PomDependencyDescriptor(org.apache.ivy.plugins.parser.m2.PomModuleDescriptorBuilder.PomDependencyDescriptor) DefaultDependencyDescriptor(org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor) DefaultDependencyDescriptor(org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor) ResolveOptions(org.apache.ivy.core.resolve.ResolveOptions) DependencyResolver(org.apache.ivy.plugins.resolver.DependencyResolver)

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