Package org.apache.ivy.plugins.resolver
Class FileSystemResolver
java.lang.Object
org.apache.ivy.plugins.resolver.AbstractResolver
org.apache.ivy.plugins.resolver.BasicResolver
org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver
org.apache.ivy.plugins.resolver.RepositoryResolver
org.apache.ivy.plugins.resolver.FileSystemResolver
- All Implemented Interfaces:
Validatable
,DependencyResolver
,HasLatestStrategy
- Direct Known Subclasses:
CacheResolver
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The pattern leading to the directory where files are published before being moved at the end of a transactionMap between actual patterns and patterns used during the transaction to put files in a temporary directoryprivate Boolean
When set indicates if this resolver supports transactionprivate static final String
private static final Pattern
private String
Transactional mode.private File
Location where files should end up at the end of the transactionprivate File
Location where files are published during the transactionFields inherited from class org.apache.ivy.plugins.resolver.BasicResolver
DATE_FORMAT, DESCRIPTOR_OPTIONAL, DESCRIPTOR_REQUIRED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addArtifactPattern
(String pattern) void
void
void
addIvyPattern
(String pattern) example of pattern : ~/Workspace/[module]/[module].ivy.xmlvoid
beginPublishTransaction
(ModuleRevisionId module, boolean overwrite) private void
private void
void
protected Collection<String>
filterNames
(Collection<String> values) Filters names before returning them in the findXXXNames or findTokenValues method.protected String
getDestination
(String pattern, Artifact artifact, ModuleRevisionId mrid) private FileRepository
private void
initTransaction
(ModuleRevisionId module) boolean
isLocal()
private boolean
void
setLocal
(boolean local) void
setTransactional
(String transactional) boolean
private void
Methods inherited from class org.apache.ivy.plugins.resolver.RepositoryResolver
download, dumpSettings, exist, findResourceUsingPattern, findTokenValues, get, getRepository, getResource, isAlwaysCheckExactRevision, listResources, listTokenValues, publish, put, putChecksum, putSignature, setAlwaysCheckExactRevision, setName, setRepository, setSettings, setSigner
Methods inherited from class org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver
convertM2CriteriaForResourceSearch, convertM2IdForResourceSearch, convertM2OrganizationForResourceSearch, convertM2ResourceSearchIdToNormal, convertM2TokenValuesForResourceSearch, findArtifactNames, findArtifactRef, findIvyFileRef, findIvyNames, findNames, findResource, findResourceUsingPatterns, getArtifactPatterns, getIvyPatterns, getModuleDescriptorExtension, isM2compatible, listTokenValues, setArtifactPatterns, setIvyPatterns, setM2compatible
Methods inherited from class org.apache.ivy.plugins.resolver.BasicResolver
acceptLatest, checkModuleDescriptorRevision, clearArtifactAttempts, clearIvyAttempts, doFindArtifactRef, download, exists, findFirstArtifactRef, getAndCheck, getArtifactRef, getChecksumAlgorithms, getDefaultRMDParser, getDependency, getPublicationDate, getRMDParser, getWorkspaceName, isAllownomd, isCheckconsistency, isEnvDependent, isForce, listModules, listOrganisations, listRevisions, listTokenValues, locate, logArtifactAttempt, logAttempt, logIvyAttempt, parse, reportFailure, reportFailure, setAllownomd, setCheckconsistency, setChecksums, setDescriptor, setEnvDependent, setForce, setWorkspaceName, shouldReturnResolvedModule, toString
Methods inherited from class org.apache.ivy.plugins.resolver.AbstractResolver
checkInterrupted, checkLatest, doValidate, findModuleInCache, findModuleInCache, fromSystem, fromSystem, getCacheDownloadOptions, getCacheOptions, getChangingMatcherName, getChangingPattern, getDownloadOptions, getEventManager, getLatest, getLatestStrategy, getName, getNamespace, getParserSettings, getRepositoryCacheManager, getSettings, getSystemNode, getTimeoutConstraint, hidePassword, isAfter, isValidate, saveModuleRevisionIfNeeded, setCache, setChangingMatcher, setChangingPattern, setCheckmodified, setEventManager, setLatest, setLatestStrategy, setNamespace, setRepositoryCacheManager, setTimeoutConstraint, setValidate, toSystem, toSystem, toSystem, toSystem, toSystem, toSystem, validate
-
Field Details
-
TRANSACTION_DESTINATION_SUFFIX
- See Also:
-
TRANSACTION_PATTERN
-
transactional
Transactional mode. auto: use transaction if possible, only log verbose message if not true: always use transaction, fail if not supported false: never use transactions -
supportTransaction
When set indicates if this resolver supports transaction -
baseTransactionPattern
The pattern leading to the directory where files are published before being moved at the end of a transaction -
fullTransactionPatterns
Map between actual patterns and patterns used during the transaction to put files in a temporary directory -
transactionTempDir
Location where files are published during the transaction -
transactionDestDir
Location where files should end up at the end of the transaction
-
-
Constructor Details
-
FileSystemResolver
public FileSystemResolver()
-
-
Method Details
-
getTypeName
- Overrides:
getTypeName
in classRepositoryResolver
-
isLocal
public boolean isLocal() -
setLocal
public void setLocal(boolean local) -
getFileRepository
-
getDestination
- Overrides:
getDestination
in classRepositoryResolver
-
isTransactionStarted
private boolean isTransactionStarted() -
abortPublishTransaction
- Specified by:
abortPublishTransaction
in interfaceDependencyResolver
- Overrides:
abortPublishTransaction
in classAbstractResolver
- Throws:
IOException
-
commitPublishTransaction
- Specified by:
commitPublishTransaction
in interfaceDependencyResolver
- Overrides:
commitPublishTransaction
in classAbstractResolver
- Throws:
IOException
-
beginPublishTransaction
- Specified by:
beginPublishTransaction
in interfaceDependencyResolver
- Overrides:
beginPublishTransaction
in classAbstractResolver
- Throws:
IOException
-
filterNames
Description copied from class:BasicResolver
Filters names before returning them in the findXXXNames or findTokenValues method.Remember to call the super implementation when overriding this method.
- Overrides:
filterNames
in classBasicResolver
- Parameters:
values
- the list to filter.- Returns:
- the filtered list
-
supportTransaction
public boolean supportTransaction() -
closeTransaction
private void closeTransaction() -
checkSupportTransaction
private void checkSupportTransaction() -
unsupportedTransaction
-
initTransaction
-
getTransactional
-
setTransactional
-
addConfiguredIvy
- Overrides:
addConfiguredIvy
in classAbstractPatternsBasedResolver
-
addIvyPattern
Description copied from class:AbstractPatternsBasedResolver
example of pattern : ~/Workspace/[module]/[module].ivy.xml- Overrides:
addIvyPattern
in classAbstractPatternsBasedResolver
- Parameters:
pattern
- String
-
addConfiguredArtifact
- Overrides:
addConfiguredArtifact
in classAbstractPatternsBasedResolver
-
addArtifactPattern
- Overrides:
addArtifactPattern
in classAbstractPatternsBasedResolver
-