2001-06-01 04:43:03 +00:00
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2001-08-30 13:23:14 +00:00
2001-06-01 04:43:03 +00:00
< html >
< head >
2001-08-30 13:23:14 +00:00
< title > JDepend Task< / title >
2001-06-01 04:43:03 +00:00
< meta http-equiv = "Content-Type" content = "text/html; charset=iso-8859-1" >
< meta http-equiv = "Content-Language" content = "en-us" >
< / head >
2001-08-30 13:23:14 +00:00
2001-06-01 04:43:03 +00:00
< body >
2001-08-30 13:23:14 +00:00
< h2 > < a NAME = "JDepend" > < / a > JDepend< / h2 >
< h3 > Description< / h3 >
2001-06-01 04:43:03 +00:00
2001-08-30 13:23:14 +00:00
< P > Invokes the < a href = "http://www.clarkware.com/software/JDepend.html" > JDepend< / a > parser.< / P >
2001-06-01 04:43:03 +00:00
2001-09-08 01:05:18 +00:00
< P > This parser " traverses a set of Java source file directories and generates design quality metrics for each Java package" .
2001-10-16 10:12:23 +00:00
It allows to " automatically measure the quality of a design in terms of its extensibility, reusability, and maintainability to
2001-09-08 01:05:18 +00:00
effectively manage and control package dependencies." < / P >
2001-06-01 04:43:03 +00:00
2003-04-02 12:00:27 +00:00
< p > Source file directories are defined by nested
< code > < sourcespath> < / code > ; Class file directories are defined
by nested < code > < classesespath> < / code > , see < a
href="#nested">nested elements< / a > .< / p >
2001-06-01 04:43:03 +00:00
2001-08-30 13:23:14 +00:00
< p > Optionally, you can also set the < code > outputfile< / code > name where the output is stored. By default the task writes its report to the standard output.< / P >
2001-06-01 04:43:03 +00:00
2001-10-16 10:12:23 +00:00
< p > The task requires at least the JDepend 1.2 version. < / p >
2001-06-01 04:43:03 +00:00
2001-08-30 13:23:14 +00:00
< h3 > Parameters< / h3 >
< table BORDER = 1 CELLSPACING = 0 CELLPADDING = 2 >
< tr >
< td VALIGN = TOP > < b > Attribute< / b > < / td >
< td VALIGN = TOP > < b > Description< / b > < / td >
< td ALIGN = CENTER VALIGN = TOP > < b > Required< / b > < / td >
< / tr >
< tr >
< td VALIGN = TOP > outputfile< / td >
< td VALIGN = TOP > The output file name. If not set, the output is printed on the standard output.< / td >
< td ALIGN = CENTER VALIGN = TOP > No< / td >
< / tr >
2001-10-16 10:12:23 +00:00
< tr >
< td VALIGN = TOP > format< / td >
2002-02-03 21:26:18 +00:00
< td VALIGN = TOP > The format to write the output in. The default is "text", the alternative is "xml"< / td >
2001-10-16 10:12:23 +00:00
< td ALIGN = CENTER VALIGN = TOP > No< / td >
< / tr >
2001-08-30 13:23:14 +00:00
< tr >
< td VALIGN = TOP > fork< / td >
< td VALIGN = TOP > Run the tests in a separate VM.< / td >
< td ALIGN = CENTER VALIGN = TOP > No, default is "off"< / td >
< / tr >
< tr >
< td VALIGN = TOP > haltonerror< / td >
< td VALIGN = TOP > Stop the build process if an error occurs during the jdepend analysis.< / td >
< td ALIGN = CENTER VALIGN = TOP > No, default is "off"< / td >
< / tr >
< tr >
< td VALIGN = TOP > timeout< / td >
< td VALIGN = TOP > Cancel the operation if it doesn't finish in the given time (measured in milliseconds). (Ignored if fork is disabled.)< / td >
< td ALIGN = CENTER VALIGN = TOP > No< / td >
< / tr >
< tr >
< td VALIGN = TOP > jvm< / td >
< td VALIGN = TOP > The command used to invoke the Java Virtual Machine, default is 'java'. The command is resolved by java.lang.Runtime.exec(). (Ignored if fork is disabled.)< / td >
< td ALIGN = CENTER VALIGN = TOP > No, default "java"< / td >
< / tr >
< tr >
< td VALIGN = TOP > dir< / td >
< td VALIGN = TOP > The directory to invoke the VM in. (Ignored if fork is disabled)< / td >
< td ALIGN = CENTER VALIGN = TOP > No< / td >
< / tr >
2003-11-03 15:34:13 +00:00
< tr >
< td VALIGN = TOP > includeruntime< / td >
< td VALIGN = TOP > Implicitly add the classes required to run jdepend
in forked mode. (Ignored if fork is disabled). Since ant 1.6.< / td >
< td ALIGN = CENTER VALIGN = TOP > No, default is "no".< / td >
< / tr >
2001-08-30 13:23:14 +00:00
< tr >
< td VALIGN = TOP > classpathref< / td >
< td VALIGN = TOP > the classpath to use, given as reference to a PATH defined elsewhere.< / td >
< td ALIGN = CENTER VALIGN = TOP > No< / td >
< / tr >
2001-06-01 04:43:03 +00:00
< / table >
< h3 > < a name = "nested" > Nested Elements< / a > < / h3 >
2003-04-02 12:00:27 +00:00
< p > < code > jdepend< / code > supports four nested elements:
< code > < classpath> , < classespath> < / code > and
< code > < sourcespath> < / code > , that represent < a
href="../using.html#path">PATH like structures< / a > , and
< code > < exclude> < / code > .< / p >
< p > < code > < sourcespath> < / code > is used to define the paths of the
source code to analyze, but it is deprecated. With version 2.5 of
JDepend, only class files are analyzed. The nested element
< classespath> replaces < sourcespath> and is used to define
the paths of compiled class code to analyze; the < sourcespath>
variable is still available in case you are using an earlier version
of JDepend. The < exclude> element can be used to set packages
2003-04-03 15:49:48 +00:00
to ignore (requires JDepend 2.5 or above).< / p >
2001-06-01 04:43:03 +00:00
2001-08-30 13:23:14 +00:00
< h3 > Examples< / h3 >
2001-06-01 04:43:03 +00:00
< blockquote >
< pre >
2002-09-03 15:24:08 +00:00
< jdepend classpathref="base.path">
2003-04-02 12:00:27 +00:00
< classespath>
< pathelement location="build"/>
< /classespath>
2002-09-03 15:24:08 +00:00
< /jdepend>
2002-09-04 11:05:19 +00:00
2001-06-01 04:43:03 +00:00
< / pre >
< / blockquote >
2003-04-02 12:00:27 +00:00
< p > This invokes JDepend on the < code > build< / code > directory, writing
the output on the standard output. The classpath is defined using a
classpath reference.< / p >
2001-08-30 13:23:14 +00:00
2001-06-01 04:43:03 +00:00
< blockquote >
< pre >
2002-09-03 15:24:08 +00:00
< jdepend outputfile="docs/jdepend.xml" fork="yes" format="xml">
< sourcespath>
2002-09-04 11:05:19 +00:00
< pathelement location="src"/>
2002-09-03 15:24:08 +00:00
< /sourcespath>
< classpath>
2002-09-04 11:05:19 +00:00
< pathelement location="classes"/>
< pathelement location="lib/jdepend.jar"/>
2002-09-03 15:24:08 +00:00
< /classpath>
< /jdepend>
2003-04-02 12:00:27 +00:00
< / pre >
< / blockquote >
< p > This invokes JDepend in a separate VM on the < code > src< / code > and
< code > testsrc< / code > directories, writing the output to the
< code > < docs/jdepend.xml> < / code > file in xml format. The
classpath is defined using nested elements. < / p >
2002-09-04 11:05:19 +00:00
2003-04-02 12:00:27 +00:00
< blockquote >
< pre >
< jdepend classpathref="base.path">
< exclude name="java.*>
< exclude name="javax.*>
< classespath>
< pathelement location="build"/>
< /classespath>
< /jdepend>
2001-06-01 04:43:03 +00:00
< / pre >
2001-10-16 10:12:23 +00:00
< / blockquote >
2001-06-01 04:43:03 +00:00
2003-04-02 12:00:27 +00:00
< p > This invokes JDepend with the build directory as the base for class
files to analyze, and will ignore all classes in the java.* and
javax.* packages.< / p >
2001-08-30 13:23:14 +00:00
2001-06-01 04:43:03 +00:00
< hr >
2004-02-09 21:50:10 +00:00
< p align = "center" > Copyright © 2001-2004 The Apache Software Foundation. All rights
2002-01-10 08:48:33 +00:00
Reserved.< / p >
2001-06-01 04:43:03 +00:00
< / body >
< / html >
2001-08-30 13:23:14 +00:00