org.apache.ivy.core.resolve
Class ResolveEngine

java.lang.Object
  extended by org.apache.ivy.core.resolve.ResolveEngine

public class ResolveEngine
extends java.lang.Object


Constructor Summary
ResolveEngine(IvySettings settings, EventManager eventManager, SortEngine sortEngine)
           
 
Method Summary
 ArtifactDownloadReport download(Artifact artifact, CacheManager cacheManager, boolean useOrigin)
          Download an artifact to the cache.
 void downloadArtifacts(ResolveReport report, CacheManager cacheManager, boolean useOrigin, Filter artifactFilter)
           
 ResolvedModuleRevision findModule(ModuleRevisionId id, ResolveOptions options)
           
 IvyNode[] getDependencies(ModuleDescriptor md, ResolveOptions options, ResolveReport report)
          Resolve the dependencies of a module without downloading corresponding artifacts.
 IvyNode[] getDependencies(java.net.URL ivySource, ResolveOptions options)
          Resolve the dependencies of a module without downloading corresponding artifacts.
 DependencyResolver getDictatorResolver()
           
 EventManager getEventManager()
           
 IvySettings getSettings()
           
 SortEngine getSortEngine()
           
 void outputReport(ResolveReport report, java.io.File cache)
           
 ResolveReport resolve(java.io.File ivySource)
           
 ResolveReport resolve(ModuleDescriptor md, ResolveOptions options)
          Resolve dependencies of a module described by a module descriptor Note: the method signature is way too long, we should use a class to store the settings of the resolve.
 ResolveReport resolve(ModuleRevisionId mrid, ResolveOptions options, boolean changing)
          Resolves the module identified by the given mrid with its dependencies if transitive is set to true.
 ResolveReport resolve(java.net.URL ivySource)
           
 ResolveReport resolve(java.net.URL ivySource, ResolveOptions options)
          Resolve dependencies of a module described by an ivy file.
 void setDictatorResolver(DependencyResolver dictatorResolver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResolveEngine

public ResolveEngine(IvySettings settings,
                     EventManager eventManager,
                     SortEngine sortEngine)
Method Detail

getDictatorResolver

public DependencyResolver getDictatorResolver()

setDictatorResolver

public void setDictatorResolver(DependencyResolver dictatorResolver)

resolve

public ResolveReport resolve(java.io.File ivySource)
                      throws java.text.ParseException,
                             java.io.IOException
Throws:
java.text.ParseException
java.io.IOException

resolve

public ResolveReport resolve(java.net.URL ivySource)
                      throws java.text.ParseException,
                             java.io.IOException
Throws:
java.text.ParseException
java.io.IOException

resolve

public ResolveReport resolve(ModuleRevisionId mrid,
                             ResolveOptions options,
                             boolean changing)
                      throws java.text.ParseException,
                             java.io.IOException
Resolves the module identified by the given mrid with its dependencies if transitive is set to true.

Throws:
java.text.ParseException
java.io.IOException

resolve

public ResolveReport resolve(java.net.URL ivySource,
                             ResolveOptions options)
                      throws java.text.ParseException,
                             java.io.IOException
Resolve dependencies of a module described by an ivy file. Note: the method signature is way too long, we should use a class to store the settings of the resolve.

Throws:
java.text.ParseException
java.io.IOException

resolve

public ResolveReport resolve(ModuleDescriptor md,
                             ResolveOptions options)
                      throws java.text.ParseException,
                             java.io.IOException,
                             java.io.FileNotFoundException
Resolve dependencies of a module described by a module descriptor Note: the method signature is way too long, we should use a class to store the settings of the resolve.

Throws:
java.text.ParseException
java.io.IOException
java.io.FileNotFoundException

outputReport

public void outputReport(ResolveReport report,
                         java.io.File cache)

downloadArtifacts

public void downloadArtifacts(ResolveReport report,
                              CacheManager cacheManager,
                              boolean useOrigin,
                              Filter artifactFilter)

download

public ArtifactDownloadReport download(Artifact artifact,
                                       CacheManager cacheManager,
                                       boolean useOrigin)
Download an artifact to the cache. Not used internally, useful especially for IDE plugins needing to download artifact one by one (for source or javadoc artifact, for instance). Downloaded artifact file can be accessed using getArchiveFileInCache method. It is possible to track the progression of the download using classical ivy progress monitoring feature (see addTransferListener).

Parameters:
artifact - the artifact to download
cacheManager - the cacheManager to use.
Returns:
a report concerning the download

getDependencies

public IvyNode[] getDependencies(java.net.URL ivySource,
                                 ResolveOptions options)
                          throws java.text.ParseException,
                                 java.io.IOException
Resolve the dependencies of a module without downloading corresponding artifacts. The module to resolve is given by its ivy file URL. This method requires appropriate configuration of the ivy instance, especially resolvers.

Parameters:
ivySource - url of the ivy file to use for dependency resolving
confs - an array of configuration names to resolve - must not be null nor empty
cache - the cache to use - default cache is used if null
date - the date to which resolution must be done - may be null
Returns:
an array of the resolved dependencies
Throws:
java.text.ParseException - if a parsing problem occured in the ivy file
java.io.IOException - if an IO problem was raised during ivy file parsing

getDependencies

public IvyNode[] getDependencies(ModuleDescriptor md,
                                 ResolveOptions options,
                                 ResolveReport report)
Resolve the dependencies of a module without downloading corresponding artifacts. The module to resolve is given by its module descriptor.This method requires appropriate configuration of the ivy instance, especially resolvers.

Parameters:
md - the descriptor of the module for which we want to get dependencies - must not be null
options - the resolve options to use to resolve the dependencies
report - a resolve report to fill during resolution - may be null
Returns:
an array of the resolved Dependencies

findModule

public ResolvedModuleRevision findModule(ModuleRevisionId id,
                                         ResolveOptions options)

getEventManager

public EventManager getEventManager()

getSettings

public IvySettings getSettings()

getSortEngine

public SortEngine getSortEngine()