<project>
<property name="myclass.name" value="com.foo.Bar"/>
<ac:propertyregex
xmlns:ac="antlib:net.sf.antcontrib"
property="myclass.path"
input="${myclass.name}"
regexp="\."
replace="/"
/>
<echoproperties prefix="myclass."/>
</project>
Also have a look at the <unpackage> file mapper
http://ant.apache.org/manual/CoreTypes/mapper.html#unpackage-mapper
Jan
>-----Ursprüngliche Nachricht-----
>Von: Karr, David [mailto:[EMAIL PROTECTED]
>Gesendet: Mittwoch, 25. Juli 2007 01:54
>An: Ant Users List
>Betreff: JDK142, ANT154: Convert java class name to relative path
>
>I'm trying to build something that determines a set of file names to
>pass to the PMD Ant task. At one step, I have a Java class name, and I
>need to convert it to a relative file path. How do I convert
>a variable
>like "com.abc.stuff" to "com/abc/stuff" (I can deal with adding the
>prefixes and suffixes to that)?
>
>It looks like the Ant-contrib "propertyregex" task comes close, but I
>don't understand how to use it to get what I'm looking for.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]