ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Accessing manifest information from within an ant build
Date Fri, 22 Nov 2002 23:09:56 GMT
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(

Almost a one liner ;-) --DD

-----Original Message-----
From: Nau, Michael [] 
Sent: Friday, November 22, 2002 4:59 PM
Subject: Accessing manifest information from within an ant build

I want to find a way to print what jar files currently exist in a specific
directory and what there version is (via their manifest file). 

It looks like I can use the <apply> task to loop through all the jar files
in the directory, but I'm not sure how to access the version information
from the manifest file.

Is there anyway to do this via ant?

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message