Class JarResigner.OverwriteSignature
- java.lang.Object
-
- org.eclipse.cbi.maven.plugins.jarsigner.JarResigner
-
- org.eclipse.cbi.maven.plugins.jarsigner.JarResigner.OverwriteSignature
-
- All Implemented Interfaces:
JarSigner
- Direct Known Subclasses:
JarResigner.OverwriteSignatureWithSameDigestAlg
- Enclosing class:
- JarResigner
private static class JarResigner.OverwriteSignature extends JarResigner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.cbi.maven.plugins.jarsigner.JarResigner
JarResigner.Strategy
-
Nested classes/interfaces inherited from interface org.eclipse.cbi.maven.plugins.jarsigner.JarSigner
JarSigner.Options
-
-
Constructor Summary
Constructors Constructor Description OverwriteSignature(JarSigner delegate, org.apache.maven.plugin.logging.Log log)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
pruneEmptyEntries(java.util.jar.Manifest manifest, java.util.List<java.lang.String> keysOfRemovedDigests)
private static java.util.jar.Manifest
readManifest(java.nio.file.Path manifestPath)
private java.util.List<java.lang.String>
removeDigestAttributes(java.util.jar.Manifest manifest)
private boolean
removeManifestDigestsIfAny(java.nio.file.Path manifestPath)
private boolean
removeSignatureFilesIfAny(java.nio.file.Path metaInf)
protected int
resign(java.nio.file.Path jar, JarSigner.Options options)
private static void
writeManifest(java.util.jar.Manifest manifest, java.nio.file.Path path)
-
Methods inherited from class org.eclipse.cbi.maven.plugins.jarsigner.JarResigner
create, delegate, doNotResign, getAllUsedDigestAlgorithm, getDigestAlgorithmToReuse, hasManifestDigest, isAlreadySigned, log, overwrite, overwriteWithSameDigestAlgorithm, resign, resignWithSameDigestAlgorithm, sign, throwException
-
-
-
-
Constructor Detail
-
OverwriteSignature
OverwriteSignature(JarSigner delegate, org.apache.maven.plugin.logging.Log log)
-
-
Method Detail
-
resign
protected int resign(java.nio.file.Path jar, JarSigner.Options options) throws java.io.IOException
- Specified by:
resign
in classJarResigner
- Throws:
java.io.IOException
-
removeSignatureFilesIfAny
private boolean removeSignatureFilesIfAny(java.nio.file.Path metaInf) throws java.io.IOException
- Throws:
java.io.IOException
-
removeManifestDigestsIfAny
private boolean removeManifestDigestsIfAny(java.nio.file.Path manifestPath) throws java.io.IOException
- Throws:
java.io.IOException
-
removeDigestAttributes
private java.util.List<java.lang.String> removeDigestAttributes(java.util.jar.Manifest manifest)
-
pruneEmptyEntries
private void pruneEmptyEntries(java.util.jar.Manifest manifest, java.util.List<java.lang.String> keysOfRemovedDigests)
-
writeManifest
private static void writeManifest(java.util.jar.Manifest manifest, java.nio.file.Path path) throws java.io.IOException
- Throws:
java.io.IOException
-
readManifest
private static java.util.jar.Manifest readManifest(java.nio.file.Path manifestPath) throws java.io.IOException
- Throws:
java.io.IOException
-
-