Export to GitHub

jarjar - issue #4

index="true" doesn't work on jarjar ant task


Posted on Oct 5, 2007 by Happy Giraffe

What steps will reproduce the problem? 1. Set index="true" on a jarjar ant task

What is the expected output? What do you see instead? I expect a valid INDEX.LIST however I get one containing only the jar name. No packages.

What version of the product are you using? On what operating system? Windows XP Java 1.6.0_02 Ant 1.7.0 JarJar 1.0rc5

Please provide any additional information below.

Here's my task definition:

<jarjar jarfile="myjar.jar" index="true"> <fileset dir="tmp" includes="somepackage/.class/> <zipfileset src="lib/jartoinclude.jar"/> <rule pattern="org.apps.*" result="org.otherapps.@1"/> </jarjar>

Comment #1

Posted on Feb 7, 2008 by Massive Panda

Just curious, what do you need the index for?

Comment #2

Posted on Feb 7, 2008 by Happy Giraffe

No specific reason. I tend to put an index on my jars since it improves class loading performances.

Comment #3

Posted on Jul 22, 2008 by Quick Kangaroo

Here is a reason: When converting a jar that has a index.list, and you do not specify index="true" the resulting jar will still have the original index.list, which doesn't match the reality anymore. Eclipse gives me a sun.misc.InvalidJarIndexException

Comment #4

Posted on Jul 22, 2008 by Happy Giraffe

It's true that the original jar index isn't valid anymore. However, I can't see why it couldn't be regenerated with the final jarjared jar.

Comment #5

Posted on Jul 22, 2008 by Quick Kangaroo

I agree, it must be regenerated.

Comment #6

Posted on Aug 30, 2008 by Massive Panda

This should be fixed in SVN head, let me know if it works for you.

Comment #7

Posted on Aug 31, 2008 by Happy Giraffe

Works perfectly. Thanks!

Status: Fixed

Labels:
Type-Defect Priority-Medium