ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Skeet" <jon.sk...@peramon.com>
Subject RE: How to update a jar?
Date Wed, 09 May 2001 23:01:21 GMT
> > The jar task actually extends the zip task, IIRC. Does the zip
> > task have update features? I didn't think so, but I could be 
> > wrong.
> 
> I don't think <zip> does, either. And I think the reason the 
> <jar> task
> doesn't is because Ant tries to be compatible with JDK 1.1, and that
> didn't offer the -u flag for its 'jar' command.

Eek - I didn't realise the jar task just used jar itself. I'd have
thought it would all be coded up. I'll have to investigate further.
 
> In this case, though, I think the suggestion to use <zip> 
> instead of <jar>
> is so you don't have to add (ie., replace) your manifest file 
> later, just
> include the file you want in the jar in the first place.

Possibly... I got rather confused with that part of the thread when it
started spiralling. It's definitely too close to bed time to work it all
out now.

> There's a <jlink> task that I thought was supposed to allow you to add
> files to an already existing jar-file, but I can't get it to 
> do that for me.

The documentation doesn't quite suggest that as far as I can see - it 
looks like it's just for merging existing jar files into a new one,
rather
than updating an existing one.

Possibly even just a task which did things the inelegant way internally
(the rename/re-jar/delete way) would be worth investigating - that
shouldn't
take too long to knock up (I'd hope - I haven't investigated any
macro-like
capabilities within ant yet). Anything to avoid having to write that
long
kludge out several times would help.

Jon

Mime
View raw message