Search the web
Sign In
New User? Sign Up
jdepend
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 14 - 43 of 72   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#43 From: Mike Clark <mike@...>
Date: Thu Jan 22, 2004 5:08 pm
Subject: JDepend Article
clarkware
Offline Offline
Send Email Send Email
 
Glen Wilcox has written an in-depth ONJava article on JDepend:

      http://www.onjava.com/pub/a/onjava/2004/01/21/jdepend.html

Enjoy!

Mike

#42 From: Mike Clark <mike@...>
Date: Sat Nov 22, 2003 8:29 pm
Subject: Re: Problems with Ant/JDepend continued
clarkware
Offline Offline
Send Email Send Email
 
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

#41 From: "Rob Oxspring" <roxspring@...>
Date: Sat Nov 22, 2003 7:10 pm
Subject: Re: Problems with Ant/JDepend continued
ROxspring
Offline Offline
Send Email Send Email
 
The classic way to tackle this in ant is to use the <available> task in the
init target and then only run the jdepend target if the classes are present.
Something like the following in the init target:

<available property="jdepend.present"
classname="com.clarkware.jdepend.JDepend"/>
(guessing at the classname because I don't have an example to hand)

And then the jdepend target gains an extra attribute:

<target name="jdepend" depends="init" if="jdepend.present">
...
</target>


Of course this doesn't guarentee that jdepend will run for everyone, but
should mean that those without jdepend don't get a broken build.  Ant 1.6
"antlibs" should be able to be a little more creative but I've not
investigated properly yet.

Hope that helps,

Rob

----- Original Message -----
From: "Robert Saenger" <meinc@...>
To: <jdepend@yahoogroups.com>
Sent: Saturday, November 22, 2003 3:01 PM
Subject: [jdepend] Problems with Ant/JDepend continued


> 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.
>
> Instead I got the following error (I used verbose
> mode):
>
>
> C:\dev\projects\JJX\shared>ant -v jdepend
> Apache Ant version 1.5.3 compiled on April 16 2003
> Buildfile: build.xml
> Detected Java version: 1.4 in:
> C:\Java\j2sdk1.4.2_02\jre
> Detected OS: Windows XP
> parsing buildfile build.xml with URI =
> file:C:/dev/projects/JJX/shared/build.
> xml
> Project base dir set to: C:\dev\projects\JJX\shared
> Build sequence for target `jdepend' is [prerequisites,
> init, jdepend]
> Complete build sequence is [prerequisites, init,
> jdepend, clean, veryclean, real
> clean, generate, compile, declare, xgenerate, archive,
> jcsc, build-everything, p
> repare, makekey, dist-standalone-win, dist, wininst,
> installer, all, xviewcheck,
>  runxcnf, runxcnfplus, encrypt, run, test, runpro,
> allmostall, doc]
>
> prerequisites:
>
> init:
> Property ${site} has not been set
>  [property] Loading
> C:\dev\projects\JJX\shared\build.properties
>      [copy] index.html omitted as index.html is up to
> date.
>      [copy] xsl\category.xsl omitted as
> xsl/category.xsl is up to date.
>      [copy] xsl\class.xsl omitted as xsl/class.xsl is
> up to date.
>      [copy] xsl\overview.xsl omitted as
> xsl/overview.xsl is up to date.
>      [copy] xsl\package.xsl omitted as xsl/package.xsl
> is up to date.
>      [copy] xsl\packagelist.xsl omitted as
> xsl/packagelist.xsl is up to date.
>      [copy] xsl\rule.xsl omitted as xsl/rule.xsl is up
> to date.
>      [copy] xsl\severity.xsl omitted as
> xsl/severity.xsl is up to date.
> [dependset]
> C:\dev\projects\JJX\shared\gensrc\generic\dt\ui\build\impl\Action
> Impl.java is oldest target file
> [available] Found: gensrc\generic\dt\ui\build\UI.java
> [available] Found: .keystore
>
> jdepend:
>
> BUILD FAILED
> file:C:/dev/projects/JJX/shared/build.xml:835: Could
> not create task or type
> of type: jdepend.
>
> Ant could not find the task or a class this task
> relies upon.
>
> This is common and has a number of causes; the usual
> solutions are to read the manual pages then download
> and
> install needed JAR files, or fix the build file:
>  - You have misspelt 'jdepend'.
>    Fix: check your spelling.
>  - The task needs an external JAR file to execute
>    and this is not found at the right place in the
> classpath.
>    Fix: check the documentation for dependencies.
>    Fix: declare the task.
>  - The task is an Ant optional task and optional.jar
> is absent
>    Fix: look for optional.jar in ANT_HOME/lib,
> download if needed
>  - The task was not built into optional.jar as
> dependent
>    libraries were not found at build time.
>    Fix: look in the JAR to verify, then rebuild with
> the needed
>    libraries, or download a release version from
> apache.org
>  - The build file was written for a later version of
> Ant
>    Fix: upgrade to at least the latest release version
> of Ant
>  - The task is not an Ant core or optional task
>    and needs to be declared using <taskdef>.
>
> Remember that for JAR files to be visible to Ant tasks
> implemented
> in ANT_HOME/lib, the files must be in the same
> directory or on the
> classpath
>
> Please neither file bug reports on this problem, nor
> email the
> Ant mailing lists, until all of these causes have been
> explored,
> as this is not an Ant bug.
>         at
> org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownEleme
> nt.java:351)
>         at
> org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:26
> 7)
>         at
> org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.jav
> a:115)
>         at
> org.apache.tools.ant.Task.perform(Task.java:340)
>         at
> org.apache.tools.ant.Target.execute(Target.java:309)
>         at
> org.apache.tools.ant.Target.performTasks(Target.java:336)
>         at
> org.apache.tools.ant.Project.executeTarget(Project.java:1339)
>         at
> org.apache.tools.ant.Project.executeTargets(Project.java:1255)
>         at
> org.apache.tools.ant.Main.runBuild(Main.java:609)
>         at
> org.apache.tools.ant.Main.start(Main.java:196)
>         at
> org.apache.tools.ant.Main.main(Main.java:235)
>
> Total time: 1 second
> C:\dev\projects\JJX\shared>
>
>
> Ant file sniffet looks as follows:
>
>  <target name="jdepend" depends="init">
>     <jdepend fork="true" format="xml"
> outputfile="${basedir}/${docs.dir}/jdepend/report.xml">
> <!--
>       <classespath>
>         <pathelement location="${build.dir}" />
>       </classespath>
> -->
>       <sourcespath>
>         <pathelement location="${build.dir}" />
>       </sourcespath>
>       <classpath>
>         <pathelement location="${build.dir}"/>
>         <pathelement
> location="${lib.dir}/jdepend.jar"/>
>       </classpath>
>     </jdepend>
>     <style basedir="${basedir}/${docs.dir}/jdepend"
> destdir="${basedir}/${docs.dir}/jdepend"
>           includes="report.xml"
>           style="${ant.home}/etc/jdepend.xsl" />
>   </target>
>
>
> By the way, I'm certain that ${lib.dir}/jdepend.jar
> does EXIST!
>
> Did any one had the same problem or as an idea to
> tackle around. I also tried ant 1.5.4 and 1.6beta2
> with the same result.
>
> Thanks for any hint or help.
> -Robert
>
>
> PS: I recognized the new option -lib in ant 1.6beta2 which allows
> a caller of ant to specify additional jars on the command line.
> However, I did not find any means to express such a call
> inside the ant build file, which would gaive the writer of
> build files to include required knowledge of the build environment
> inside of the build file.
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> jdepend-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

#40 From: Robert Saenger <meinc@...>
Date: Sat Nov 22, 2003 3:01 pm
Subject: Problems with Ant/JDepend continued
robert_saenger
Offline Offline
Send Email Send Email
 
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.

Instead I got the following error (I used verbose
mode):


C:\dev\projects\JJX\shared>ant -v jdepend
Apache Ant version 1.5.3 compiled on April 16 2003
Buildfile: build.xml
Detected Java version: 1.4 in:
C:\Java\j2sdk1.4.2_02\jre
Detected OS: Windows XP
parsing buildfile build.xml with URI =
file:C:/dev/projects/JJX/shared/build.
xml
Project base dir set to: C:\dev\projects\JJX\shared
Build sequence for target `jdepend' is [prerequisites,
init, jdepend]
Complete build sequence is [prerequisites, init,
jdepend, clean, veryclean, real
clean, generate, compile, declare, xgenerate, archive,
jcsc, build-everything, p
repare, makekey, dist-standalone-win, dist, wininst,
installer, all, xviewcheck,
  runxcnf, runxcnfplus, encrypt, run, test, runpro,
allmostall, doc]

prerequisites:

init:
Property ${site} has not been set
  [property] Loading
C:\dev\projects\JJX\shared\build.properties
      [copy] index.html omitted as index.html is up to
date.
      [copy] xsl\category.xsl omitted as
xsl/category.xsl is up to date.
      [copy] xsl\class.xsl omitted as xsl/class.xsl is
up to date.
      [copy] xsl\overview.xsl omitted as
xsl/overview.xsl is up to date.
      [copy] xsl\package.xsl omitted as xsl/package.xsl
is up to date.
      [copy] xsl\packagelist.xsl omitted as
xsl/packagelist.xsl is up to date.
      [copy] xsl\rule.xsl omitted as xsl/rule.xsl is up
to date.
      [copy] xsl\severity.xsl omitted as
xsl/severity.xsl is up to date.
[dependset]
C:\dev\projects\JJX\shared\gensrc\generic\dt\ui\build\impl\Action
Impl.java is oldest target file
[available] Found: gensrc\generic\dt\ui\build\UI.java
[available] Found: .keystore

jdepend:

BUILD FAILED
file:C:/dev/projects/JJX/shared/build.xml:835: Could
not create task or type
of type: jdepend.

Ant could not find the task or a class this task
relies upon.

This is common and has a number of causes; the usual
solutions are to read the manual pages then download
and
install needed JAR files, or fix the build file:
  - You have misspelt 'jdepend'.
    Fix: check your spelling.
  - The task needs an external JAR file to execute
    and this is not found at the right place in the
classpath.
    Fix: check the documentation for dependencies.
    Fix: declare the task.
  - The task is an Ant optional task and optional.jar
is absent
    Fix: look for optional.jar in ANT_HOME/lib,
download if needed
  - The task was not built into optional.jar as
dependent
    libraries were not found at build time.
    Fix: look in the JAR to verify, then rebuild with
the needed
    libraries, or download a release version from
apache.org
  - The build file was written for a later version of
Ant
    Fix: upgrade to at least the latest release version
of Ant
  - The task is not an Ant core or optional task
    and needs to be declared using <taskdef>.

Remember that for JAR files to be visible to Ant tasks
implemented
in ANT_HOME/lib, the files must be in the same
directory or on the
classpath

Please neither file bug reports on this problem, nor
email the
Ant mailing lists, until all of these causes have been
explored,
as this is not an Ant bug.
         at
org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownEleme
nt.java:351)
         at
org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:26
7)
         at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.jav
a:115)
         at
org.apache.tools.ant.Task.perform(Task.java:340)
         at
org.apache.tools.ant.Target.execute(Target.java:309)
         at
org.apache.tools.ant.Target.performTasks(Target.java:336)
         at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
         at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
         at
org.apache.tools.ant.Main.runBuild(Main.java:609)
         at
org.apache.tools.ant.Main.start(Main.java:196)
         at
org.apache.tools.ant.Main.main(Main.java:235)

Total time: 1 second
C:\dev\projects\JJX\shared>


Ant file sniffet looks as follows:

  <target name="jdepend" depends="init">
     <jdepend fork="true" format="xml"
outputfile="${basedir}/${docs.dir}/jdepend/report.xml">
<!--
       <classespath>
         <pathelement location="${build.dir}" />
       </classespath>
-->
       <sourcespath>
         <pathelement location="${build.dir}" />
       </sourcespath>
       <classpath>
         <pathelement location="${build.dir}"/>
         <pathelement
location="${lib.dir}/jdepend.jar"/>
       </classpath>
     </jdepend>
     <style basedir="${basedir}/${docs.dir}/jdepend"
destdir="${basedir}/${docs.dir}/jdepend"
           includes="report.xml"
           style="${ant.home}/etc/jdepend.xsl" />
   </target>


By the way, I'm certain that ${lib.dir}/jdepend.jar
does EXIST!

Did any one had the same problem or as an idea to
tackle around. I also tried ant 1.5.4 and 1.6beta2
with the same result.

Thanks for any hint or help.
-Robert


PS: I recognized the new option -lib in ant 1.6beta2 which allows
a caller of ant to specify additional jars on the command line.
However, I did not find any means to express such a call
inside the ant build file, which would gaive the writer of
build files to include required knowledge of the build environment
inside of the build file.

#39 From: Mike Clark <mike@...>
Date: Wed Nov 5, 2003 4:40 pm
Subject: Re: jdepend ant problem
clarkware
Offline Offline
Send Email Send Email
 
On Nov 4, 2003, at 8:25 AM, Oliver Kießler wrote:

> hi there,
> i am trying to integrate jdepend in my ant build file and i have used
> the ant task <jdepend> with no success...
>
> this is the task i have been using:
>
> <target name="jdepend">
>     <jdepend outputfile="${xml.dir}/jdepend.xml" fork="yes"
> format="xml">
>     <sourcespath>
>         <pathelement location="${src.dir}"/>
>     </sourcespath>
>     <classpath>
>         <pathelement location="${build.classes.dir}"/>
>         <pathelement location="lib/jdepend.jar"/>
>     </classpath>
>     </jdepend>
> </target>
>
> Ant Version: 1.5.1 in Netbeans
>
> This is the error:
> build.xml [322] The <jdepend> task doesn't support nested text data.
>
> Does anyone know?
>

I'm unable to reproduce the error in Ant 1.5.3.  I'm not using
Netbeans.  I copied your Ant task and merely changed the directory
names, and I did not observe this error.

By the way, you'll want to point the <sourcespath> at a directory
containing class files rather than source files for the most accurate
analysis.

Regards,

Mike

#38 From: Oliver Kießler <okr@...>
Date: Tue Nov 4, 2003 3:25 pm
Subject: jdepend ant problem
okr@...
Send Email Send Email
 
hi there,
i am trying to integrate jdepend in my ant build file and i have used
the ant task <jdepend> with no success...

this is the task i have been using:

<target name="jdepend">
     <jdepend outputfile="${xml.dir}/jdepend.xml" fork="yes"
format="xml">
     <sourcespath>
         <pathelement location="${src.dir}"/>
     </sourcespath>
     <classpath>
         <pathelement location="${build.classes.dir}"/>
         <pathelement location="lib/jdepend.jar"/>
     </classpath>
     </jdepend>
</target>

Ant Version: 1.5.1 in Netbeans

This is the error:
build.xml [322] The <jdepend> task doesn't support nested text data.

Does anyone know?

thanks!

bye, oliver

#37 From: Anand Narasimhan <nanandn@...>
Date: Fri Aug 1, 2003 8:46 pm
Subject: Re: jdepend.properties
nanandn
Offline Offline
Send Email Send Email
 
Thanks
Anand

--- Mike Clark <mike@...> wrote:
> Anand Narasimhan wrote:
>
> > Hi Mike,
> >
> > Thanks for you explaination. I have one more
> question.
> > putting jdepend.properties file in the user's'
> home
> > directory is too restrictive. The reason is if I
> want
> > to run jdepend on two different source trees and I
> > want to be able to customize jdepend differently
> for
> > each tree, putting jdepend.properties under the
> homee
> > directory will not work the way I want it. What
> should
> > I do in this case. Ideally I would like to have
> > jdepend pick up jdepend.properties from the
> "classes"
> > directory or pass in as an option to JDepend.
> >
> > Is this possible?
> >
>
> Removing 'jdepend.properties' from your $HOME
> directory and running it
> as following should do what you want:
>
> <jdepend fork="true"
> outputfile="${output.dir}/${output.file}">
>      <sourcespath>
>          <pathelement location="${classes.dir}" />
>      </sourcespath>
>      <classpath>
>          <pathelement location="${classes.dir}" />
>      </classpath>
> </jdepend>
>
> Note that fork="true" causes the <classpath> to be
> used, and thus it
> will pick up 'jdepend.properties' from the 'classes'
> directory.
>
> Unfortunately there's no way to pass options in on
> the command line.
>
> Mike
>
> --
> Mike Clark
> http://clarkware.com
> (303) 589-3812
>
>


=====
____________________________________________________________

Anand Narasimhan
nanandn@...

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

#36 From: Mike Clark <mike@...>
Date: Fri Aug 1, 2003 7:40 pm
Subject: Re: jdepend.properties
clarkware
Offline Offline
Send Email Send Email
 
Anand Narasimhan wrote:

> Hi Mike,
>
> Thanks for you explaination. I have one more question.
> putting jdepend.properties file in the user's' home
> directory is too restrictive. The reason is if I want
> to run jdepend on two different source trees and I
> want to be able to customize jdepend differently for
> each tree, putting jdepend.properties under the homee
> directory will not work the way I want it. What should
> I do in this case. Ideally I would like to have
> jdepend pick up jdepend.properties from the "classes"
> directory or pass in as an option to JDepend.
>
> Is this possible?
>

Removing 'jdepend.properties' from your $HOME directory and running it
as following should do what you want:

<jdepend fork="true" outputfile="${output.dir}/${output.file}">
      <sourcespath>
          <pathelement location="${classes.dir}" />
      </sourcespath>
      <classpath>
          <pathelement location="${classes.dir}" />
      </classpath>
</jdepend>

Note that fork="true" causes the <classpath> to be used, and thus it
will pick up 'jdepend.properties' from the 'classes' directory.

Unfortunately there's no way to pass options in on the command line.

Mike

--
Mike Clark
http://clarkware.com
(303) 589-3812

#35 From: Anand Narasimhan <nanandn@...>
Date: Fri Aug 1, 2003 6:57 pm
Subject: Re: jdepend.properties
nanandn
Offline Offline
Send Email Send Email
 
Hi Mike,

Thanks for you explaination. I have one more question.
putting jdepend.properties file in the user's' home
directory is too restrictive. The reason is if I want
to run jdepend on two different source trees and I
want to be able to customize jdepend differently for
each tree, putting jdepend.properties under the homee
directory will not work the way I want it. What should
I do in this case. Ideally I would like to have
jdepend pick up jdepend.properties from the "classes"
directory or pass in as an option to JDepend.

Is this possible?

Thanks
Anand


--- Mike Clark <mike@...> wrote:
> Anand Narasimhan wrote:
>
> >
> > 1. what is the classpath tag used for. Setting it
> does not seem to
> > have any effect. For eg., JDepend manual says that
> you can customize
> > jdepend behavior by setting some properties in
> jdepend.properties in
> > the user's home directory or any directory in the
> classpath. If I put
> > jdepend.properties file in my home directory it
> works. But if I put it
> > in the "classes" directory which I set in the
> <classpath> the
> > customizations are not picked up.
> >
>
> The <classpath> element is used if the <jdepend>
> task is invoked with
> fork="true".  That is, the classpath is required
> when a spawned JVM is
> used to run JDepend.  By default, the <jdepend> task
> runs JDepend within
> the same JVM as Ant, so <classpath> isn't required.
> In this case, the
> 'jdepend.jar' file in $ANT_HOME/lib is used to run
> JDepend.
>
> If you have a 'jdepend.properties' file in your
> $HOME directory, then it
> will always be used rather than the
> 'jdepend.properties' file in your
> 'classes' directory or in the 'jdepend.jar' file.
> In other words, your
> $HOME directory version is always used be default.
>
> But I suspect the problem you're seeing is related
> to the fact that by
> default 'jdepend.jar' is being used to run JDepend,
> and your 'classes'
> directory is not.  You could use your 'classes'
> directory by setting
> fork="true" and then putting your 'classes'
> directory in the <classpath>
> element.  This would effectively cause 'jdepend.jar'
> to not be used to
> run JDepend.
>
> In general, if you want to customize JDepend, I
> recommend putting your
> customizations in $HOME/jdepend.properties.
>
> I realize this is confusing.  The Ant class loading
> strategy is complex,
>   and unfortunately I don't have a better solution.
> I also didn't write
> the JDepend Ant task, so this suggestion is based
> solely on my experience.
>
>  >
> > 2. I do not have jdepend.jar, xalan.jar under
> ANT_HOME/lib directory.
> > Can I use <classpath> to point to the location of
> jdepend.jar and
> > xalan.jar files?
> >
>
> You'll need jdepend.jar (at least) in $ANT_HOME/lib
> so that Ant can
> correctly evaluate the <jdepend> task.  The
> <classpath> element only
> applies to a spawned JVM.
>
> Hope that helps.
>
> Regards,
>
> Mike
>
> --
> Mike Clark
> http://clarkware.com
> (303) 589-3812
>
>


=====
____________________________________________________________

Anand Narasimhan
nanandn@...

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

#34 From: Mike Clark <mike@...>
Date: Fri Aug 1, 2003 5:21 pm
Subject: Re: jdepend.properties
clarkware
Offline Offline
Send Email Send Email
 
Anand Narasimhan wrote:

>
> 1. what is the classpath tag used for. Setting it does not seem to
> have any effect. For eg., JDepend manual says that you can customize
> jdepend behavior by setting some properties in jdepend.properties in
> the user's home directory or any directory in the classpath. If I put
> jdepend.properties file in my home directory it works. But if I put it
> in the "classes" directory which I set in the <classpath> the
> customizations are not picked up.
>

The <classpath> element is used if the <jdepend> task is invoked with
fork="true".  That is, the classpath is required when a spawned JVM is
used to run JDepend.  By default, the <jdepend> task runs JDepend within
the same JVM as Ant, so <classpath> isn't required.  In this case, the
'jdepend.jar' file in $ANT_HOME/lib is used to run JDepend.

If you have a 'jdepend.properties' file in your $HOME directory, then it
will always be used rather than the 'jdepend.properties' file in your
'classes' directory or in the 'jdepend.jar' file.  In other words, your
$HOME directory version is always used be default.

But I suspect the problem you're seeing is related to the fact that by
default 'jdepend.jar' is being used to run JDepend, and your 'classes'
directory is not.  You could use your 'classes' directory by setting
fork="true" and then putting your 'classes' directory in the <classpath>
element.  This would effectively cause 'jdepend.jar' to not be used to
run JDepend.

In general, if you want to customize JDepend, I recommend putting your
customizations in $HOME/jdepend.properties.

I realize this is confusing.  The Ant class loading strategy is complex,
   and unfortunately I don't have a better solution.  I also didn't write
the JDepend Ant task, so this suggestion is based solely on my experience.

  >
> 2. I do not have jdepend.jar, xalan.jar under ANT_HOME/lib directory.
> Can I use <classpath> to point to the location of jdepend.jar and
> xalan.jar files?
>

You'll need jdepend.jar (at least) in $ANT_HOME/lib so that Ant can
correctly evaluate the <jdepend> task.  The <classpath> element only
applies to a spawned JVM.

Hope that helps.

Regards,

Mike

--
Mike Clark
http://clarkware.com
(303) 589-3812

#33 From: "Anand Narasimhan" <nanandn@...>
Date: Thu Jul 31, 2003 7:22 pm
Subject: jdepend.properties
nanandn
Offline Offline
Send Email Send Email
 
Hi,

I am new to jdepend. I have a couple of questions related to running
jdepend using the ant task.

I have the following ant build file.

<project name="JDepend" default="jdepend" basedir=".">

     <!-- target to run JDepend -->
     <target name="jdepend">

         <!-- Run JDepend -->
         <jdepend format="xml" outputfile="docs/jdepend-report.xml">
             <sourcespath>
                 <pathelement location="classes"/>
             </sourcespath>
             <classpath>
                 <pathelement location="classes"/>
             </classpath>
         </jdepend>

         <!-- Style sheet for formatting the output -->
         <style basedir="." destdir="."
             includes="docs/jdepend-report.xml"
             style="${ant.home}/etc/jdepend.xsl"/>

     </target>

</project>

1. what is the classpath tag used for. Setting it does not seem to
have any effect. For eg., JDepend manual says that you can customize
jdepend behavior by setting some properties in jdepend.properties in
the user's home directory or any directory in the classpath. If I put
jdepend.properties file in my home directory it works. But if I put it
in the "classes" directory which I set in the <classpath> the
customizations are not picked up.

2. I do not have jdepend.jar, xalan.jar under ANT_HOME/lib directory.
Can I use <classpath> to point to the location of jdepend.jar and
xalan.jar files?

Thanks
Anand

#32 From: Mike Clark <mike@...>
Date: Fri Jul 11, 2003 5:48 pm
Subject: Re: unable to identify class name error
clarkware
Offline Offline
Send Email Send Email
 
Manju Anand wrote:
>
> I get this error for a few packages saying:
>
> Unable to identify class name in source file:
> "path name/abc.java"
>
> I tried the latest version of JDepend and it still gives me
  > the error. I use JDepend on source files directly. I did read
> the message where it says use class files instead. But is there
> a workaround other than using class files as it is not easy for
> me to get class files.
  >

Well, the _latest_ version of JDepend doesn't support source file
parsing.  :-)

The error you're observing is due to JDepend not being able to parse the
class name from the source file.  I suspect the class declaration is
formatted in a way that JDepend doesn't quite comprende.  For example,
it has trouble parsing multi-line class declarations.

You might try comparing those classes that don't parse correctly with
those that do, then reconciling the formatting.  Or you can privately
send me a copy of the class header and I'll suggest reformatting.

This is a prime example of why source-file parsing was deprecated.  So
you have source files, but can't generate class files?

>
> This is another error I get in the output of JDepend:
>
> --------------------------------------------------
> - Package: "package name"
> --------------------------------------------------
> No stats available: package referenced, but not analyzed.
>
> Why does this error occur? Is there any workaround it?
>

This message isn't necessarily an error.  It generally means that a
class references (e.g. imports) a package and that referenced package
wasn't analyzed.  That is, the package wasn't found in the analyzed
directory (or sub-directory), and therefore JDepend couldn't report on
the package's metrics.

The solution is to specify all directories that contain classes you want
JDepend to analyze, as in:

     java jdepend.textui.JDepend directory1 directory2 ...

Hope that helps.

Mike

--
Mike Clark
http://clarkware.com
(303) 589-3812

#31 From: "Manju Anand" <manju_a_27@...>
Date: Fri Jul 11, 2003 2:24 am
Subject: unable to identify class name error
manju_a_27
Offline Offline
Send Email Send Email
 
Hi there,

I get this error for a few packages saying:

Unable to identify class name in source file:
"path name/abc.java"

I tried the latest version of JDepend and it still gives me the
error. I use JDepend on source files directly. I did read the message
where it says use class files instead. But is there a workaround
other than using class files as it is not easy for me to get class
files.

This is another error I get in the output of JDepend:

--------------------------------------------------
- Package: "package name"
--------------------------------------------------
No stats available: package referenced, but not analyzed.

Why does this error occur? Is there any workaround it?

I appreciate any help in this regard.

Manju

#30 From: Mike Clark <mike@...>
Date: Thu Jun 12, 2003 2:13 am
Subject: Re: shell script to start jdepend under cygwin!
clarkware
Offline Offline
Send Email Send Email
 
Ralf Hauser wrote:
> Mike,
>
> Below a start script for cygwin users - maybe you want to put this on your
> website or include it into the distribution.
>

Thanks, Ralf!

Mike

#29 From: "Ralf Hauser" <ralfhauser@...>
Date: Wed Jun 11, 2003 1:29 pm
Subject: shell script to start jdepend under cygwin!
ralfhauser
Offline Offline
Send Email Send Email
 
Mike,

Below a start script for cygwin users - maybe you want to put this on your
website or include it into the distribution.

Regards

	 Ralf

-------------
#!/bin/sh
# $Id: jdepend,v 1.5 2003/06/11 12:10:59 ralf Exp $
echo see http://www.clarkware.com/software/JDepend.html#howtouse
export JDEPEND_HOME=$AJARS_U/jdepend-2.6/
CLASSPATH=$CLASSPATH:$JDEPEND_HOME/lib/jdepend.jar
export CLASSPATH=`cygpath -pw $CLASSPATH`
case "$1" in
   gui) shift;
	 java jdepend.swingui.JDepend $@

echo alternatively, you may want to use
http://www.clarkware.com/software/JDepend.html#ant;
               ;;
   text) shift;
	 java jdepend.textui.JDepend $@
               ;;
   xml) shift;
	 java jdepend.xmlui.JDepend $@
               ;;
   *) echo print some help and version info!
      echo if your output is empty, you might have used it on *.java instead
      echo of *.class files!
               ;;
esac

#28 From: "roman_dolgov" <roman_dolgov@...>
Date: Thu May 22, 2003 4:53 am
Subject: Re: JDepend extension
roman_dolgov
Offline Offline
Send Email Send Email
 
I have uploaded the file to file folder of this group.

thanks
Roman

--- In jdepend@yahoogroups.com, "mzeibig" <mzeibig@y...> wrote:
> --- In jdepend@yahoogroups.com, Roman Dolgov <roman_dolgov@y...>
wrote:
> >
> > I have uploaded zip to
> > ftp://sergey:speznaz@f...
> >
> > filename: JDepend-2.6GraphUI.zip
> > I hope it will work.
> >
> Can you write the complete ftp-url please.
> Or try to upload the file into the 'file'-folder of this group.
>
> MfG Mirko

#27 From: "mzeibig" <mzeibig@...>
Date: Wed May 14, 2003 8:23 am
Subject: Re: JDepend extension
mzeibig
Offline Offline
Send Email Send Email
 
--- In jdepend@yahoogroups.com, Roman Dolgov <roman_dolgov@y...> wrote:
>
> I have uploaded zip to
> ftp://sergey:speznaz@f...
>
> filename: JDepend-2.6GraphUI.zip
> I hope it will work.
>
Can you write the complete ftp-url please.
Or try to upload the file into the 'file'-folder of this group.

MfG Mirko

#26 From: Mike Clark <mike@...>
Date: Mon May 5, 2003 9:40 pm
Subject: Re: [Ant]JDepend Newbie
clarkware
Offline Offline
Send Email Send Email
 
Lopez, William wrote:

>Hello:
>
>I have defined an Ant task to use JDepend as follows:
>
><target name="synchWebDirs">
>
>    <jdepend outputfile="${build.base}/jdepend_web.xml" fork="yes"
>format="xml">
>      <sourcespath>
>         <pathelement location="${web.build.dir}/Servlet"/>
>      </sourcespath>
>      <classpath>
>        <pathelement location="${env.ANT_HOME}/lib/jdepend.jar"/>
>      </classpath>
>    </jdepend>
>
>  </target>
>
>
>The Servlet project/directory contains multiple packages:
>-com.xxx.servlet
>-com.xxx.servletAdapter
>-com.xxx.xml
>-com.xxx.xmlUpdate
>
>These packages are listed under the "Package" column (after xslt'd) in the
>"Summary" Section but under the "Packages" section under the corresponding
>package not all of the classes from those packages are listed. What am I not
>doing correctly to make all the class files visible to JDepend.
>
>

Could you perhaps send the results file and give examples of which
packages aren't appearing?

One potential gotcha is that <sourcespath> should be pointing to a
directory containing class files, not source files.  That element should
be renamed to <classespath>, and will if I ever get ahold of the source
and synched up with the Ant distribution schedule.

Regards,

Mike

--
Mike Clark
http://clarkware.com
(303) 589-3812

#25 From: Roman Dolgov <roman_dolgov@...>
Date: Tue Apr 22, 2003 10:36 pm
Subject: Re: JDepend extension
roman_dolgov
Offline Offline
Send Email Send Email
 
Silly me, didn't read fineprint on yahoo site -
"public sharing only available for premium members" -
and looks like I am not.

I have uploaded zip to
ftp://sergey:speznaz@ftp.ednaliu.com

filename: JDepend-2.6GraphUI.zip
I hope it will work.

thanks
Roman

--- Mike Clark <mike@...> wrote:
> roman_dolgov@... wrote:
>
> >Hi All,
> >
> >I've added module to JDepend which draws plot of
> package D scores and
> >highlights packages with problems like cyclic or
> distance (D') to big. I
> >have found it useful if you need fast identify
> problem packages and seeing
> >whole picture with you package structure without
> going into too much of
> >details. I putted code into the :
> >http://briefcase.yahoo.com/roman_dolgov  - folder
> "code.
> >
>
> Sounds interesting, Roman.  Unfortunately, the
> "code" folder seems to be
> empty, though it says there are 2 items in the
> folder.  Perhaps I'm
> missing something.
>
> Mike
>
> --
> Mike Clark
> http://clarkware.com
> (303) 589-3812
>
>
>
>


__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

#24 From: Mike Clark <mike@...>
Date: Tue Apr 22, 2003 9:05 pm
Subject: Re: JDepend extension
clarkware
Offline Offline
Send Email Send Email
 
roman_dolgov@... wrote:

>Hi All,
>
>I've added module to JDepend which draws plot of package D scores and
>highlights packages with problems like cyclic or distance (D') to big. I
>have found it useful if you need fast identify problem packages and seeing
>whole picture with you package structure without going into too much of
>details. I putted code into the :
>http://briefcase.yahoo.com/roman_dolgov  - folder "code.
>

Sounds interesting, Roman.  Unfortunately, the "code" folder seems to be
empty, though it says there are 2 items in the folder.  Perhaps I'm
missing something.

Mike

--
Mike Clark
http://clarkware.com
(303) 589-3812

#23 From: <roman_dolgov@...>
Date: Mon Apr 21, 2003 3:52 am
Subject: JDepend extension
roman_dolgov
Offline Offline
Send Email Send Email
 
Hi All,

I've added module to JDepend which draws plot of package D scores and
highlights packages with problems like cyclic or distance (D') to big. I
have found it useful if you need fast identify problem packages and seeing
whole picture with you package structure without going into too much of
details. I putted code into the :
http://briefcase.yahoo.com/roman_dolgov  - folder "code.
See NEW.txt for info how to run.
Feel free to use it if you need it.

thanks
Roman

#22 From: <roman_dolgov@...>
Date: Thu Apr 3, 2003 8:32 am
Subject: small JDepend addon
roman_dolgov
Offline Offline
Send Email Send Email
 
Hi Guys
 
Recently I was asked to provide list of all methods my application depends on and I couldn't find any free tool on iternet to do it.
So I decided to use JDepend and add some small module which provide such kind of list. I am not sure if its really usefull but
If anybody needs to do the same stuff here is jar with code
 
regards
Roman

#21 From: Xue-Feng Yang <just4look@...>
Date: Wed Apr 2, 2003 2:53 am
Subject: Re: a question for updating to 2.6
just4look@...
Send Email Send Email
 
Yeah, you are right. It works now.

Thank you very much,

Xue-Feng


  --- Mike Clark <mike@...> wrote: > Xue-Feng
Yang wrote:
>
> >Hi,
> >
> >I used jdepend 2.3 before. It worked perfect with
> my
> >ant build. When I updated to 2.6, the output xml
> file
> >only contains
> >
> ><?xml version="1.0"?>
> ><JDepend>
> >    <Packages>
> >
> >    </Package>
> ></JDepend>
> >
> >What is the problem?
> >
> >
>
> As of version 2.6, JDepend only analyzes class
> files.  I'm guessing
> you're attempting to analyze a directory containing
> source files.
>
> Mike
>
> --
> Mike Clark
> http://clarkware.com
> (303) 589-3812
>
>
>
>

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

#20 From: Mike Clark <mike@...>
Date: Wed Apr 2, 2003 1:38 am
Subject: Re: a question for updating to 2.6
clarkware
Offline Offline
Send Email Send Email
 
Xue-Feng Yang wrote:

>Hi,
>
>I used jdepend 2.3 before. It worked perfect with my
>ant build. When I updated to 2.6, the output xml file
>only contains
>
><?xml version="1.0"?>
><JDepend>
>    <Packages>
>
>    </Package>
></JDepend>
>
>What is the problem?
>
>

As of version 2.6, JDepend only analyzes class files.  I'm guessing
you're attempting to analyze a directory containing source files.

Mike

--
Mike Clark
http://clarkware.com
(303) 589-3812

#19 From: Xue-Feng Yang <just4look@...>
Date: Wed Apr 2, 2003 1:35 am
Subject: a question for updating to 2.6
just4look@...
Send Email Send Email
 
Hi,

I used jdepend 2.3 before. It worked perfect with my
ant build. When I updated to 2.6, the output xml file
only contains

<?xml version="1.0"?>
<JDepend>
     <Packages>

     </Package>
</JDepend>

What is the problem?

Thanks.


______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

#18 From: "Scott Stirling" <scottstirling@...>
Date: Fri Feb 21, 2003 2:30 am
Subject: RE: JDepend 2.6
jrun5
Offline Offline
Send Email Send Email
 
Nice one, Mike!  Excellent new feature.  Thank you.

Scott Stirling

> -----Original Message-----
> From: Mike Clark [mailto:mike@...]
> Sent: Thursday, February 20, 2003 10:41 AM
> To: jdepend@yahoogroups.com
> Subject: [jdepend] JDepend 2.6
>
>
> JDepend 2.6 analyzes classes found in .jar, .war, and .zip files.
>
>     http://www.clarkware.com/software/jdepend-2.6.zip
>
> Enjoy!
>
> Mike

#17 From: Mike Clark <mike@...>
Date: Thu Feb 20, 2003 3:40 pm
Subject: JDepend 2.6
clarkware
Offline Offline
Send Email Send Email
 
JDepend 2.6 analyzes classes found in .jar, .war, and .zip files.

     http://www.clarkware.com/software/jdepend-2.6.zip

Enjoy!

Mike

--
Mike Clark
http://clarkware.com
(720) 851-2014

#16 From: Mike Clark <mike@...>
Date: Mon Feb 17, 2003 3:01 pm
Subject: JDepend 2.5
clarkware
Offline Offline
Send Email Send Email
 
JDepend 2.5 is now available at...

     http://www.clarkware.com/software/JDepend.html


New features include:

- Added setFilter() method to all JDepend class variants to support new
JDepend Ant task which includes an element for excluding packages.
Thanks to Bob Hays for updating the Ant task!

- Added JavaClass.getSourceFile() method which returns the name of the
source file from which the analyzed class file was generated. The name
of the source file is only printed in the XML UI for use by external
tools (e.g. Maven). Source files must be compiled with debug information
(e.g. -g or -g:source), otherwise "Unknown" is returned. Thanks to Ben
Walding for contributing this code!

- Source-file analysis is no longer an option.

-  Inner classes are now analyzed by default. To disable analyzing inner
classes, set the 'analyzeInnerClasses' property to 'false' in the
jdepend.properties file.


Enjoy!

Mike

--
Mike Clark
http://clarkware.com
(720) 851-2014

#15 From: Mike Clark <mike@...>
Date: Wed Feb 5, 2003 11:57 pm
Subject: JDepend 2.4
clarkware
Offline Offline
Send Email Send Email
 
Hi All,

I'm slowly starting to chip away at a queue of new features.  Whenever I have a few significant changes, I'll drop a new version.  This time around, I added one new feature and deprecated one old "feature":
- Based on the results of the poll, source-file analysis is now deprecated.  If JDepend runs across a .java file during analysis, you'll see a deprecation warning printed to standard error.  It only happens the first time a source file is noticed during any particular run.  Please start pointing JDepend at directories containing class files to ensure the best results.  In the next version, source-file analysis won't be an option.
- The new feature is a request Bob Martin made a while back.  Sometimes you have packages that are not subject to change, such as java.lang, that you'd like always to fall directly on the main sequence.  Now you can preset a volatility (V) value on a package-by-package basis, either programmatically or using the jdepend.properties file.  More info on this feature is available at <http://www.clarkware.com/software/JDepend.html#customize>.
The latest version containing these changes is available at:
  
    http://www.clarkware.com/software/JDepend.html

In the next version, I hope to take a closer look at cycle detection and make the DependencyConstraint a bit more usable.  And now that class-file analysis is destined to be the only way, supporting jar and zip files is also something I'm planning to get in real soon now.  Also, the folks at Maven submitted an excellent request (along with source code!) to report the source file name corresponding to the class file.  That would allow you to cross-reference the classes (and inner classes) back to their source file.

Enjoy!

Mike
-- Mike Clark
http://clarkware.com
(720) 851-2014

#14 From: jdepend@yahoogroups.com
Date: Thu Feb 6, 2003 12:01 am
Subject: Poll results for jdepend
jdepend@yahoogroups.com
Send Email Send Email
 
The following jdepend poll is now closed.  Here are the
final results:


POLL QUESTION: JDepend currently supports both source
file and class file analysis. Depending
on the contents of the directories
analyzed, it transparently uses the
appropriate type of analyzer.

The class file analyzer wasn't developed
until version 2.0.  In general, it is
much more accurate as it isn't affected
by source file formatting styles. There
are documented limitations to source
file analysis that frequently get filed
as bug reports.  In response, I'm
considering removing support for source
file analysis to avoid confusion and
always ensure the most accurate
reporting.  Your feedback is appreciated.

Which of the following approaches would
you prefer?


CHOICES AND RESULTS
- Show a deprecation warning for source-file analysis in the next version, then
remove it from the following version, 6 votes, 60.00%
- Remove source-file analysis completely from the next version (I don't use it),
3 votes, 30.00%
- Do nothing; leave source-file analysis intact, 1 votes, 10.00%



For more information about this group, please visit
http://groups.yahoo.com/group/jdepend

For help with Yahoo! Groups, please visit
http://help.yahoo.com/help/us/groups/

Messages 14 - 43 of 72   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help