You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Pierre Goupil <go...@gmail.com> on 2006/09/06 17:07:58 UTC

A noob question : the JDepend Ant task

Hi all !


Totally new to both JDepend 2.9.1 and Ant 1.6.5, I'm trying to have them
work together. Unsuccessfully, as you may guess. I would like to generate a
JDepend report from Ant. I'm using Eclipse 3.2 under Windwos XP.

Here's the code :

***
  <taskdef name="jdepend" classpath="lib/jdepend.jar" classname="
org.apache.tools.ant.taskdefs.optional.jdepend.JDependTask"/>

  <target name="JDepend" depends="compile">

    <jdepend outputfile="${docDir}/jdepend.txt" fork="yes">
        <classespath location="${build}"/>
    </jdepend>

  </target>
***


Where "build" contains my .class subdirectories and where "docDir" is a
folder meant to receive the report.

And now, here's a digest of the error :


***
BUILD FAILED
D:\Zala\workspace\Avalisation\Divers\build.xml:45: taskdef A class needed by
class org.apache.tools.ant.taskdefs.optional.jdepend.JDependTask cannot be
found: jdepend/xmlui/JDepend
***

I've tryied these unsuccessfully:

-adding jdepend.jar to my eclipse build path
-setting ANT_HOME
-copying jdepend.jar to ~ant.home/lib/

Notice that I've tried all three with jdepend-2.9.1.jar, too.

If anyone got an idea...

Thanx


Pierre Goupil


-- 
"Rien de grand ne s'est accompli dans le monde sans passion."

(G.W.F. Hegel, philosophe Allemand)

Re: A noob question : the JDepend Ant task

Posted by Pierre Goupil <go...@gmail.com>.
OK. I've removed jdepend.jar from : eclipse build path, eclipse classpath
and system classpath. But no way, this doesn't work.

:s

Pierre

-- 
"Rien de grand ne s'est accompli dans le monde sans passion."

(G.W.F. Hegel, philosophe Allemand)

Re: A noob question : the JDepend Ant task

Posted by Pierre Goupil <go...@gmail.com>.
You're my prophet ! =)

This plus adding a "<classpath location="..."> to where the .jar is, et
voila !

Thanx a lot to having pointed me to this known issue : I will use it again,
I'm convinced ! I'm going to report this to the JDepend author NOW : he told
me he could not help me very much, so I assume he doesn't know about this.

Thanks again !


Pierre


-- 
"Rien de grand ne s'est accompli dans le monde sans passion."

(G.W.F. Hegel, philosophe Allemand)

Re: A noob question : the JDepend Ant task

Posted by Peter Reilly <pe...@gmail.com>.
Try this link (subs junit with jdepend)
http://www.ryanlowe.ca/blog/archives/001038_junit_ant_task_doesnt_work_in_eclipse.php
Peter


On 9/6/06, Pierre Goupil <go...@gmail.com> wrote:
>
> Inline
>
> 2006/9/6, Peter Reilly <pe...@gmail.com>:
> >
> > It depends on eclipse.
>
>
> I think so, too.
>
>
> I do not use eclipse (tried to once or twice)
> > but have some experience in netbeans and intelli idea.
> >
> > Both of these come with a bundled ant.
>
>
> Eclipse too.
>
>
> One has set
> > set the ant path to your ant path, or add the  jdepend.jar
> > file into the bundled ant lib directory.
>
>
> None of these works, I'm afraid.
>
>
> Using <typedef .../> will not work.
>
>
> I've not tried. So I'll believe you. =)
>
> Still a work in progress...
>
>
> Pierre
>
>
> --
> "Rien de grand ne s'est accompli dans le monde sans passion."
>
> (G.W.F. Hegel, philosophe Allemand)
>
>

Re: A noob question : the JDepend Ant task

Posted by Pierre Goupil <go...@gmail.com>.
Inline

2006/9/6, Peter Reilly <pe...@gmail.com>:
>
> It depends on eclipse.


I think so, too.


I do not use eclipse (tried to once or twice)
> but have some experience in netbeans and intelli idea.
>
> Both of these come with a bundled ant.


Eclipse too.


One has set
> set the ant path to your ant path, or add the  jdepend.jar
> file into the bundled ant lib directory.


None of these works, I'm afraid.


Using <typedef .../> will not work.


I've not tried. So I'll believe you. =)

Still a work in progress...


Pierre


-- 
"Rien de grand ne s'est accompli dans le monde sans passion."

(G.W.F. Hegel, philosophe Allemand)

Re: A noob question : the JDepend Ant task

Posted by Peter Reilly <pe...@gmail.com>.
It depends on eclipse.
I do not use eclipse (tried to once or twice)
but have some experience in netbeans and intelli idea.

Both of these come with a bundled ant. One has set
set the ant path to your ant path, or add the  jdepend.jar
file into the bundled ant lib directory.

Using <typedef .../> will not work.

Peter


On 9/6/06, Dominique Devienne <dd...@gmail.com> wrote:
>
> > I've tryied these unsuccessfully:
> >
> > -adding jdepend.jar to my eclipse build path
> > -setting ANT_HOME
> > -copying jdepend.jar to ~ant.home/lib/
>
> Try putting jdepend.jar in $ANT_HOME/lib, and nowhere else. This
> worked for me in the past. --DD
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: A noob question : the JDepend Ant task

Posted by Dominique Devienne <dd...@gmail.com>.
> I've tryied these unsuccessfully:
>
> -adding jdepend.jar to my eclipse build path
> -setting ANT_HOME
> -copying jdepend.jar to ~ant.home/lib/

Try putting jdepend.jar in $ANT_HOME/lib, and nowhere else. This
worked for me in the past. --DD

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