ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Deitte <bdei...@macromedia.com>
Subject RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdef s Jar.java
Date Tue, 21 May 2002 21:05:47 GMT
jlink didn't do the merging of manifests, so we can't look there unfortunately.  

The other solution of course would be to do a double pass over the filesets if filesetmanifest
is enabled, only getting the manifest information on the first pass.  IMHO though the JarInputStream
limitation should be fine for now until someone wants to scratch that itch.  -Brian

> -----Original Message-----
> From: Magesh Umasankar [mailto:umagesh@apache.org]
> Sent: Tuesday, May 21, 2002 11:37 AM
> To: Ant Developers List
> Subject: Re: cvs commit:
> jakarta-ant/src/main/org/apache/tools/ant/taskdefs Jar.java
> 
> 
> I did figure as much and recoded it such that
> the manifest gets created in the finalizeOutputStream.
> However, Conor vetoed it because of the JarInputStream
> issue.  I think his veto is well taken.  JarInputStream,
> whether implemented good or bad, is part of the JDK and it
> won't be nice to say Ant created Jars won't work with it.
> 
> How is jlink performing it, do you know?  Perhaps
> we may mimic that...
> 
> Cheers,
> Magesh
> 
> *************************************************
> *  Committee: Individuals who can do nothing    *
> *  individually and sit to decide that nothing  *
> *  can be done together.                        *
> *************************************************
> ----- Original Message -----
> From: "Brian Deitte" <bdeitte@macromedia.com>
> To: "'Ant Developers List'" <ant-dev@jakarta.apache.org>
> Sent: Tuesday, May 21, 2002 11:13 AM
> Subject: RE: cvs commit: 
> jakarta-ant/src/main/org/apache/tools/ant/taskdefs
> Jar.java
> 
> 
> > Hmm, I looked at the horribly-out-of-date custom version of 
> Ant I'm using,
> and I see I have the manifest creation in 
> finalizeOutputStream.  Now I know
> why its still working for me.
> >
> > The only solution I see is to move manifest creation to
> finalizeOutputStream only when filesetmanifest is true, and 
> just note that a
> limitation of using filesetmanifest is that JarInputStream won't work.
> >
> > As for Kevin Gross' other question, I couldn't google 
> anything useful for
> "index-list manifest".  If index-list is a main attribute, 
> then he could do
> what I do for Class-Path settings, which is specify a 
> separate manifest with
> the correct main manifest settings and then use
> filesetmanifest="mergewithoutmain".
> >
> > -Brian
> >
> > > -----Original Message-----
> > > From: Magesh Umasankar [mailto:umagesh@apache.org]
> > > Sent: Thursday, May 16, 2002 5:32 PM
> > > To: Ant Developers List
> > > Subject: Re: cvs commit:
> > > jakarta-ant/src/main/org/apache/tools/ant/taskdefs Jar.java
> > >
> > >
> > > Hi Brian:
> > > This was the issue reported and I checke dthat it was valid.
> > > Iprovided a fix, but it clashed with another fix as pointed out
> > > by Conor - so I ended up reverting it.
> > >
> > > http://marc.theaimsgroup.com/?t=102053683600001&r=1&w=2
> > >
> > > Conor's resaon for rejecting the fix I put in is here:
> > > http://marc.theaimsgroup.com/?l=ant-dev&m=102142231417706&w=2
> > >
> > > Cheers,
> > > Magesh
> > >
> > > *********************************************
> > > *  There are two types of people in this    *
> > > *  world, good and bad.  The good sleep     *
> > > *  better, but the bad seem to enjoy the    *
> > > *  waking hours much more. - Woody Allen    *
> > > *********************************************
> > > ----- Original Message -----
> > > From: "Brian Deitte" <bdeitte@macromedia.com>
> > > To: "'Ant Developers List'" <ant-dev@jakarta.apache.org>
> > > Sent: Thursday, May 16, 2002 3:34 PM
> > > Subject: RE: cvs commit:
> > > jakarta-ant/src/main/org/apache/tools/ant/taskdefs
> > > Jar.java
> > >
> > >
> > > > Hi Magesh, I was in software endgame mode and haven't been
> > > reading the
> > > list for awhile.  Could you explain how manifest merging 
> is mucking up
> > > things?
> > > >
> > > > > -----Original Message-----
> > > > > From: umagesh@apache.org [mailto:umagesh@apache.org]
> > > > > Sent: Wednesday, May 15, 2002 4:07 PM
> > > > > To: jakarta-ant-cvs@apache.org
> > > > > Subject: cvs commit:
> > > > > jakarta-ant/src/main/org/apache/tools/ant/taskdefs
> > > > > Jar.java
> > > > >
> > > > >
> > > > > umagesh     02/05/15 13:06:30
> > > > >
> > > > >   Modified:    src/main/org/apache/tools/ant/taskdefs Tag:
> > > > > ANT_15_BRANCH
> > > > >                         Jar.java
> > > > >   Log:
> > > > >   Revert changes to keep JarInputStream happy.  Need to
> > > > > investigate better way to merge manifests - Brian??
> > > > >
> > > > >   Revision  Changes    Path
> > > > >   No                   revision
> > > > >
> > > > >
> > > > >   No                   revision
> > > > >
> > > > >
> > > > >   1.51.2.2  +5 -6
> > > > > jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java
> > > > >
> > > > >   Index: Jar.java
> > > > >
> > > 
> ===================================================================
> > > > >   RCS file:
> > > > > /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/J
> > > > > ar.java,v
> > > > >   retrieving revision 1.51.2.1
> > > > >   retrieving revision 1.51.2.2
> > > > >   diff -u -r1.51.2.1 -r1.51.2.2
> > > > >   --- Jar.java 8 May 2002 22:27:46 -0000 1.51.2.1
> > > > >   +++ Jar.java 15 May 2002 20:06:30 -0000 1.51.2.2
> > > > >   @@ -223,11 +223,6 @@
> > > > >
> > > > >        protected void 
> initZipOutputStream(ZipOutputStream zOut)
> > > > >            throws IOException, BuildException {
> > > > >   -        super.initZipOutputStream(zOut);
> > > > >   -    }
> > > > >   -
> > > > >   -    protected void
> > > finalizeZipOutputStream(ZipOutputStream zOut)
> > > > >   -            throws IOException, BuildException {
> > > > >            String ls = System.getProperty("line.separator");
> > > > >
> > > > >            try {
> > > > >   @@ -278,13 +273,17 @@
> > > > >                    new 
> ByteArrayInputStream(baos.toByteArray());
> > > > >                super.zipFile(bais, zOut, 
> "META-INF/MANIFEST.MF",
> > > > >                              
> System.currentTimeMillis(), null);
> > > > >   -            super.finalizeZipOutputStream(zOut);
> > > > >   +            super.initZipOutputStream(zOut);
> > > > >            } catch (ManifestException e) {
> > > > >                log("Manifest is invalid: " + e.getMessage(),
> > > > > Project.MSG_ERR);
> > > > >                throw new BuildException("Invalid Manifest",
> > > > > e, getLocation());
> > > > >            } finally {
> > > > >                
> System.getProperties().put("line.separator", ls);
> > > > >            }
> > > > >   +    }
> > > > >   +
> > > > >   +    protected void
> > > finalizeZipOutputStream(ZipOutputStream zOut)
> > > > >   +            throws IOException, BuildException {
> > > > >            if (index) {
> > > > >                createIndexList(zOut);
> > > > >            }
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > > <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <mailto:ant-dev-help@jakarta.apache.org>
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <mailto:ant-dev-help@jakarta.apache.org>
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <mailto:ant-dev-help@jakarta.apache.org>
> > >
> >
> > --
> > To unsubscribe, e-mail:   
<mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message