You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2009/06/30 13:53:45 UTC
DO NOT REPLY [Bug 47457] New: indexjars does not list META-INF
https://issues.apache.org/bugzilla/show_bug.cgi?id=47457
Summary: indexjars does not list META-INF
Product: Ant
Version: 1.7.0
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: jason@plutext.org
Because the jar indexer skips the META-INF Entries, the classloader fails to
load resources from META-INF dirs (in my case, vfs-providers.xml)
See further http://forums.java.net/jive/thread.jspa?messageID=292293
>From that link, there is an workaround, which looks like this:
<jar index="true" jarfile="main.jar" basedir="classes">
<manifest>
<attribute name="Class-Path" value="lib1.jar lib2.jar"/>
</manifest>
<indexjars path="${web.home}/applet/lib1.jar"/>
<indexjars path="${web.home}/applet/lib2.jar"/>
<zipfileset src="lib1.jar" excludes="*.LIST *.RSA. *.SF"
includes="META-INF/**"/>
<zipfileset src="lib2.jar" excludes="*.LIST *.RSA. *.SF"
includes="META-INF/**"/>
</jar>
The trick is to transfer all special META-INF-data to the main.jar's META-INF/
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 47457] indexjars does not list META-INF
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47457
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |1.8.0
--- Comment #1 from Stefan Bodewig <bo...@apache.org> 2009-07-10 06:45:11 PST ---
If you look at the code you'll see META-INF is explicitly excluded and the
commit hints this may in order to be compatible with Sun's jar command.
In fact I've performed a few experiments and
jar i some.jar
will not include META-INF when using JDK 1.4.2 but when using JDK 1.5, so Sun's
jar has changed behavior and Ant hasn't tracked that.
We probably should not include META-INF unconditionally since this may very
well cause problems for people using the resulting jars on Java 1.4 or earlier.
I'm going to add an option (defaulting to false) that has to be set explicitly
in order to include META-INF inside the index.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 47457] indexjars does not list META-INF
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47457
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Severity|normal |enhancement
--- Comment #2 from Stefan Bodewig <bo...@apache.org> 2009-07-10 07:24:54 PST ---
added with svn revision 792960 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=792960 )
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.