I have all jars in my lib folder but i dont know which jars are signed it contains many selenium jars.my build.xml is:
        <jar basedir="bin" destfile="build/xpath.jar">
        <zipgroupfileset dir="lib" includes="*.jar">
            <exclude name="**/*.RSA, **/*.SF, **/*.DSA"/>
            </zipgroupfileset>
        </jar>
but getting the following exception when i use it into another project:
Exception in thread "main" java.lang.SecurityException: no manifiest section for signature file entry org/bouncycastle/asn1/ocsp/ResponderID.class at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:392) at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:249)
Additional signing metadata is included in META-INF/MANIFEST.MF. I expect the MANIFEST.MF from one of the signed JARs is being included in your aggregate xpath.jar. Try also excluding MANIFEST.MF files.
Something like this might work for you.
<jar destfile="build/xpath.jar" basedir="bin">
    <restrict>
        <not>
            <or>
                <name name="**/*.RSA"/>
                <name name="**/*.SF"/>
                <name name="**/*.DSA"/>
            </or>
        </not>
        <archives>
            <zips>
                <fileset dir="lib" includes="**/*.jar"/>
            </zips>
        </archives>
    </restrict>
</jar>
I adapted this from the example at http://ant.apache.org/manual/Tasks/jar.html under the "Merging archives" section.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With