I’d like to be able to dump an intermediate version of a build file–One that is fully expanded with “includes” inline and variables expanded for a given target.
I don’t care if I have to actually execute the target to get this expansion (I know variables can attain different values depending on the execution path)
I’m refactoring a dozen nearly identical build.xml files and I’d like to ensure that it is as close to a pure refactor as I can get.
There is unfortunately no way to do this out of the box using ant.
You would have to write a program that emulates the ant variable substitution process. I know that the Eclipse ant editor does that (although not 100% of the time). Maybe you could cannibalize some of that code.
Sorry that I can’t present an actual solution. But I thought it might still be useful information for some readers to know that they needn’t search for a command line option or something.