ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Ant-Property-Classpath
Date Tue, 19 Feb 2002 08:25:04 GMT
[Note: This type of question should go to ant-user, not ant-dev; I've
redirected it to that list.]

--- ram g <ram66321@hotmail.com> wrote:
> I have a a set of build files that use proeprty tags to define
> classpath, tomacthome,utility dirs that i use while building .jar files
> and so on.
[snip]
> I attempted re-structuring the build code, by removing repetitive tags
> and code.
[snip]
> So created a include.xml file in the root moved these property tags to
> this file.
> 
> Modified the other builds to invoke this root\include.xml in their init 
> target.
> 
> When i tried executing the build, it failed saying the property values
> that i had set in the root\include.xml are invalid.

You can pass properties down, but not up.

> What do i do to make my property tag settings @ root stay valid in all 
> subsequent build files ?

If you don't intend to ever run the sub-project buildfiles themselves,
then just always have the "root" buildfile run them (name your sub-project
buildfiles something other than build.xml, if you want to execute 'ant'
from a subdir but still have it run against the "root" buildfile [see the
"-find" option).

If you do intend to let your sub-project buildfiles be run independently,
then you can either go with the "entity include" described in the FAQ at:
  http://jakarta.apache.org/ant/faq.html#xml-entity-include
or, if you're worried about getting lost in a maze of relative paths, you
could put your global properties in a property file, and have each
buildfile read that file in, using:
  <property file="<global_properties_filename>"/>

Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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


Mime
View raw message