Package org.apache.ivy
Class Ivy14
java.lang.Object
org.apache.ivy.Ivy14
This class can be used for easy migration from Ivy 1.4 API.
Indeed, Ivy 2.0 API has changed substantially, so it can take time to migrate existing code using Ivy 1.4 API to the new API. Using this class it's really easy: replace your instance of Ivy by an instance of this class.
For instance, where you were doing:
Ivy ivy = new Ivy();do instead:
Ivy14 ivy = new Ivy14();And that should be enough in most cases!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
void
void
void
deliver
(ModuleRevisionId mrid, String revision, File cache, String destIvyPattern, String status, Date pubdate, PublishingDependencyRevisionResolver pdrResolver, boolean validate) void
deliver
(ModuleRevisionId mrid, String revision, File cache, String destIvyPattern, String status, Date pubdate, PublishingDependencyRevisionResolver pdrResolver, boolean validate, boolean resolveDynamicRevisions) determineArtifactsToCopy
(ModuleId moduleId, String[] confs, File cache, String destFilePattern, String destIvyPattern) determineArtifactsToCopy
(ModuleId moduleId, String[] confs, File cache, String destFilePattern, String destIvyPattern, Filter<Artifact> artifactFilter) IvyNode[]
getDependencies
(URL ivySource, String[] confs, File cache, Date date, boolean validate) IvyNode[]
getDependencies
(ModuleDescriptor md, String[] confs, File cache, Date date, ResolveReport report, boolean validate) IvyNode[]
getDependencies
(ModuleDescriptor md, String[] confs, File cache, Date date, ResolveReport report, boolean validate, boolean transitive) getVariable
(String name) install
(ModuleRevisionId mrid, String from, String to, boolean transitive, boolean validate, boolean overwrite, Filter<Artifact> artifactFilter, File cache, String matcherName) void
void
boolean
String[]
listModules
(String org) ModuleId[]
listModules
(ModuleId criteria, PatternMatcher matcher) listModules
(ModuleRevisionId criteria, PatternMatcher matcher) String[]
listRevisionEntries
(ModuleEntry module) String[]
listRevisions
(String org, String module) String[]
listTokenValues
(String token, Map<String, Object> otherTokenValues) publish
(ModuleDescriptor md, DependencyResolver resolver, Collection<String> srcArtifactPattern, String srcIvyPattern, Artifact[] extraArtifacts, boolean overwrite, String conf) publish
(ModuleRevisionId mrid, String pubrevision, File cache, String srcArtifactPattern, String resolverName, String srcIvyPattern, boolean validate) publish
(ModuleRevisionId mrid, String pubrevision, File cache, String srcArtifactPattern, String resolverName, String srcIvyPattern, boolean validate, boolean overwrite) publish
(ModuleRevisionId mrid, String pubrevision, File cache, String srcArtifactPattern, String resolverName, String srcIvyPattern, String status, Date pubdate, Artifact[] extraArtifacts, boolean validate, boolean overwrite, boolean update, String conf) publish
(ModuleRevisionId mrid, String pubrevision, File cache, Collection<String> srcArtifactPattern, String resolverName, String srcIvyPattern, String status, Date pubdate, Artifact[] extraArtifacts, boolean validate, boolean overwrite, boolean update, String conf) resolve
(URL ivySource, String revision, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly) resolve
(URL ivySource, String revision, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, boolean transitive, boolean useOrigin, Filter<Artifact> artifactFilter) resolve
(URL ivySource, String revision, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, boolean transitive, Filter<Artifact> artifactFilter) resolve
(URL ivySource, String revision, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, Filter<Artifact> artifactFilter) resolve
(ModuleDescriptor md, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, boolean transitive, boolean useOrigin, boolean download, boolean outputReport, Filter<Artifact> artifactFilter) resolve
(ModuleDescriptor md, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, boolean transitive, boolean download, boolean outputReport, Filter<Artifact> artifactFilter) resolve
(ModuleDescriptor md, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, boolean transitive, Filter<Artifact> artifactFilter) resolve
(ModuleDescriptor md, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, Filter<Artifact> artifactFilter) resolve
(ModuleRevisionId mrid, String[] confs) resolve
(ModuleRevisionId mrid, String[] confs, boolean transitive, boolean changing, File cache, Date date, boolean validate, boolean useCacheOnly, boolean useOrigin, Filter<Artifact> artifactFilter) resolve
(ModuleRevisionId mrid, String[] confs, boolean transitive, boolean changing, File cache, Date date, boolean validate, boolean useCacheOnly, Filter<Artifact> artifactFilter) int
int
retrieve
(ModuleId moduleId, String[] confs, File cache, String destFilePattern, String destIvyPattern) int
retrieve
(ModuleId moduleId, String[] confs, File cache, String destFilePattern, String destIvyPattern, Filter<Artifact> artifactFilter) int
retrieve
(ModuleId moduleId, String[] confs, File cache, String destFilePattern, String destIvyPattern, Filter<Artifact> artifactFilter, boolean sync, boolean useOrigin) int
retrieve
(ModuleId moduleId, String[] confs, File cache, String destFilePattern, String destIvyPattern, Filter<Artifact> artifactFilter, boolean sync, boolean useOrigin, boolean makeSymlinks) void
setVariable
(String varName, String value) sortModuleDescriptors
(Collection<ModuleDescriptor> moduleDescriptors) sortNodes
(Collection<IvyNode> nodes) substitute
(String str)
-
Constructor Details
-
Ivy14
public Ivy14() -
Ivy14
-
-
Method Details
-
check
-
configure
- Throws:
ParseException
IOException
-
configure
- Throws:
ParseException
IOException
-
configureDefault
- Throws:
ParseException
IOException
-
deliver
public void deliver(ModuleRevisionId mrid, String revision, File cache, String destIvyPattern, String status, Date pubdate, PublishingDependencyRevisionResolver pdrResolver, boolean validate, boolean resolveDynamicRevisions) throws IOException, ParseException - Throws:
IOException
ParseException
-
deliver
public void deliver(ModuleRevisionId mrid, String revision, File cache, String destIvyPattern, String status, Date pubdate, PublishingDependencyRevisionResolver pdrResolver, boolean validate) throws IOException, ParseException - Throws:
IOException
ParseException
-
determineArtifactsToCopy
public Map<ArtifactDownloadReport,Set<String>> determineArtifactsToCopy(ModuleId moduleId, String[] confs, File cache, String destFilePattern, String destIvyPattern, Filter<Artifact> artifactFilter) throws ParseException, IOException - Throws:
ParseException
IOException
-
determineArtifactsToCopy
public Map<ArtifactDownloadReport,Set<String>> determineArtifactsToCopy(ModuleId moduleId, String[] confs, File cache, String destFilePattern, String destIvyPattern) throws ParseException, IOException - Throws:
ParseException
IOException
-
download
-
findModule
-
getDependencies
public IvyNode[] getDependencies(ModuleDescriptor md, String[] confs, File cache, Date date, ResolveReport report, boolean validate, boolean transitive) -
getDependencies
public IvyNode[] getDependencies(ModuleDescriptor md, String[] confs, File cache, Date date, ResolveReport report, boolean validate) -
getDependencies
public IvyNode[] getDependencies(URL ivySource, String[] confs, File cache, Date date, boolean validate) throws ParseException, IOException - Throws:
ParseException
IOException
-
getVariable
-
install
public ResolveReport install(ModuleRevisionId mrid, String from, String to, boolean transitive, boolean validate, boolean overwrite, Filter<Artifact> artifactFilter, File cache, String matcherName) throws IOException - Throws:
IOException
-
interrupt
public void interrupt() -
interrupt
-
isInterrupted
public boolean isInterrupted() -
listModuleEntries
-
listModules
-
listModules
-
listModules
-
listOrganisationEntries
-
listOrganisations
-
listRevisionEntries
-
listRevisions
-
listTokenValues
-
publish
public Collection<Artifact> publish(ModuleDescriptor md, DependencyResolver resolver, Collection<String> srcArtifactPattern, String srcIvyPattern, Artifact[] extraArtifacts, boolean overwrite, String conf) throws IOException - Throws:
IOException
-
publish
public Collection<Artifact> publish(ModuleRevisionId mrid, String pubrevision, File cache, Collection<String> srcArtifactPattern, String resolverName, String srcIvyPattern, String status, Date pubdate, Artifact[] extraArtifacts, boolean validate, boolean overwrite, boolean update, String conf) throws IOException - Throws:
IOException
-
publish
public Collection<Artifact> publish(ModuleRevisionId mrid, String pubrevision, File cache, String srcArtifactPattern, String resolverName, String srcIvyPattern, boolean validate, boolean overwrite) throws IOException - Throws:
IOException
-
publish
public Collection<Artifact> publish(ModuleRevisionId mrid, String pubrevision, File cache, String srcArtifactPattern, String resolverName, String srcIvyPattern, boolean validate) throws IOException - Throws:
IOException
-
publish
public Collection<Artifact> publish(ModuleRevisionId mrid, String pubrevision, File cache, String srcArtifactPattern, String resolverName, String srcIvyPattern, String status, Date pubdate, Artifact[] extraArtifacts, boolean validate, boolean overwrite, boolean update, String conf) throws IOException - Throws:
IOException
-
resolve
- Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(ModuleDescriptor md, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, boolean transitive, boolean useOrigin, boolean download, boolean outputReport, Filter<Artifact> artifactFilter) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(ModuleDescriptor md, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, boolean transitive, boolean download, boolean outputReport, Filter<Artifact> artifactFilter) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(ModuleDescriptor md, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, boolean transitive, Filter<Artifact> artifactFilter) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(ModuleDescriptor md, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, Filter<Artifact> artifactFilter) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(ModuleRevisionId mrid, String[] confs, boolean transitive, boolean changing, File cache, Date date, boolean validate, boolean useCacheOnly, boolean useOrigin, Filter<Artifact> artifactFilter) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(ModuleRevisionId mrid, String[] confs, boolean transitive, boolean changing, File cache, Date date, boolean validate, boolean useCacheOnly, Filter<Artifact> artifactFilter) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(ModuleRevisionId mrid, String[] confs) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(URL ivySource, String revision, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, boolean transitive, boolean useOrigin, Filter<Artifact> artifactFilter) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(URL ivySource, String revision, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, boolean transitive, Filter<Artifact> artifactFilter) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(URL ivySource, String revision, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly, Filter<Artifact> artifactFilter) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(URL ivySource, String revision, String[] confs, File cache, Date date, boolean validate, boolean useCacheOnly) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
public ResolveReport resolve(URL ivySource, String revision, String[] confs, File cache, Date date, boolean validate) throws ParseException, IOException - Throws:
ParseException
IOException
-
resolve
- Throws:
ParseException
IOException
-
retrieve
-
retrieve
-
retrieve
-
retrieve
-
retrieve
-
setVariable
-
sortModuleDescriptors
-
sortNodes
-
substitute
-