Class PackagerCacheEntry
- java.lang.Object
-
- org.apache.ivy.plugins.resolver.packager.PackagerCacheEntry
-
public class PackagerCacheEntry extends java.lang.ObjectRepresents one entry in the cache of aPackagerResolver.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanbuiltprivate java.io.Filedirprivate ModuleRevisionIdmrprivate booleanpreserveprivate booleanquietprivate java.io.FileresourceCacheprivate java.lang.StringresourceURLprivate booleanrestrictedprivate booleanvalidateprivate booleanverbose
-
Constructor Summary
Constructors Constructor Description PackagerCacheEntry(ModuleRevisionId mr, java.io.File rootDir, java.io.File resourceCache, java.lang.String resourceURL, boolean validate, boolean preserve, boolean restricted, boolean verbose, boolean quiet)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuild(Resource packagerResource, java.util.Map<java.lang.String,java.lang.String> properties)Attempt to build this entry.booleancleanup()protected voidfinalize()ResolvedResourcegetBuiltArtifact(Artifact artifact)Get a built artifact.private java.lang.StringgetResourceURL()private static java.io.FilegetSubdir(java.io.File rootDir, ModuleRevisionId mr)booleanisBuilt()Has this entry been successfully built?protected voidsaveFile(java.lang.String name)protected voidsaveFile(java.lang.String name, java.io.InputStream input)
-
-
-
Field Detail
-
mr
private final ModuleRevisionId mr
-
dir
private final java.io.File dir
-
resourceCache
private final java.io.File resourceCache
-
resourceURL
private final java.lang.String resourceURL
-
validate
private final boolean validate
-
preserve
private final boolean preserve
-
restricted
private final boolean restricted
-
verbose
private final boolean verbose
-
quiet
private final boolean quiet
-
built
private boolean built
-
-
Constructor Detail
-
PackagerCacheEntry
public PackagerCacheEntry(ModuleRevisionId mr, java.io.File rootDir, java.io.File resourceCache, java.lang.String resourceURL, boolean validate, boolean preserve, boolean restricted, boolean verbose, boolean quiet)
-
-
Method Detail
-
build
public void build(Resource packagerResource, java.util.Map<java.lang.String,java.lang.String> properties) throws java.io.IOException
Attempt to build this entry.- Parameters:
packagerResource- packager metadata resourceproperties- a map of properties to pass to the child Ant build responsible for dependency packaging- Throws:
java.io.IOException- if this entry has already been built
-
isBuilt
public boolean isBuilt()
Has this entry been successfully built?- Returns:
- boolean
-
getBuiltArtifact
public ResolvedResource getBuiltArtifact(Artifact artifact)
Get a built artifact.- Parameters:
artifact- ditto- Returns:
- ResolvedResource
- Throws:
java.lang.IllegalStateException- if this entry's built has not (yet) completed successfully
-
cleanup
public boolean cleanup()
-
saveFile
protected void saveFile(java.lang.String name, java.io.InputStream input) throws java.io.IOException- Throws:
java.io.IOException
-
saveFile
protected void saveFile(java.lang.String name) throws java.io.IOException- Throws:
java.io.IOException
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
getResourceURL
private java.lang.String getResourceURL()
-
getSubdir
private static java.io.File getSubdir(java.io.File rootDir, ModuleRevisionId mr)
-
-