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.FilesetManifestConfigaddedDirs, addingNewFiles, archiveType, doubleFilePass, duplicate, entries, skipWriting, zipArchiveOutputStreamDEFAULT_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, setModuleVersionaddConfiguredIndexJars, addConfiguredManifest, cleanUp, createEmptyZip, finalizeZipOutputStream, findJarName, grabFilesAndDirs, hasVirtualFiles, initZipOutputStream, setFilesetmanifest, setIndex, setManifest, setManifestEncoding, setMinimalDefaultManifest, writeIndexLikeListaddResources, close, createInputStreamSupplier, execute, getArchiveType, getComment, getEncoding, isCompress, isFilesonly, isInUpdateMode, isRecompressAddedZips, isSupportingForced, normalizeLastModifiedDate, revert, setComment, setCompress, setEncoding, setFilesonly, setRecompressAddedZips, setUpdateMode, zipDir, zipFileaddArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchivedFileSet, addArchiveFinalizer, addDirectory, addDirectory, addDirectory, addDirectory, addFile, addFile, addFileSet, addResource, addResources, addSymlink, addSymlink, asArchiveEntry, asResourceCollection, checkForced, configureReproducible, contextualize, createArchive, getDefaultDirectoryMode, getDefaultFileMode, getDestFile, getDirectoryMode, getDuplicateBehavior, getFileMode, getFilenameComparator, getFiles, getIncludeEmptyDirs, getLastModifiedDate, getLogger, getOverrideDirectoryMode, getOverrideFileMode, getOverrideGid, getOverrideGroupName, getOverrideUid, getOverrideUserName, getRawDefaultFileMode, getResources, isForced, isIgnorePermissions, isUptodate, isUseJvmChmod, runArchiveFinalizers, setArchiveFinalizers, setDefaultDirectoryMode, setDefaultFileMode, setDestFile, setDirectoryMode, setDotFileDirectory, setDuplicateBehavior, setFileMode, setFilenameComparator, setForced, setIgnorePermissions, setIncludeEmptyDirs, setLastModifiedDate, setOverrideGid, setOverrideGroupName, setOverrideUid, setOverrideUserName, setUseJvmChmod, validateprotected 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
JarArchiverzipFile in class JarArchiveris - 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.IOExceptionArchiverExceptionprotected void postCreateArchive()
throws ArchiverException
AbstractArchiverpostCreateArchive in class AbstractArchiverArchiverExceptionCopyright © 2001–2022 Codehaus Plexus. All rights reserved.