ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Extension to Manifest task?
Date Thu, 04 Mar 2004 12:58:51 GMT
On Wed, 3 Mar 2004, Craig Berry <> wrote:

> The fit turns out to be rather awkward.

Doesn't look that bad to me.

> <!-- Gather the non-ejb EAR jars and build a fileset containing them -->
> <copy todir="${}" flatten="true">
> 	<fileset refid="portblue.libs.ear"/>
> </copy>
> <fileset dir="${}" id="lib.include"/>

Do your really need that copy operation or are you just doing it in
order to create the classpath entry?

> <pathconvert property="lib.prefix" pathsep=" ">
>   <path location="${}"/>
> </pathconvert>

Are you doing this to turn into an absolute

<property name="lib.prefix" location="${}"/>

would be simpler.

> <pathconvert refid="lib.include" property="ear.classpath" dirsep="/"
>               pathsep=" ">
>   <map from="${lib.prefix}" to="lib"/>
> </pathconvert>

creates the property you need.

Assuming you don't need the <copy> task, the whole thing could be
simplyfied with the CVS HEAD version as

<pathconvert property="ear.classpath" dirsep="/" pathsep=" ">
    <fileset refid="portblue.libs.ear"/>
  <mapper type="regexp"

would do.  And once we get composite mappers, we could even do without
regular expressions.  A "flatten" mapper followed by "glob" from="*"
to="lib/*" would do.

I understand that this operation may be common to build a Class-Path
attribute for arbitrary manifests, so if we want to create specific
support for it, my target would be the manifest task rather than the
ear task as well.


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

View raw message