ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: ant 1.5.4 : Import
Date Thu, 24 Jul 2003 15:09:11 GMT

Dominique Devienne wrote, On 24/07/2003 16.55:

...
> In other words, the context of execution of any imported file should be the
> top level build file. I foresee no end in the confusion that would result
> otherwise.
> 
> Some might argue that an imported file should be able to know where if was
> imported from, but I see this as dangerous. It's a limitation that would
> make imports in Ant very straightforward.

Can you please expand on this point?

The dir argumentation is what follows:

  - imported buildfile targets are like macros, thus are usually intended
    to be used as if inserted in the main buildfile itself
  - some of the imported targets may need resources relative to *them*,
    and not the importing file, hence the importedfile.ant.file property

Thus all things in the imported file are done relative to the *base* 
file, and hence the current way would be correct.

Thus, in the sake of consistency, I now start to think that something 
like the following would be needed to make what Conor thinks should happen:

   <import file="${thisprojectname.ant.file}/../base2/build.xml"/>

or better


   <import file="${thisprojectname.basedir}/base2/build.xml"/>

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



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


Mime
View raw message