I've just put together a patch for the JDepend task to use xml
output. A new
attribute "format" has been added that can take either "xml" or "text"
defaulting to the latter. �Appropriate changes have been made to the
documentation, and additionally a .xsl file is attached to
produce html with
a similar style to that of junitreport.
Submitted by: "Rob Oxspring" <roxspring@yahoo.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269796 13f79535-47bb-0310-9956-ffa450edef68
<P>Invokes the <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> parser.</P>
<P>This parser "traverses a set of Java source file directories and generates design quality metrics for each Java package".
It allows to "automatically measure the quality of a design in terms of its extensibility, reusability, and maintainability to
It allows to "automatically measure the quality of a design in terms of its extensibility, reusability, and maintainability to
effectively manage and control package dependencies."</P>
<p>Source file directories are defined by nested <code><sourcespath></code>, see <a href="#nested">nested elements</a>.</p>
<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>
<p> The task requires at least the JDepend 1.2 version. </p>
<p> The task requires at least the JDepend 1.2 version. </p>
<P>Note: whereas the JDepend tool can be customized to exclude some packages, the current jdepend And Task does not have parameters to allow these exclusions. Read JDepend specific documentation for that purpose.</P>
@@ -40,6 +40,11 @@ effectively manage and control package dependencies."</P>
<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>
<tr>
<td VALIGN=TOP>format</td>
<td VALIGN=TOP>The fomat to write the output in. The default is "text", the alternative is "xml"</td>
<td ALIGN=CENTER VALIGN=TOP>No</td>
</tr>
<tr>
<td VALIGN=TOP>fork</td>
<td VALIGN=TOP>Run the tests in a separate VM.</td>
@@ -74,8 +79,8 @@ effectively manage and control package dependencies."</P>
<h3><a name="nested">Nested Elements</a></h3>
<p><code>jdepend</code> supports two nested elements <code><classpath></code> and <code><sourcespath></code>,
that represent <a href="../using.html#path">PATH like structures</a>.</p>
<p><code>jdepend</code> supports two nested elements <code><classpath></code> and <code><sourcespath></code>,
that represent <a href="../using.html#path">PATH like structures</a>.</p>
<p><code><sourcespath></code> is used to define the paths of the source code to analyze.</p>
@@ -96,7 +101,7 @@ The classpath is defined using a classpath reference.
@@ -106,10 +111,10 @@ The classpath is defined using a classpath reference.
</classpath>
</jdepend>
</pre>
</blockquote>
</blockquote>
This invokes JDepend in a separate VM on the <code>src</code> and <code>testsrc</code> directories, writing the output in the <code><docs/jdepend.txt></code> file.
The classpath is defined using nested elements.
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.
<p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</p>
<p>The following explanations are for quick reference and are lifted directly from the original <a href="http://www.clarkware.com/software/JDepend.html">JDepend documentation</a>.</p>
<h3><a name="EXnumber">Number of Classes</a></h3>
<p>The number of concrete and abstract classes (and interfaces) in the package is an indicator of the extensibility of the package.</p>
<p>The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. </p>
<p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. </p>
<h3><a name="EXinstability">Instability</a></h3>
<p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the package's resilience to change. </p>
<p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely instable package. </p>
<h3><a name="EXdistance">Distance</a></h3>
<p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. </p>
<p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p>
<p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. </p>
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.