ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MikeO <>
Subject Re: Converting path to fileset issue.
Date Mon, 05 Nov 2007 16:10:54 GMT

This doesn't seem to be working for me. I am printing out the classpath
(using ant-contrib) with this code after the path task:

<pathconvert targetos="windows" property="printPath"
refid="project.class.path" pathsep=";" />
<echo> Your classpath: ${printPath}</echo>

and it displays nothing.

I tried something similar before, but from my experience, it seems that the
fileset task doesn't like dealing with semi-colon separated lists, and only
deals with single files/directories. In other words, this would work if my
properties file said:


but once you add in a ; it no longer works. I think this is because fileset
is trying to treat the string as a single filename, rather than a list.
Maybe this works in later versions of ant? Right now, I am using ant 1.7.0. 

Thanks again,


Dominique Devienne-2 wrote:
> You're better off leveraging the includes attribute of fileset in this
> case IMHO.
> ---- ----
> classpath.jar.include = \
>   lib/*.jar;\
>   lib/ext/*.jar;\
>   lib/config/*.jar
> ---- build.xml extract ---
> <properties file="" />
> <path id="project.class.path">
>   <fileset dir="." includes="${classpath.jar.include}" />
> </path>
> Forces to "list" all jars (well, uses patterns, so not exactly list),
> but specifying it this way is better anyway I think. --DD
> PS: Note the use of forward slashes in .properties. Always prefer
> forward slashes in Ant.

View this message in context:
Sent from the Ant - Dev mailing list archive at

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

View raw message