ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: <import> and <path>s
Date Wed, 06 Oct 2004 15:35:07 GMT
I've been specifying paths in an <xmlproperty> file which is loaded by the
common build file and used by other build files by importing the common build
file.  All build files use the same build structure so the paths are always
applicable to all builds.  I also tend to define a path that is empty, but
referenced by one of the other standard paths.  That way, I can override that
empty path and the pathelements will get included in the standard path by
reference.

Hopefully that's what you are looking for.

Jake

Quoting Stefano Mancarella <stefano.mancarella@caboto.it>:

> 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?
>
>




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


Mime
View raw message