ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Brodski <brodsky_bo...@yahoo.com.INVALID>
Subject OSGi: Ivy modifies MANIFEST.MF during unpacking. Result: "Invalid signature file digest for Manifest"
Date Tue, 15 Jul 2014 09:46:27 GMT
Hello,


playing with OSGi resolvers I found a very strange behavior: It looks like during unpacking
of some *.jar.pack.gz archives Ivy modifies MANIFEST.MF. This results is: "Invalid signature
file digest for Manifest" error raised by the VM.


Inspecting following bundles from update site: http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/
 
- org.eclipse.xtend.core-2.6.1.v201406120726.jar.pack.gz - Unmodified MANIFEST.MF : No
error
- org.eclipse.xtend.core-2.6.2.v201407030533.jar.pack.gz - Modified MANIFEST.MF : ERROR

Diff between original MANIFEST.MF and by Ivy modified version:
(Ivy rearranges lines. Sorting both original and Ivy-modified MANIFEST.MF-files produces identical
output)


@@ -1,4 +1,24 @@
 Manifest-Version: 1.0
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-SymbolicName: org.eclipse.xtend.core;singleton:=true
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0",org.ec
+ lipse.emf.ecore;bundle-version="2.9.0";visibility:="reexport",org.ecl
+ ipse.xtext.common.types;bundle-version="2.6.2";visibility:="reexport"
+ ,org.eclipse.xtext.xbase;bundle-version="2.6.2";visibility:="reexport
+ ",org.eclipse.xtext;bundle-version="2.6.2",org.eclipse.xtext.util;bun
+ dle-version="2.6.2",org.eclipse.emf.mwe2.launch;bundle-version="2.2.0
+ ";resolution:="optional";x-installation:="greedy",org.eclipse.emf.mwe
+ 2.lib;bundle-version="2.2.0";resolution:="optional";x-installation:="
+ greedy",org.eclipse.xtext.generator;bundle-version="2.6.2";resolution
+ :="optional";x-installation:="greedy",org.antlr.runtime;bundle-versio
+ n="[3.2.0,3.2.1)",org.eclipse.jdt.core;bundle-version="3.5.0";resolut
+ ion:="optional";x-installation:="greedy",org.eclipse.xtext.xbase.lib;
+ bundle-version="[2.6.0,3.0.0)",org.eclipse.xtend.lib;bundle-version="
+ 2.6.2",org.eclipse.xtext.smap;bundle-version="2.6.2",org.apache.ant;b
+ undle-version="1.7.1";resolution:="optional";x-installation:="greedy"
+ ,org.eclipse.xtext.xbase.junit;bundle-version="2.6.2";resolution:="op
+ tional"
 Export-Package: org.eclipse.xtend.core;x-internal:=true,org.eclipse.xt
  end.core.compiler;x-internal:=true,org.eclipse.xtend.core.compiler.ba
  tch,org.eclipse.xtend.core.conversion;x-internal:=true,org.eclipse.xt
@@ -20,2732 +40,2712 @@ Export-Package: org.eclipse.xtend.core;x-internal:=true,org.eclipse.xt
  ation;x-internal:=true,org.eclipse.xtend.core.xtend;x-internal:=true,
  org.eclipse.xtend.core.xtend.impl;x-internal:=true,org.eclipse.xtend.
  core.xtend.util;x-internal:=true
-Bundle-ActivationPolicy: lazy
+Bundle-Version: 2.6.2.v201407030533
+Ant-Version: Apache Ant 1.8.3
 Bundle-ClassPath: .
-Bundle-Localization: plugin
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %providerName
 Bundle-Name: %pluginName
 Created-By: 1.6.0_45-b06 (Sun Microsystems Inc.)
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0",org.ec
- lipse.emf.ecore;bundle-version="2.9.0";visibility:="reexport",org.ecl
- ipse.xtext.common.types;bundle-version="2.6.2";visibility:="reexport"
- ,org.eclipse.xtext.xbase;bundle-version="2.6.2";visibility:="reexport
- ",org.eclipse.xtext;bundle-version="2.6.2",org.eclipse.xtext.util;bun
- dle-version="2.6.2",org.eclipse.emf.mwe2.launch;bundle-version="2.2.0
- ";resolution:="optional";x-installation:="greedy",org.eclipse.emf.mwe
- 2.lib;bundle-version="2.2.0";resolution:="optional";x-installation:="
- greedy",org.eclipse.xtext.generator;bundle-version="2.6.2";resolution
- :="optional";x-installation:="greedy",org.antlr.runtime;bundle-versio
- n="[3.2.0,3.2.1)",org.eclipse.jdt.core;bundle-version="3.5.0";resolut
- ion:="optional";x-installation:="greedy",org.eclipse.xtext.xbase.lib;
- bundle-version="[2.6.0,3.0.0)",org.eclipse.xtend.lib;bundle-version="
- 2.6.2",org.eclipse.xtext.smap;bundle-version="2.6.2",org.apache.ant;b
- undle-version="1.7.1";resolution:="optional";x-installation:="greedy"
- ,org.eclipse.xtext.xbase.junit;bundle-version="2.6.2";resolution:="op
- tional"
-Ant-Version: Apache Ant 1.8.3
-Bundle-Vendor: %providerName
-Bundle-Version: 2.6.2.v201407030533
-Bundle-ManifestVersion: 2
 Import-Package: org.apache.log4j;version="1.2.15",org.eclipse.xtext.xb
  ase.lib
-Bundle-SymbolicName: org.eclipse.xtend.core;singleton:=true
+Bundle-ManifestVersion: 2
 
-Name: org/eclipse/xtend/core/macro/declaration/JvmExecutableDeclaratio
- nImpl$3.class
-SHA1-Digest: 86QcHNMNBD/THDgOv+293UTj1U4=
+Name: org/eclipse/xtend/core/xtend/impl/XtendPackageImpl.class
+SHA1-Digest: OGuJ6N9ZPJ0RHi2IN0XeGtZF3So=

------------------- cut ----------------------


Using modified jar file like this: java -cp ~/.ivy2/cache/bundle/org.eclipse.xtend.core/jar_unpackeds/org.eclipse.xtend.core-2.6.2.v201407030533.jar:..... org.jnario.compiler.CompilerMain
arg1 arg2 ...


produces


Class 'org.eclipse.xtend.core.compiler.batch.Main' not found: Invalid signature file digest
for Manifest main attributesjava.lang.SecurityException: Invalid signature file digest for
Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:240)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:193)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:307)
at java.util.jar.JarVerifier.update(JarVerifier.java:218)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:345)
at java.util.jar.JarFile.getInputStream(JarFile.java:412)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:775)
at sun.misc.Resource.cachedInputStream(Resource.java:77)
at sun.misc.Resource.getByteBuffer(Resource.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:436)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at de.finkonsens.pingo.tools.FileArgumentRunner.main(FileArgumentRunner.java:98)

BUILD FAILED

Using 2.6.1.v201406120726 version of the bundle works.
 

Is this a bug or a feature? How can I prevent Ivy from modifying files like this?

Thank you very much in advance!


Kind regards,
Boris Brodski 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message