DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12217>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12217

[PATCH][embed proposal] add ant.file.projectname property for every <import>ed 
file





------- Additional Comments From [EMAIL PROTECTED]  2002-12-03 16:39 -------
If we go with something like this (which looks fine) we should also
set the property for the top-level project file.

Otherwise there is no way to write a buildfile which can work as top
level and also when it is included by another buildfile.

A more consistent idea (I think) would be to define instead of "ant.file.X"
properties, "basedir.X" properties. Which would take into account not only the
location of the file but any relative displacement as specified in the
project's basedir attribute of the included file. Ex:

File: /proj/A.xml
<project name="A" basedir=".">
  <include "sub1/b.xml" />
  <include "sub1/c.xml" />

  <echo message="In A: ${basedir.A}" />
  <echo message="In A: ${basedir}" />
</project>

File: /proj/sub1/b.xml
<project name="b">

  <echo message="In b: ${basedir.b}"/>
  <echo message="In b: ${basedir}" />
</project>

File: /proj/sub1/c.xml
<project name="c" basedir="..">
  <echo message="In c: ${basedir.c}" />
  <echo message="In c: ${basedir}" />
</project>

The output would be:
In b: /proj/sub1
In b: /proj
In c: /proj
In c: /proj
In A: /proj
In A: /proj

This allows for much more consistency in the buildfile code.
Still you could offer both basedir.XX and ant.file.XX

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to