You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Slava Gonahchan <yt...@gmail.com> on 2008/03/22 07:44:35 UTC

ant api for analyzing dependencies

Hello, good folks.
I need to resolve dependencies of my project.
Can ant analyze dependencies of source files? Or it is only for class files?
Anyway i tried using it:
-----------------------
public static AntAnalyzer analyzer=new AntAnalyzer();
...
analyzer.addRootClass("org.apache.tools.ant.types.Path");
Enumeration enum=analyzer.getClassDependencies();
        while(enum.hasMoreElements()){
            System.out.println(enum.nextElement());
        }
-------------------------

And it prints only: org.apache.tools.ant.types.Path
Actually it prints String I specified in addRootClass every time.
What did i do wrong?

AW: ant api for analyzing dependencies

Posted by Ja...@rzf.fin-nrw.de.
org.apache.tools.ant.taskdefs.optional.depend.AntAnalyzer is only the adapter to JDepend.
And that tool should analyze dependencies.

Jan

> -----Ursprüngliche Nachricht-----
> Von: Slava Gonahchan [mailto:ytriffy@gmail.com] 
> Gesendet: Samstag, 22. März 2008 07:45
> An: user@ant.apache.org
> Betreff: ant api for analyzing dependencies
> 
> Hello, good folks.
> I need to resolve dependencies of my project.
> Can ant analyze dependencies of source files? Or it is only 
> for class files?
> Anyway i tried using it:
> -----------------------
> public static AntAnalyzer analyzer=new AntAnalyzer();
> ...
> analyzer.addRootClass("org.apache.tools.ant.types.Path");
> Enumeration enum=analyzer.getClassDependencies();
>         while(enum.hasMoreElements()){
>             System.out.println(enum.nextElement());
>         }
> -------------------------
> 
> And it prints only: org.apache.tools.ant.types.Path
> Actually it prints String I specified in addRootClass every time.
> What did i do wrong?
> 

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