[Yanel-dev] [Bug 6898] [build] making `yanel.sh build -f...` work requires (too much) duplicate Ant code

bugzilla at wyona.com bugzilla at wyona.com
Wed Feb 4 22:52:59 CET 2009


http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=6898





------- Comment #5 from guillaume.deflache at wyona.com  2009-02-04 22:55 -------
> [1]: a minima maybe just an import task call using a relative path if ever
possible

This seems to work, in spite of what http://ant.apache.org/ant_in_anger.html
says ("We say almost as top level declarations (properties and taskdefs) do not
get inserted into the XML file exactly where the import statement goes, but
added to the end of the file. This is because the import process takes place
after the main build file is parsed, during execution, whereas XML entity
expansion is handled during the parsing process. "): tested with our current
Ant (1.6.5) and 1.7.1.

For example running test-import.build.xml
---8<---
<project name="test-import">
  <import file="test-imported.build.xml"/>
  <property name="yanel.source.home" value="uncool"/>
  <echo>${yanel.source.home}</echo>
</project>
---8<---
with test-imported.build.xml
---8<---
<project name="test-imported">
  <property name="yanel.source.home" value="cool"/>
</project>
---8<---
prints "cool"! :)


-- 
Configure bugmail: http://bugzilla.wyona.com/cgi-bin/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the Yanel-development mailing list