Hi David,
I tried "ant -p -debug" on my own project.
It generated 840 lines of output, but did not show the dependencies of targets.
Maybe Stefan was thinking of a different parameter?

So I tried doing it the hard way.
I ran this grep command on all the ant xml files (30):
  grep -e "depends=" -e "<target"
Most of the "target" elements have the depends on the same line, but not all, 
so I specify both to grep.
Unfortunately that includes all the targets that have no dependencies, as well.

Since we have so many different builds that overwrite parts of the build with 
their own stuff, there is a  lot of redundancy, but this only gave 257 lines to 
deal with and I can follow a chain of 'depends' backwards from that information.

Maybe this will help.
Rob


-----Original Message-----
From: Stefan Bodewig [mailto:bode...@apache.org] 
Sent: Monday, March 19, 2012 1:03 PM
To: user@ant.apache.org
Subject: Re: How do I trace where a target was called from in a complicated 
build?

On 2012-03-19, KARR, DAVID wrote:

> I'm working with a complex build that calls the "clean" target at some
> point.  I need to figure out how/where that target is referenced.
> I've turned on Ant verbose output, but none of the additional
> information that produces helps me understand why "clean" was called.
> How can I trace how/where this target was called?

ant -p -debug

gives you the dependencies of each target without actually running the
build.  We don't have the opposite of it, unfortunately.

If all else fails, Vizant[1] may help, I'm not sure whether it
understands <import>/<include>, though.

Stefan

[1] http://vizant.sourceforge.net/

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


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

Reply via email to