tags:

views:

78

answers:

1

Given a property:

<property name="classes" value="com.package.Class1,com.package.Class2" />

I'm trying to compile only the classes specified like:

<javac srcdir="${src.dir}" destdir="${build.dir}">
    <include name="${classes}" />
</javac>

However the 'include' tag is specifying the file names to include, not the qualified class names.

Is there a way I can create a new property/include tag that has all the classes in 'classes' in the correct format? ie.

"com.package.Class1" -> "com\\package\\Class1.java"
+2  A: 

I figured it out. After ant-contrib I can do one of these:

<propertyregex property="classes.resolved"
  input="${classes}"
  regexp="\."
  replace="\\\\" />
Cogsy