I read the source and I had a patch for accept this parameter. The patch
consiste to :
* modify the Zip.java for declared the variables zipFile and addedDirs to
protected and not private
* modify the Jar.java for add the new property "index"
 private boolean doIndex=true; // Create index by default for optimise the
classloader
 public void setIndex(boolean i)
 {
  doIndex=i;
 }

* modify the Jar.java for add the generation of the Index.list file. Add at
the end of the finalizeZipOutputStream() method this code :
        super.finalizeZipOutputStream(zOut);
// -- Patch by Philippe PRADOS ([EMAIL PROTECTED])
if (doIndex)
{
  // Create the index.list file
  baos = new ByteArrayOutputStream();
  writer = new PrintWriter(baos);
  java.util.Enumeration enum=addedDirs.keys();
  writer.println("JarIndex-Version: 1.0");
  writer.println();
  writer.println(zipFile.getName());
  while (enum.hasMoreElements())
  {
   String dir=(String)enum.nextElement();
   dir=dir.substring(0,dir.length()-1);
   if ("META-INF".equals(dir)) continue;
   writer.println(dir);
  }
  writer.flush();
  bais = new ByteArrayInputStream(baos.toByteArray());
  super.zipFile(bais, zOut, "META-INF/Index.list",
System.currentTimeMillis());
}
// ------

I think it's to late for include this patch for the 1.4 version, but the
last one...

Thank's

Philippe PRADOS
----- Original Message -----
From: "Stephane Bailliez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, September 03, 2001 10:56 AM
Subject: FW: Ant 1.4 beta


> Philippe,
>
> I unfortunately believe it is too late as of now to ask for such change
even
> if it is minor...
> Ant 1.4 is in the pipe and the beta cycle is over.
>
> However, you can submit a patch so that we include it in the Ant 1.5
branch.
> You can send it with a '[PATCH]' prefix in the mail subject (to
> [EMAIL PROTECTED]) so that we will be able to find it quickly and
> don't forget.
>
> Is it ok for you ?
>
> Cheers,
>
>
>  -----Original Message-----
> From: Philippe PRADOS [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 03, 2001 12:32 PM
> To: [EMAIL PROTECTED]
> Subject: Ant 1.4 beta
>
>
> The <jar> build-in task haven't the parameter "-i" for create and index in
> the jar file, and optimise the process of the classloader. Is't possible
to
> add this in the release version ?
>
> Thank's
>
> Philippe PRADOS
> www.philippe.prados.net
>
>

Reply via email to