Gradle build missing Implementation-Version property
As mentioned, Gradle build is missing the Implementation-Version
property. This prevents asm library version lookup with the getImplementationVersion()
method. E.g:
System.out.println(Opcodes.class.getPackage().getImplementationVersion());
The problem is that some libraries were using this approach to determine asm library version (see this Jetty issue).
Affected are all version above 6.0
(6.1
, 6.1.1
, 6.2
, 6.2.1
). It seems like the property went missing when the project switched from Ant build to Gradle with transition from 6.0
to 6.1
.
Comparing the MANIFEST.MF
file from Maven Central versions of asm library:
This is the content of MANIFEST.MF
for asm 6.0:
Manifest-Version: 1.0
Bnd-LastModified: 1506148153920
Bundle-DocURL: http://asm.objectweb.org
Bundle-ManifestVersion: 2
Bundle-Name: ASM
Bundle-RequiredExecutionEnvironment: J2SE-1.3
Bundle-SymbolicName: org.objectweb.asm
Bundle-Vendor: France Telecom R&D
Bundle-Version: 6.0
Created-By: 1.8.0_131 (Oracle Corporation)
Export-Package: org.objectweb.asm;version="6.0",org.objectweb.asm.sign
ature;version="6.0"
Implementation-Title: ASM
Implementation-Vendor: France Telecom R&D
Implementation-Version: 6.0
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.5))"
Tool: Bnd-3.2.0.201605172007
This is the content of MANIFEST.MF
for asm 6.2.1:
Manifest-Version: 1.0
Bundle-DocURL: http://asm.ow2.org
Bundle-ManifestVersion: 2
Bundle-Name: org.objectweb.asm
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-SymbolicName: org.objectweb.asm
Bundle-Version: 6.2.1
Export-Package: org.objectweb.asm;version="6.2.1",org.objectweb.asm.si
gnature;version="6.2.1"
Implementation-Title: ASM, a very small and fast Java bytecode manipul
ation framework