ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject RE: Extension to Manifest task?
Date Wed, 03 Mar 2004 18:34:33 GMT
> From: Craig Berry [mailto:Craig.Berry@portblue.com] 
> 
> > From: Jose Alberto Fernandez [mailto:jalberto@cellectivity.com]
> >
> > 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
time).

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
write
something like this.


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

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'/>
        </manifest>

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

Jose Alberto

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


Mime
View raw message