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
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
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
--- 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
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
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
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
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
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
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
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
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
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:
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.
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/
--- In jdepend@yahoogroups.com, Mike Clark <mike@c...> wrote:
Hi Mike,
Thank you for the quick response. Now I see where I was going wrong.
I had another look and there are other packages that are being
analyzed that have dependencies with my bridges.cma.util package.
These other packages were not part of my my constraint and this
appears to be why the dependency match was failing.
I am going to give it another go here. Once again thank you for your
help.
Cody
Both tests should pass because bridges.cma.view package uses the bridges.cma.util package but the reverse is not true. In both cases the the dependencyMatch returns false when it should only return false for testDependencyConstraint2().
I'll admit that I'm not happy with the way the DependencyConstraint class
turned out, but I'm not sure this is a bug.
The DependencyConstraint.dependencyMatch() will only return true if:
- The number of packages analyzed by JDepend equals the number of packages
added to the DependencyConstraint
and
- Every class in the DependencyConstraint must have a dependency graph
equal to an analyzed package of the same name
In other words, the graph of packages in the DependencyConstraint must exactly
match - in size and content - the graph of packages collected when jdepend.analyze()
is invoked. That is, if you analyze the entire project, then all the packages
must be specified in the constraint. You can of course narrow the analysis
to only two projects, but you must specify all of their dependencies in the
constraint. It's not ideal, I realize.
So, I'm guessing that your 'bridges.cma.util' and 'bridges.cma.view' packages
actually have other dependencies, other than on themselves. Looking at a
report would help figure this out. If this is the case, then dependencyMatch()
will always return false given your example DependencyConstraint.
I'm investigating other ways to design the DependencyConstraint class. Ideally,
if it fails you'd like to see a expected/actual graph of some form rather
than just a boolean return value. I'm open to opinions as to how this could
be made better. It's something I'd like to clean up in the next release.
Let me know if this makes any sense and whether it helps solve the mystery
of your situation.
Hi,
I am trying to run automated JUnit tests from ant to check package
dependencies. The tests I am trying to right are very similar to
the 'Dependency Constraint' test in the documentation. My test case
contains the following two tests,
public void testDependencyConstraint1()
{
//Step 1. Create new DependencyConstraint
DependencyConstraint constraint = new DependencyConstraint();
//Step 2. Add packages to the DependencyConstraint
JavaPackage CmaUtil = constraint.addPackage("bridges.cma.util");
JavaPackage CmaView = constraint.addPackage
("bridges.cma.view");
//Step 3. Set package Dependencies
CmaView.dependsUpon( CmaUtil );
//Step 4. Analyze
m_jdepend.analyze();
//Step 5. Perform assertions
// This should be true because bridges.cma.view package does
// use the bridges.cma.util package.
assertEquals( "Dependency mismatch", true,
m_jdepend.dependencyMatch( constraint ) );
}
public void testDependencyConstraint2()
{
//Step 1. Create new DependencyConstraint
DependencyConstraint constraint = new DependencyConstraint();
//Step 2. Add packages to the DependencyConstraint
JavaPackage CmaUtil = constraint.addPackage( "bridges.cma.util" );
JavaPackage CmaView = constraint.addPackage
("bridges.cma.view");
//Step 3. Set package Dependencies
CmaUtil.dependsUpon( CmaView );
//Step 4. Analyze
m_jdepend.analyze();
//Step 5. Perform assertions
// This should be false because bridges.cma.util package does
// not use the bridges.cma.view package.
assertEquals( "Dependency mismatch",false,
m_jdepend.dependencyMatch( constraint ) );
}
I initialise the m_jdepend in the setUp() method to parse my source
code,
m_jdepend.addDirectory( "./build/src/java" );
Both tests should pass because bridges.cma.view package uses the
bridges.cma.util package but the reverse is not true. In both cases
the the dependencyMatch returns false when it should only return
false for testDependencyConstraint2().
I have double checked the packages that are parsed after the analyze
() method( I iterated through the collection of packages and dumped
the package names) and the packages in my constraint are being
analyzed. Have I missed something or is this a bug? The example
looked fairly simple and I believe this should work
Thank You
Cody
Enter your vote today! A new poll has been created for the
jdepend group:
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?
o Do nothing; leave source-file analysis intact
o Show a deprecation warning for source-file analysis in the next version,
then remove it from the following version
o Remove source-file analysis completely from the next version (I don't use
it)
To vote, please visit the following web page:
http://groups.yahoo.com/group/jdepend/surveys?id=11029367
Note: Please do not reply to this message. Poll votes are
not collected via email. To vote, you must go to the Yahoo! Groups
web site listed above.
Thanks!
With the latest version of JDepend the following class results in the
errror 'Unable to identify class name in source file: xyz.java'
public class xyz implements abc { // ()
...
I'll look into fixing this in the next release if feasible.
A work-around is to analyze the class files, rather than the source files.
Class file analysis is generally more accurate, and I highly recommend that
route. Instead of pointing JDepend at source files, simply point it at the
class file directory. There are various combinations of source file formatting
that may confuse JDepend. The byte codes never lie. :-)
With the latest version of JDepend the following class results in the
errror 'Unable to identify class name in source file: xyz.java'
public class xyz implements abc { // ()
...
MfG Mirko
jpstroweis wrote:
>JDepend lists as efferent packages those packages
>whose classes are strongly referred by the classes
>of the package.
>
>Does it detect also weak references such as between a
>class and the implementations of an interface referred
>by the class? True it may be difficult to list the
>dynamically loaded classes via Class.forName .
>
>
If the class specifically references an implementation, then it's
detected. If only the interface is referenced, then it does not detect
any implementations.
>If no, I think it'd be a nice enhancement to detect and
>list the additional weak references in a separate list,
>without affecting the computation of Instability,
>of course.
>
>
How might that help you?
Mike
--
Mike Clark
Clarkware Consulting, Inc.
http://www.clarkware.com
Hello,
JDepend lists as efferent packages those packages
whose classes are strongly referred by the classes
of the package.
Does it detect also weak references such as between a
class and the implementations of an interface referred
by the class? True it may be difficult to list the
dynamically loaded classes via Class.forName .
If no, I think it'd be a nice enhancement to detect and
list the additional weak references in a separate list,
without affecting the computation of Instability,
of course.
Regards,
Jean-Pierre Stroweis <jpstroweis@...>
prioritytim wrote:
>In the documentation for JDepend, I see a reference to jdepend.xsl in:
>
><style basedir="docs" destdir="docs"
> includes="jdepend-report.xml" style="jdepend.xsl" />
>
Hi Tim,
The jdepend.xsl file is distributed with Ant 1.5 in the 'etc' directory.
I've refreshed the documentation to fully qualify the reference as:
<style basedir="docs" destdir="docs"
includes="jdepend-report.xml"
style="${ant.home}/etc/jdepend.xsl" />
Mike
--
Mike Clark
Clarkware Consulting Inc.
http://www.clarkware.com
(720) 851-2014
In the documentation for JDepend, I see a reference to jdepend.xsl in:
<style basedir="docs" destdir="docs"
includes="jdepend-report.xml" style="jdepend.xsl" />
I can't find the xsl file anywhere. Is this available? Can you send
me a copy?
Thanks,
Tim Bornholtz
Hi all,
I just received a note from a German user indicating that the
ClassFileParserTest was failing in his environment. It seems that
version of the compiler generates byte codes that return the imports in
a different order than expected. Not the wrong order, just a different
order. :-)
So I've refreshed the jdepend2.2.zip distribution to include a change to
use order-independent import tests. It's a better way all around, but
until receiving this feedback I'd never heard of the test failing.
You can grab the latest version at:
http://www.clarkware.com/software/jdepend2.2.zip
Let me know if you have ideas for making JDepend better!
Mike
--
Mike Clark
Clarkware Consulting, Inc.
http://www.clarkware.com
720.851.2014