|
Re: [jdepend] Problems with Ant/JDepend continued
On Nov 22, 2003, at 8:01 AM, Robert Saenger wrote:
> Hi,
> I'm new to jdepend. Tried it out and got the
> impression that we could benefit from using it in our
> project.
> However, if I do *NOT* put the jdepend library on the
> 'external' classpath, jdepend fails to do it's
> work. The problem with that is that I can not assume
> that other project members do have the jdepend
> extension on their classpath, e.g. included in ant's
> lib dir. Usually we deliver utility jars together with
> the project and add them to the project's classpath. I
> thought that this could be achieved
> by using the fork attribute and adding a classpath
> entry for the jdepend task. But it doesn't work.
In order for Ant to be able to execute a <jdepend> task, jdepend.jar
must be in either the system CLASSPATH or the $ANT_HOME/lib directory.
There are direct dependencies on JDepend's API in the <jdepend> task
code, and although they are not directly used in forked mode you still
get a NoClassDefFoundError.
In addition to Rob's excellent suggestion to use <available>, you could
use a <java> task to run JDepend instead of using a <jdepend> task.
Hope that helps.
Mike
|