Class JarResigner
- java.lang.Object
-
- org.eclipse.cbi.maven.plugins.jarsigner.JarResigner
-
- All Implemented Interfaces:
JarSigner
- Direct Known Subclasses:
JarResigner.DoNotResign,JarResigner.OverwriteSignature,JarResigner.Resign,JarResigner.ThrowException
public abstract class JarResigner extends java.lang.Object implements JarSigner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classJarResigner.DoNotResignprivate static classJarResigner.OverwriteSignatureprivate static classJarResigner.OverwriteSignatureWithSameDigestAlgprivate static classJarResigner.Resignprivate static classJarResigner.ResignWithSameDigestAlgstatic classJarResigner.Strategyprivate static classJarResigner.ThrowException-
Nested classes/interfaces inherited from interface org.eclipse.cbi.maven.plugins.jarsigner.JarSigner
JarSigner.Options
-
-
Field Summary
Fields Modifier and Type Field Description private JarSignerdelegateprivate static java.lang.StringDIGEST_ATTRIBUTE_SUFFIXprivate org.apache.maven.plugin.logging.Loglog
-
Constructor Summary
Constructors Constructor Description JarResigner(JarSigner delegate, org.apache.maven.plugin.logging.Log log)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static JarSignercreate(JarResigner.Strategy strategy, JarSigner delegate, org.apache.maven.plugin.logging.Log log)(package private) JarSignerdelegate()static JarSignerdoNotResign(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)(package private) static java.util.Set<MessageDigestAlgorithm>getAllUsedDigestAlgorithm(java.nio.file.Path jar)(package private) static MessageDigestAlgorithmgetDigestAlgorithmToReuse(java.nio.file.Path jar)(package private) static booleanhasManifestDigest(java.util.jar.Attributes entryAttributes)(package private) static booleanisAlreadySigned(java.nio.file.Path jar)private static booleanisBlockOrSF(java.lang.String entryName)(package private) org.apache.maven.plugin.logging.Loglog()static JarSigneroverwrite(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)static JarSigneroverwriteWithSameDigestAlgorithm(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)(package private) abstract intresign(java.nio.file.Path jar, JarSigner.Options options)static JarSignerresign(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)static JarSignerresignWithSameDigestAlgorithm(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)intsign(java.nio.file.Path jar, JarSigner.Options options)Sign the given Jar file.static JarSignerthrowException(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
-
-
Field Detail
-
DIGEST_ATTRIBUTE_SUFFIX
private static final java.lang.String DIGEST_ATTRIBUTE_SUFFIX
- See Also:
- Constant Field Values
-
delegate
private final JarSigner delegate
-
log
private final org.apache.maven.plugin.logging.Log log
-
-
Constructor Detail
-
JarResigner
JarResigner(JarSigner delegate, org.apache.maven.plugin.logging.Log log)
-
-
Method Detail
-
log
final org.apache.maven.plugin.logging.Log log()
-
create
public static JarSigner create(JarResigner.Strategy strategy, JarSigner delegate, org.apache.maven.plugin.logging.Log log)
-
delegate
JarSigner delegate()
-
sign
public int sign(java.nio.file.Path jar, JarSigner.Options options) throws java.io.IOExceptionDescription copied from interface:JarSignerSign the given Jar file.
-
resign
abstract int resign(java.nio.file.Path jar, JarSigner.Options options) throws java.io.IOException- Throws:
java.io.IOException
-
isAlreadySigned
static boolean isAlreadySigned(java.nio.file.Path jar) throws java.io.IOException- Throws:
java.io.IOException
-
hasManifestDigest
static boolean hasManifestDigest(java.util.jar.Attributes entryAttributes)
-
isBlockOrSF
private static boolean isBlockOrSF(java.lang.String entryName)
-
doNotResign
public static JarSigner doNotResign(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
throwException
public static JarSigner throwException(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
resignWithSameDigestAlgorithm
public static JarSigner resignWithSameDigestAlgorithm(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
resign
public static JarSigner resign(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
overwriteWithSameDigestAlgorithm
public static JarSigner overwriteWithSameDigestAlgorithm(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
overwrite
public static JarSigner overwrite(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
getAllUsedDigestAlgorithm
static java.util.Set<MessageDigestAlgorithm> getAllUsedDigestAlgorithm(java.nio.file.Path jar) throws java.io.IOException
- Throws:
java.io.IOException
-
getDigestAlgorithmToReuse
static MessageDigestAlgorithm getDigestAlgorithmToReuse(java.nio.file.Path jar) throws java.io.IOException
- Throws:
java.io.IOException
-
-