Search in sources :

Example 16 with ResolveEngine

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

ResolveEngine (org.apache.ivy.core.resolve.ResolveEngine)16 EventManager (org.apache.ivy.core.event.EventManager)15 ResolveData (org.apache.ivy.core.resolve.ResolveData)14 IvySettings (org.apache.ivy.core.settings.IvySettings)14 SortEngine (org.apache.ivy.core.sort.SortEngine)14 ResolveOptions (org.apache.ivy.core.resolve.ResolveOptions)13 Before (org.junit.Before)12 File (java.io.File)5 SearchEngine (org.apache.ivy.core.search.SearchEngine)2 TestFixture (org.apache.ivy.TestFixture)1 IvyAntSettings (org.apache.ivy.ant.IvyAntSettings)1 DeliverEngine (org.apache.ivy.core.deliver.DeliverEngine)1 InstallEngine (org.apache.ivy.core.install.InstallEngine)1 DefaultDependencyDescriptor (org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor)1 DependencyDescriptor (org.apache.ivy.core.module.descriptor.DependencyDescriptor)1 PublishEngine (org.apache.ivy.core.publish.PublishEngine)1 RepositoryManagementEngine (org.apache.ivy.core.repository.RepositoryManagementEngine)1 RetrieveEngine (org.apache.ivy.core.retrieve.RetrieveEngine)1 XmlSettingsParser (org.apache.ivy.core.settings.XmlSettingsParser)1 PomDependencyDescriptor (org.apache.ivy.plugins.parser.m2.PomModuleDescriptorBuilder.PomDependencyDescriptor)1