ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
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
their
"list" attribute.


Jan

>-----Urspr√ľngliche Nachricht-----
>Von: snoofkin [mailto:ariel.nabble@arielbloch.com] 
>Gesendet: Mittwoch, 19. November 2008 03:18
>An: user@ant.apache.org
>Betreff: How to build an Ant path from a comma-seperated list?
>
>
>Hi,
>
>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?
>
>Thanks,
>Ariel
>-- 
>View this message in context: 
>http://www.nabble.com/How-to-build-an-Ant-path-from-a-comma-sep
>erated-list--tp20572597p20572597.html
>Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message