Package org.apache.ivy.core.resolve
Class ResolveOptions
- java.lang.Object
-
- org.apache.ivy.core.LogOptions
-
- org.apache.ivy.core.resolve.ResolveOptions
-
public class ResolveOptions extends LogOptions
A set of options used during resolve related tasks- See Also:
ResolveEngine
-
-
Field Summary
Fields Modifier and Type Field Description private Filter<Artifact>
artifactFilter
A filter to use to avoid downloading all artifacts.private boolean
checkIfChanged
True if the resolve should compare the new resolution against the previous reportprivate java.lang.String[]
confs
an array of configuration names to resolve - must not be null nor emptyprivate java.util.Date
date
the date for which the dependencies should be resolved.private boolean
download
True if the resolve should also download artifacts, false if only dependency resolution with module descriptors should be doneprivate boolean
outputReport
True if a report of the resolve process should be output at the end of the process, false otherwiseprivate boolean
refresh
private java.lang.String
resolveId
The id used to store the resolve information.private java.lang.String
resolveMode
The resolve mode to use.static java.lang.String
RESOLVEMODE_DEFAULT
Default resolve mode, using default revision constraints in dependency descriptors.static java.lang.String
RESOLVEMODE_DYNAMIC
Dynamic resolve mode, using dynamic revision constraints in dependency descriptors.static java.lang.String[]
RESOLVEMODES
Array of all available resolve modes.private java.lang.String
revision
the revision of the module for which dependencies should be resolved.private boolean
transitive
True if the dependencies should be resolved transitively, false if only direct dependencies should be resolvedprivate boolean
useCacheOnly
True if only the cache should be used for resolve, false if a real resolve with dependency resolvers should be doneprivate boolean
validate
True if validation of module descriptors should done, false otherwise-
Fields inherited from class org.apache.ivy.core.LogOptions
LOG_DEFAULT, LOG_DOWNLOAD_ONLY, LOG_QUIET
-
-
Constructor Summary
Constructors Constructor Description ResolveOptions()
ResolveOptions(ResolveOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Filter<Artifact>
getArtifactFilter()
boolean
getCheckIfChanged()
java.lang.String[]
getConfs()
java.lang.String[]
getConfs(ModuleDescriptor md)
Get the asked confs.java.util.Date
getDate()
static java.lang.String
getDefaultResolveId(ModuleDescriptor md)
static java.lang.String
getDefaultResolveId(ModuleId moduleId)
java.lang.String
getResolveId()
java.lang.String
getResolveMode()
Returns the resolve mode to use, ornull
to use settings configured resolve mode.java.lang.String
getRevision()
boolean
isDownload()
boolean
isOutputReport()
boolean
isRefresh()
boolean
isTransitive()
boolean
isUseCacheOnly()
boolean
isValidate()
ResolveOptions
setArtifactFilter(Filter<Artifact> artifactFilter)
ResolveOptions
setCheckIfChanged(boolean checkIfChanged)
ResolveOptions
setConfs(java.lang.String[] confs)
ResolveOptions
setDate(java.util.Date date)
ResolveOptions
setDownload(boolean download)
ResolveOptions
setOutputReport(boolean outputReport)
ResolveOptions
setRefresh(boolean refresh)
ResolveOptions
setResolveId(java.lang.String resolveId)
ResolveOptions
setResolveMode(java.lang.String resolveMode)
ResolveOptions
setRevision(java.lang.String revision)
ResolveOptions
setTransitive(boolean transitive)
ResolveOptions
setUseCacheOnly(boolean useCacheOnly)
ResolveOptions
setValidate(boolean validate)
boolean
useSpecialConfs()
Indicates if the configurations use a special configuration * , *(private) or *(public).-
Methods inherited from class org.apache.ivy.core.LogOptions
getLog, setLog
-
-
-
-
Field Detail
-
RESOLVEMODE_DEFAULT
public static final java.lang.String RESOLVEMODE_DEFAULT
Default resolve mode, using default revision constraints in dependency descriptors.- See Also:
- Constant Field Values
-
RESOLVEMODE_DYNAMIC
public static final java.lang.String RESOLVEMODE_DYNAMIC
Dynamic resolve mode, using dynamic revision constraints in dependency descriptors.- See Also:
- Constant Field Values
-
RESOLVEMODES
public static final java.lang.String[] RESOLVEMODES
Array of all available resolve modes.
-
confs
private java.lang.String[] confs
an array of configuration names to resolve - must not be null nor empty
-
revision
private java.lang.String revision
the revision of the module for which dependencies should be resolved. This revision is considered as the resolved revision of the module, unless it is null. If it is null, then a default revision is given if necessary (no revision found in ivy file)
-
date
private java.util.Date date
the date for which the dependencies should be resolved. All obtained artifacts should have a publication date which is before or equal to the given date. The date can be null, in which case all artifacts will be considered
-
validate
private boolean validate
True if validation of module descriptors should done, false otherwise
-
useCacheOnly
private boolean useCacheOnly
True if only the cache should be used for resolve, false if a real resolve with dependency resolvers should be done
-
transitive
private boolean transitive
True if the dependencies should be resolved transitively, false if only direct dependencies should be resolved
-
download
private boolean download
True if the resolve should also download artifacts, false if only dependency resolution with module descriptors should be done
-
outputReport
private boolean outputReport
True if a report of the resolve process should be output at the end of the process, false otherwise
-
artifactFilter
private Filter<Artifact> artifactFilter
A filter to use to avoid downloading all artifacts.
-
resolveMode
private java.lang.String resolveMode
The resolve mode to use. Should be one ofRESOLVEMODES
, ornull
to use settings configured resolve mode.
-
resolveId
private java.lang.String resolveId
The id used to store the resolve information.
-
refresh
private boolean refresh
-
checkIfChanged
private boolean checkIfChanged
True if the resolve should compare the new resolution against the previous report
-
-
Constructor Detail
-
ResolveOptions
public ResolveOptions()
-
ResolveOptions
public ResolveOptions(ResolveOptions options)
-
-
Method Detail
-
setArtifactFilter
public ResolveOptions setArtifactFilter(Filter<Artifact> artifactFilter)
-
getResolveMode
public java.lang.String getResolveMode()
Returns the resolve mode to use, ornull
to use settings configured resolve mode.- Returns:
- the resolve mode to use.
-
setResolveMode
public ResolveOptions setResolveMode(java.lang.String resolveMode)
-
useSpecialConfs
public boolean useSpecialConfs()
Indicates if the configurations use a special configuration * , *(private) or *(public). When special configurations are used, you must have the module descriptor in order to get the list of configurations.- Returns:
- boolean
- See Also:
getConfs()
,getConfs(ModuleDescriptor)
-
getConfs
public java.lang.String[] getConfs()
- Returns:
- String[]
- See Also:
getConfs(ModuleDescriptor)
-
getConfs
public java.lang.String[] getConfs(ModuleDescriptor md)
Get the asked confs. Special confs (like *) use the moduleDescriptor to find the values- Parameters:
md
- Used to get the exact values for special confs.- Returns:
- String[]
-
setConfs
public ResolveOptions setConfs(java.lang.String[] confs)
-
getDate
public java.util.Date getDate()
-
setDate
public ResolveOptions setDate(java.util.Date date)
-
isDownload
public boolean isDownload()
-
setDownload
public ResolveOptions setDownload(boolean download)
-
isOutputReport
public boolean isOutputReport()
-
setOutputReport
public ResolveOptions setOutputReport(boolean outputReport)
-
isTransitive
public boolean isTransitive()
-
setTransitive
public ResolveOptions setTransitive(boolean transitive)
-
isUseCacheOnly
public boolean isUseCacheOnly()
-
setUseCacheOnly
public ResolveOptions setUseCacheOnly(boolean useCacheOnly)
-
isValidate
public boolean isValidate()
-
setValidate
public ResolveOptions setValidate(boolean validate)
-
getRevision
public java.lang.String getRevision()
-
setRevision
public ResolveOptions setRevision(java.lang.String revision)
-
getResolveId
public java.lang.String getResolveId()
-
setResolveId
public ResolveOptions setResolveId(java.lang.String resolveId)
-
setRefresh
public ResolveOptions setRefresh(boolean refresh)
-
isRefresh
public boolean isRefresh()
-
setCheckIfChanged
public ResolveOptions setCheckIfChanged(boolean checkIfChanged)
-
getCheckIfChanged
public boolean getCheckIfChanged()
-
getDefaultResolveId
public static java.lang.String getDefaultResolveId(ModuleDescriptor md)
-
getDefaultResolveId
public static java.lang.String getDefaultResolveId(ModuleId moduleId)
-
-