Class SignedJars


  • public class SignedJars
    extends java.lang.Object
    Mechanism for stripping signatures from jars.

    If a given package contains classes from multiple jars, all of those jars must have the same signature. This is especially a problem with nested jars - under real OSGi, nested jars are loaded from within the parent jar. But under Solstice and its NestedJars functionality, you sometimes have an unsigned nested jar contributing classes to the same package as its signed parent. The solution is to simply strip the signature off of all jars involved, since signing isn't very helpful anyway.

    If you encounter the unusual situation where a jar needs to have its signature stripped due to its nested jars, feel free to submit a PR to update the needsStrip variable.

    You can also check out the main below to debug signing issues in a given package.

    • Constructor Summary

      Constructors 
      Constructor Description
      SignedJars()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      static void stripIf​(java.util.ArrayList<java.io.File> file, java.util.function.Predicate<java.lang.String> fileNamesToStrip)  
      static void stripIfNecessary​(java.util.ArrayList<java.io.File> file)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SignedJars

        public SignedJars()
    • Method Detail

      • stripIfNecessary

        public static void stripIfNecessary​(java.util.ArrayList<java.io.File> file)
      • stripIf

        public static void stripIf​(java.util.ArrayList<java.io.File> file,
                                   java.util.function.Predicate<java.lang.String> fileNamesToStrip)
      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        Throws:
        java.io.IOException