tags:

views:

118

answers:

1

I have an ANT build xml file which includes a path declaration with numerous path elements. I would like to declare a second path that "includes" somehow all the elements from the former path into its own. That would then allow me to just the later path rather than requiring me to include both when paths are required.

Without copying all the elements from the former path into the later path, surely theres a better way.

+4  A: 

As shown here, you want to use the refid attribute. For example, here p2 refers to the elements in p1

<path id="p1">
    <fileset dir="lib">
        <include name="**/*.jar"/>
    </fileset>
</path>

<path id="p2">
    <path refid="p1"/>
    <fileset dir="src">
        <include name="**/*.java"/>
    </fileset>
</path>
Michael Easter