Package org.apache.ivy.ant
Class IvyCacheFileset
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.ivy.ant.IvyTask
org.apache.ivy.ant.IvyPostResolveTask
org.apache.ivy.ant.IvyCacheTask
org.apache.ivy.ant.IvyCacheFileset
- All Implemented Interfaces:
Cloneable
Creates an ant fileset consisting in all artifacts found during a resolve. Note that this task
is not compatible with the useOrigin mode.
-
Field Summary
FieldsFields inherited from class org.apache.ivy.ant.IvyTask
ANT_PROJECT_CONTEXT_KEY
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
The real logic of task execution after project has been set in the context.(package private) File
getBaseDir
(File file1, File file2) Returns the common base directory between the passedfile1
andfile2
.private LinkedList<File>
getParents
(File file) private String
Returns the path of the file relative to the given base directory.getSetid()
(package private) File
requireCommonBaseDir
(List<ArtifactDownloadReport> artifactDownloadReports) Returns a common base directory, determined from thelocal files
of the passedartifactDownloadReports
.void
void
setUseOrigin
(boolean useOrigin) Methods inherited from class org.apache.ivy.ant.IvyCacheTask
getArtifactReports
Methods inherited from class org.apache.ivy.ant.IvyPostResolveTask
createConflict, createDependency, createExclude, ensureResolved, getArtifactFilter, getBranch, getConf, getConfsToResolve, getConfsToResolve, getFile, getLog, getModule, getOrganisation, getResolvedModuleId, getResolvedMrid, getResolvedReport, getResolveId, getResolveMode, getRevision, getType, isChanging, isHaltonfailure, isInline, isKeep, isRefresh, isTransitive, isUseOrigin, prepareAndCheck, setBranch, setCache, setChanging, setConf, setFile, setHaltonfailure, setInline, setKeep, setLog, setModule, setOrganisation, setRefresh, setResolveId, setResolveMode, setRevision, setTransitive, setType, setupResolve
Methods inherited from class org.apache.ivy.ant.IvyTask
cacheAttributeNotSupported, doValidate, execute, finalizeTask, getIvyInstance, getProperty, getProperty, getProperty, getProperty, getPubDate, getResolvedConfigurations, getResolvedDescriptor, getResolvedDescriptor, getResolvedDescriptor, getResolvedDescriptor, getResolvedReport, getSettings, getSettingsRef, isValidate, mergeConfs, prepareTask, setResolved, setResolved, setSettingsRef, setValidate, splitConfs, toString
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
setid
-
-
Constructor Details
-
IvyCacheFileset
public IvyCacheFileset()
-
-
Method Details
-
getSetid
-
setSetid
-
setUseOrigin
public void setUseOrigin(boolean useOrigin) - Overrides:
setUseOrigin
in classIvyPostResolveTask
-
doExecute
public void doExecute() throws org.apache.tools.ant.BuildExceptionDescription copied from class:IvyTask
The real logic of task execution after project has been set in the context. MUST be implemented by subclasses -
requireCommonBaseDir
Returns a common base directory, determined from thelocal files
of the passedartifactDownloadReports
. If no common base directory can be determined, this method throws aBuildException
- Parameters:
artifactDownloadReports
- The artifact download reports for which the common base directory of the artifacts has to be determined- Returns:
- File
-
getPath
Returns the path of the file relative to the given base directory.- Parameters:
base
- the parent directory to which the file must be evaluated.file
- the file for which the path should be returned- Returns:
- the path of the file relative to the given base directory.
-
getBaseDir
Returns the common base directory between the passedfile1
andfile2
.The returned base directory will be a parent of both the
file1
andfile2
or it will benull
.- Parameters:
file1
- One of the files, for which the common base directory is being sought, may be null.file2
- The other file for which the common base directory should be returned, may be null.- Returns:
- the common base directory between a
file1
andfile2
. Returns null if no common base directory could be determined or if eitherfile1
orfile2
is null
-
getParents
- Returns:
- a list of files, starting with the root and ending with the file itself
-