ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Carver <fr...@efsol.com>
Subject RE: Accessing manifest information from within an ant build
Date Sat, 23 Nov 2002 08:47:28 GMT

Dominique Devienne <DDevienne@lgc.com> said:

> I don't think so. Not directly. I'd define a fileset of your JARs, and write
> a small JavaScript to look over it, and use JDK's
>
> import java.util.jar.*;
> new JarFile(filename).getManifest().getMainAttributes().getValue(
>   Attributes.Name.IMPLEMENTATATION_VERSION);
>
> Almost a one liner ;-) --DD

That looks neat.  Can you expand a little on the "look over it" part.  I don't
know to get the filenames out of a fileset like that, and a variation on this
approach would be a great solution for a couple other problems which have popped
up on this list over the last few weeks.

--
Frank Carver   frank@efsol.com   http://www.efsol.com/


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


Mime
View raw message