ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Lord <p.l...@russet.org.uk>
Subject Re: re-reading build file from within ant
Date Thu, 19 Jun 2003 17:33:09 GMT
>>>>> "Jeff" == Faist, Jeff <Jeff.Faist@encodasystems.com> writes:

  Jeff> I use to do this with makefiles am therefore unsure if it will
  Jeff> work with ANT.

  Jeff> Leave build.xml alone and have it test for a second file that
  Jeff> would be the one that is regenerated and does the real work.
  Jeff> builds.xml will test for this file being out of date, rebuild
  Jeff> it then call it as needed.  that way builds.xml will not
  Jeff> change so no errors will occur and the other file is not
  Jeff> loaded ( .include in make ) until after it's rebuilt so it's
  Jeff> content change will not cause an error either.

  Jeff> something to test and consider.


Ah yes. Like this...


build.xml checks whether build-in.xml (one of my source files), and
reallybuild.xml are out of date. If so run antmerge, to update
reallybuild.xml. 

and then build.xml launches reallybuild.xml regardless. 

I think this would work, but there are still two problems.

First my IDE, and others as well I suspect, would think that build.xml
really was the build file (rather than reallybuild.xml which
is the real build), and would offer me only the targets in build.xml
to build against. 

And secondly, I can not pass a target to the ant that's building
build.xml which is actually in reallybuild.xml, because it will
complain. I'd have to do something nasty like set a -D property which
is the target of the sub-ant. Again this is non standard, and peoples
IDE's will fail. 

Phil


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


Mime
View raw message