ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: How to build an Ant path from a comma-seperated list?
Date Wed, 19 Nov 2008 05:43:56 GMT
If the modules have a common base directory you could use <ac:propertyregexp> for
building an include pattern from your list.
    moduleA,moduleB --> **/moduleA/,**/moduleB/
Then specifying the path is
    <path><fileset dir="COMMON_BASEDIR" includes="${CALCULATED_INCLUDE_PATTERN}"/></path>

But if you just want to iterate with <ac:for> or <ac:foreach> you could use simply
"list" attribute.


>-----Urspr√ľngliche Nachricht-----
>Von: snoofkin [] 
>Gesendet: Mittwoch, 19. November 2008 03:18
>Betreff: How to build an Ant path from a comma-seperated list?
>I would like to describe Java module dependencies as a 
>comma-separated list,
>and have Ant recursively clean/compile them.
>This is possible using the following setup:
>    <path id="modules">
>        <pathelement location="${A.dir}"/>
>        <pathelement location="${B.dir}"/>
>        <pathelement location="${C.dir}"/>
>    </path>
>    <target name="clean-all">
>        <foreach target="clean" param="name">
>            <path refid="modules"/>
>        </foreach>
>    </target>
>But I would like to move to a simple list, something like:
>    <property name="dependencies" value="A,B,C" />
>is there a programmatic way to build a path from a list?
>View this message in context: 
>Sent from the Ant - Users mailing list archive at
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message