ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject RE: Extension to Manifest task?
Date Wed, 03 Mar 2004 18:34:33 GMT
> From: Craig Berry [] 
> > From: Jose Alberto Fernandez []
> >
> > I think it would be quite useful if we had as part of the 
> ear task, a 
> > way to give a fileset/filelist containing any additional 
> jars to put 
> > in the ear, and that the task automatically would modify 
> the manifest 
> > the add the necessary Class-Path entries.
> That was actually the way I first wanted to do it, but I was 
> worried that it would considered to much magic to put on the 
> <ear> task.  But it would certainly be nice to combine the cp 
> generation with the jar inclusion from the same fileset, 
> rather than having to do it as two steps.  And *every* 
> ear-building process that uses non-ejb jars is going to end 
> up needing this.

The EAR task is very light coating on top of the JAR task, I would
think it useful if we could make it a more meaty (and save users some

I also have had a need for something like this is the <jar> task itself,
where I need to create a Class-Path for the manifest and today I have to
something like this.

    <fileset dir='${lib}' id='lib.include'>
        <patternset refid='lib.pattern'/>
        <patternset refid='lib.test.pattern'/>
        <pathconvert property='class.path.libs' refid='lib.include'
                     pathsep=" " dirsep='/'>
            <map from='${lib}\' to=''/>
            <map from='${lib}/' to=''/>
        <manifest file='${cellectivity.manifest}'>
            <attribute  name='Class-Path' value='${class.path.libs}'/>

Notice the ugly double <map> so that it works for unix and windows.

It would be much nicer if one could say something like:

        <manifest file='${cellectivity.manifest}'>
            <ClassPath from='${lib}' refid='lib.include'/>

And of course it should also work directly inside <jar/>

Jose Alberto

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

View raw message