public class Packages extends ArrayList<Package>
This class works by scanning the entire classpath for packages defined in the
JVM resources manifests, and parsing them. See Package
for more
information.
Manifest
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
MANIFEST |
modCount
Constructor and Description |
---|
Packages(PackagingContext packagingContext)
Initializes all packages in the container's classpath.
|
Modifier and Type | Method and Description |
---|---|
Package |
getPackage(File file)
Finds a package based on its package file (a Jar).
|
Package |
getPackageForArtifact(File file)
Finds the package that contains the artifact.
|
void |
install(ArtifactManager managedArtifacts,
String filter,
boolean overwrite,
boolean verify)
Unpacks all artifacts and runs package installers.
|
void |
uninstall()
Runs all package uninstallers.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public static final String MANIFEST
public Packages(PackagingContext packagingContext) throws SincerityException
packagingContext
- The packaging contextSincerityException
- In case of an errorpublic Package getPackage(File file)
file
- The package filepublic Package getPackageForArtifact(File file)
file
- The artifact filepublic void install(ArtifactManager managedArtifacts, String filter, boolean overwrite, boolean verify) throws SincerityException
managedArtifacts
- The managed artifactsfilter
- Filter artifacts (currently unused)overwrite
- True to force overwriting of modified artifactsverify
- Whether to verify the unpackingSincerityException
- In case of an errorPackage.unpack(String, ArtifactManager, boolean, boolean)
public void uninstall() throws SincerityException
Does not prune previously installed artifacts.
SincerityException
- In case of an errorCopyright © 2011-2016 Three Crickets LLC.