yep: common.xml: ----------- <property name="prop" value="common"/> <path id="classpath.additional"/> <path id="classpath"> <path refid="classpath.additional"/> </path>
build.xml: ---------- <property name="prop" value="specific"/> <import file="../../common.xml"/> <path id="classpath.additional"> <pathelement location="../../dist/cli.jar"/> </path> Other than properties paths will be muted. Therefore the build.xml imports the additional classpath and overrides it after it (with properties you have to import after prop-settings). The "classpath.additional" has to defined in the common.xml because its references there. In your tasks you only refer to "classpath". Jan > -----Ursprüngliche Nachricht----- > Von: Stefano Mancarella [mailto:[EMAIL PROTECTED] > Gesendet am: Mittwoch, 6. Oktober 2004 10:38 > An: Ant Users List > Betreff: <import> and <path>s > > Is there a way to reuse path definitions when using <import>, > in a way > similar to what you can do with targets? > > I've a standard path defined in a common build file, which is > good for > almost all my projects. > When I need to change it I'm forced to redefine it > completely, even when > it would be better to extend it. > > Example: > > common-build.xml: > > <path id="project.classpath"> > <pathelement location="${build.classes}"/> > <fileset dir="${lib.dir}" includes="*.jar,*.zip"/> > </path> > > build.xml: > > <import file="common-build.xml"/> > > <path id="project.classpath"> > <pathelement location="${build.classes}"/> > <fileset dir="${lib.dir}" includes="*.jar,*.zip"/> > <pathelement location="some.dir/some.file"/> > <!-- .... --> > </path> > > Is there a way to reuse the path elements specified in the > common build > file? > >