public class JarToolModularJarArchiver extends ModularJarArchiver
ModularJarArchiver
implementation that uses
the jar
tool provided by
java.util.spi.ToolProvider
to create
modular JAR files.
The basic JAR archive is created by JarArchiver
and the jar
tool is used to upgrade it to modular JAR.
If the JAR file does not contain module descriptor
or the JDK does not provide the jar
tool
(for example JDK prior to Java 9), then the
archive created by JarArchiver
is left unchanged.
JarArchiver.FilesetManifestConfig
addedDirs, addingNewFiles, archiveType, doubleFilePass, duplicate, entries, skipWriting, zipArchiveOutputStream
DEFAULT_DIR_MODE, DEFAULT_FILE_MODE, DEFAULT_SYMLILNK_MODE, DUPLICATES_ADD, DUPLICATES_FAIL, DUPLICATES_PRESERVE, DUPLICATES_SKIP, DUPLICATES_VALID_BEHAVIORS, ROLE
Constructor and Description |
---|
JarToolModularJarArchiver() |
Modifier and Type | Method and Description |
---|---|
protected void |
postCreateArchive()
This method is called after the archive creation
completes successfully (no exceptions are thrown).
|
protected void |
zipFile(org.apache.commons.compress.parallel.InputStreamSupplier is,
ConcurrentJarCreator zOut,
String vPath,
long lastModified,
File fromArchive,
int mode,
String symlinkDestination,
boolean addInParallel)
Overridden from Zip class to deal with manifests and index lists.
|
createManifest, getManifestMainClass, getModuleMainClass, getModuleVersion, reset, setModuleMainClass, setModuleVersion
addConfiguredIndexJars, addConfiguredManifest, cleanUp, createEmptyZip, finalizeZipOutputStream, findJarName, grabFilesAndDirs, hasVirtualFiles, initZipOutputStream, setFilesetmanifest, setIndex, setManifest, setManifestEncoding, writeIndexLikeList
addResources, close, createInputStreamSupplier, execute, getArchiveType, getComment, getEncoding, isCompress, isFilesonly, isInUpdateMode, isRecompressAddedZips, isSupportingForced, revert, setComment, setCompress, setEncoding, setFilesonly, setRecompressAddedZips, setUpdateMode, zipDir, zipFile
addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchiveFinalizer, addDirectory, addDirectory, addDirectory, addDirectory, addFile, addFile, addFileSet, addResource, addResources, addSymlink, addSymlink, asArchiveEntry, asResourceCollection, checkForced, contextualize, createArchive, getDefaultDirectoryMode, getDefaultFileMode, getDestFile, getDirectoryMode, getDuplicateBehavior, getFileMode, getFiles, getIncludeEmptyDirs, getLogger, getOverrideDirectoryMode, getOverrideFileMode, getRawDefaultFileMode, getResources, isForced, isIgnorePermissions, isUptodate, isUseJvmChmod, runArchiveFinalizers, setArchiveFinalizers, setDefaultDirectoryMode, setDefaultFileMode, setDestFile, setDirectoryMode, setDotFileDirectory, setDuplicateBehavior, setFileMode, setForced, setIgnorePermissions, setIncludeEmptyDirs, setUseJvmChmod, validate
protected void zipFile(org.apache.commons.compress.parallel.InputStreamSupplier is, ConcurrentJarCreator zOut, String vPath, long lastModified, File fromArchive, int mode, String symlinkDestination, boolean addInParallel) throws IOException, ArchiverException
JarArchiver
zipFile
in class JarArchiver
is
- the stream to read data for the entry from.zOut
- the stream to write to.vPath
- the name this entry shall have in the archive.lastModified
- last modification time for the entry.fromArchive
- the original archive we are copying thisaddInParallel
- Indicates if the entry should be add in parallel.
If set to false
it is added synchronously.
If the entry is symbolic link this parameter is ignored.IOException
ArchiverException
protected void postCreateArchive() throws ArchiverException
AbstractArchiver
postCreateArchive
in class AbstractArchiver
ArchiverException
Copyright © 2001–2018 Codehaus Plexus. All rights reserved.