Bug#741885: libmsv-java: msv-rngconverter.jar not runnable due to missing 'Main-Class' in MANIFEST.MF
Alan D. Salewski
asalewski at rdc.com
Sun Mar 16 22:32:07 UTC 2014
Package: libmsv-java
Version: 2009.1+dfsg1-4
Severity: normal
Tags: patch
Dear Maintainer,
The file:
/usr/share/java/msv-rngconverter.jar
is intended to be a "runnable JAR" (it has a 'main' method), but as
distributed in the 'libmsv-java' 2009.1+dfsg1-3 and 2009.1+dfsg1-4 Debian
packages, the file cannot be run due to the 'Main-Class' attribute missing
from the MANIFEST.MF file within the JAR.
Here's the output that is produced when invoked with no additional arguments:
$ java -jar /usr/share/java/msv-rngconverter.jar
Failed to load Main-Class manifest attribute from
/usr/share/java/msv-rngconverter.jar
Please consider applying the attached patch, which modifies the
'rngconverter/pom.xml' file to cause it to add the missing information.
When invoked with the patched version, the output is as follows:
$ java -jar /usr/share/java/msv-rngconverter.jar
Usage: RELAXNGConverter <schema filename/URL>
converts a schema written in various schema language to
the equivalent schema written in RELAX NG.
Thanks for considering the patch, and thanks for your work on Debian,
-Al
*** debian/patches/0003-rngconverter-pom-add-mainclass.patch
Description: Add 'Main-Class' to rngconverter JAR file manifest
The maven-jar-plugin configuration in rngconverter/pom.xml had the intention
of creating a runnable JAR file, but was not working due to an incorrect
organization of the XML elements. In particular:
+ the '<manifest>' elt needed to be within the '<archive>' elt
+ the '<addClasspath>' elt needed to be within the '<manifest>' elt.
Author: Alan D. Salewski <salewski at att.net>
Forwarded: no
Last-Update: 2014-03-16
---
--- msv-2009.1+dfsg1.orig/rngconverter/pom.xml
+++ msv-2009.1+dfsg1/rngconverter/pom.xml
@@ -56,11 +56,11 @@ EVEN IF SUN HAS BEEN ADVISED OF THE POSS
<configuration>
<archive>
<index>true</index>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>com.sun.msv.writer.relaxng.Driver</mainClass>
+ </manifest>
</archive>
- <manifest>
- <mainClass>com.sun.msv.writer.relaxng.Driver</mainClass>
- </manifest>
- <addClasspath>true</addClasspath>
</configuration>
</plugin>
</plugins>
-- System Information:
Debian Release: 7.3
APT prefers stable
APT policy: (990, 'stable'), (800, 'testing'), (500, 'stable-updates'), (500, 'oldstable-updates'), (500, 'oldstable'), (80, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libmsv-java depends on:
ii ant 1.8.2-4
ii libisorelax-java 20041111-6
ii librelaxng-datatype-java 1.0+ds1-1
ii libxerces2-java 2.11.0-6
libmsv-java recommends no packages.
libmsv-java suggests no packages.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-rngconverter-pom-add-mainclass.patch
Type: text/x-diff
Size: 1039 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20140316/23f39468/attachment.patch>
More information about the pkg-java-maintainers
mailing list