Class JarResigner

    • Field Detail

      • DIGEST_ATTRIBUTE_SUFFIX

        private static final java.lang.String DIGEST_ATTRIBUTE_SUFFIX
        See Also:
        Constant Field Values
      • 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()
      • sign

        public int sign​(java.nio.file.Path jar,
                        JarSigner.Options options)
                 throws java.io.IOException
        Description copied from interface: JarSigner
        Sign the given Jar file.
        Specified by:
        sign in interface JarSigner
        Parameters:
        jar - the file to sign.
        Returns:
        the number of Jar that has been signed.
        Throws:
        java.io.IOException
      • 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