| @@ -22,7 +22,7 @@ | |||||
| --> | --> | ||||
| <xsl:output method="html" indent="yes" encoding="US-ASCII"/> | <xsl:output method="html" indent="yes" encoding="US-ASCII"/> | ||||
| <xsl:decimal-format decimal-separator="." grouping-separator=","/> | |||||
| <xsl:decimal-format decimal-separator="." grouping-separator="," /> | |||||
| <xsl:param name="output.dir" select="'.'"/> | <xsl:param name="output.dir" select="'.'"/> | ||||
| <xsl:param name="basedir" select="'.'"/> | <xsl:param name="basedir" select="'.'"/> | ||||
| @@ -43,7 +43,7 @@ | |||||
| <xsl:call-template name="sorted.css"/> | <xsl:call-template name="sorted.css"/> | ||||
| </redirect:write> | </redirect:write> | ||||
| <!-- create the switch.js for collapsing the data --> | |||||
| <!-- create the switch.js for collepsing the data --> | |||||
| <redirect:write file="{$output.dir}/switch.js"> | <redirect:write file="{$output.dir}/switch.js"> | ||||
| <xsl:call-template name="switch.js"/> | <xsl:call-template name="switch.js"/> | ||||
| </redirect:write> | </redirect:write> | ||||
| @@ -76,15 +76,15 @@ | |||||
| <!-- | <!-- | ||||
| Key for detecting duplicate CheckModules | |||||
| Key for detecting duplicate CheckModules | |||||
| --> | --> | ||||
| <xsl:key name="module" match="file/error" use="@source"/> | <xsl:key name="module" match="file/error" use="@source"/> | ||||
| <!-- | <!-- | ||||
| Generates the navigation bar. | |||||
| --> | |||||
| Generates the navagation bar. | |||||
| --> | |||||
| <xsl:template match="checkstyle" mode="navigation"> | <xsl:template match="checkstyle" mode="navigation"> | ||||
| <ul id="navigation"> | <ul id="navigation"> | ||||
| <xsl:for-each select="file/error[generate-id() = generate-id(key('module',@source))]"> | <xsl:for-each select="file/error[generate-id() = generate-id(key('module',@source))]"> | ||||
| @@ -100,13 +100,13 @@ | |||||
| </a></li> | </a></li> | ||||
| </xsl:for-each> | </xsl:for-each> | ||||
| </ul> | </ul> | ||||
| </xsl:template> | |||||
| </xsl:template> | |||||
| <!-- | <!-- | ||||
| Generates the data part. | Generates the data part. | ||||
| --> | |||||
| --> | |||||
| <xsl:template match="checkstyle" mode="data"> | <xsl:template match="checkstyle" mode="data"> | ||||
| <div id="content"> | <div id="content"> | ||||
| <xsl:for-each select="file/error[generate-id() = generate-id(key('module',@source))]"> | <xsl:for-each select="file/error[generate-id() = generate-id(key('module',@source))]"> | ||||
| @@ -120,13 +120,13 @@ | |||||
| </div> | </div> | ||||
| </xsl:for-each> | </xsl:for-each> | ||||
| </div> | </div> | ||||
| </xsl:template> | |||||
| </xsl:template> | |||||
| <!-- | <!-- | ||||
| Generates the content table for the given check module. | Generates the content table for the given check module. | ||||
| @param filter full qualified module name | |||||
| @param filter full qualified module name | |||||
| --> | --> | ||||
| <xsl:template name="data"> | <xsl:template name="data"> | ||||
| <xsl:param name="filter"/> | <xsl:param name="filter"/> | ||||
| @@ -157,7 +157,7 @@ | |||||
| Generates the data rows for the current check module. | Generates the data rows for the current check module. | ||||
| Ignores errors in the current file from other modules. | Ignores errors in the current file from other modules. | ||||
| @param node the file with the errors | @param node the file with the errors | ||||
| @param filter full qualified module name | |||||
| @param filter full qualified module name | |||||
| --> | --> | ||||
| <xsl:template name="data-rows"> | <xsl:template name="data-rows"> | ||||
| <xsl:param name="node"/> | <xsl:param name="node"/> | ||||
| @@ -180,68 +180,68 @@ | |||||
| <!-- | |||||
| <!-- | |||||
| Generates the CSS with the layout instructions. | Generates the CSS with the layout instructions. | ||||
| Generated so this XSL is the single source of the whole report. | Generated so this XSL is the single source of the whole report. | ||||
| --> | --> | ||||
| <xsl:template name="sorted.css"> | <xsl:template name="sorted.css"> | ||||
| body { | |||||
| body { | |||||
| font:normal 80% arial,helvetica,sanserif; | font:normal 80% arial,helvetica,sanserif; | ||||
| color: black; | |||||
| background-color: white; | |||||
| margin: 0; | |||||
| padding: 1em; | |||||
| color: black; | |||||
| background-color: white; | |||||
| margin: 0; | |||||
| padding: 1em; | |||||
| min-width: 41em; | min-width: 41em; | ||||
| } | |||||
| h1 { | |||||
| } | |||||
| h1 { | |||||
| font-weight:bold; | font-weight:bold; | ||||
| font-size:140%; | font-size:140%; | ||||
| margin: 0 0 0.7em; | |||||
| padding: 0.3em; | |||||
| text-align: center; | |||||
| background-color: #eee; | |||||
| border: 2px ridge silver; | |||||
| } | |||||
| html<xsl:text disable-output-escaping="yes">></xsl:text>body h1 { | |||||
| margin: 0 0 0.7em; | |||||
| padding: 0.3em; | |||||
| text-align: center; | |||||
| background-color: #eee; | |||||
| border: 2px ridge silver; | |||||
| } | |||||
| html<xsl:text disable-output-escaping="yes">></xsl:text>body h1 { | |||||
| border-color: gray; | border-color: gray; | ||||
| } | |||||
| ul#navigation { | |||||
| font-size: 0.83em; | |||||
| float: left; width: 18em; | |||||
| margin: 0 0 1.2em; padding: 0; | |||||
| border: 1px dashed silver; | |||||
| } | |||||
| ul#navigation li { | |||||
| list-style: none; | |||||
| margin: 0; padding: 0.2em; | |||||
| } | |||||
| ul#navigation a { | |||||
| display: block; | |||||
| padding: 0.2em; | |||||
| font-weight: bold; | |||||
| } | |||||
| ul#navigation a:link { | |||||
| color: black; background-color: #eee; | |||||
| } | |||||
| ul#navigation a:visited { | |||||
| color: #666; background-color: #eee; | |||||
| } | |||||
| ul#navigation a:hover { | |||||
| color: red; background-color: white; | |||||
| } | |||||
| ul#navigation a:active { | |||||
| color: white; background-color: gray; | |||||
| } | } | ||||
| ul#navigation { | |||||
| font-size: 0.83em; | |||||
| float: left; width: 18em; | |||||
| margin: 0 0 1.2em; padding: 0; | |||||
| border: 1px dashed silver; | |||||
| } | |||||
| ul#navigation li { | |||||
| list-style: none; | |||||
| margin: 0; padding: 0.2em; | |||||
| } | |||||
| ul#navigation a { | |||||
| display: block; | |||||
| padding: 0.2em; | |||||
| font-weight: bold; | |||||
| } | |||||
| ul#navigation a:link { | |||||
| color: black; background-color: #eee; | |||||
| } | |||||
| ul#navigation a:visited { | |||||
| color: #666; background-color: #eee; | |||||
| } | |||||
| ul#navigation a:hover { | |||||
| color: red; background-color: white; | |||||
| } | |||||
| ul#navigation a:active { | |||||
| color: white; background-color: gray; | |||||
| } | |||||
| div#content { | |||||
| margin: 0 1em 1em 16em; | |||||
| padding: 0 1em; | |||||
| } | |||||
| * html div#content { | |||||
| height: 1em; /* Workaround 3-Pixel-Bug of Internet Explorers */ | |||||
| } | |||||
| div#content h2 { | |||||
| div#content { | |||||
| margin: 0 1em 1em 16em; | |||||
| padding: 0 1em; | |||||
| } | |||||
| * html div#content { | |||||
| height: 1em; /* Workaround 3-Pixel-Bug of Internet Explorers */ | |||||
| } | |||||
| div#content h2 { | |||||
| font-size:100%; | font-size:100%; | ||||
| font-weight:bold; | font-weight:bold; | ||||
| background: #525D76; | background: #525D76; | ||||
| @@ -251,11 +251,11 @@ | |||||
| margin-right: 2px; | margin-right: 2px; | ||||
| margin-left: 2px; | margin-left: 2px; | ||||
| margin-bottom: 0; | margin-bottom: 0; | ||||
| } | |||||
| div#content p { | |||||
| font-size: 1em; | |||||
| margin: 1em 0; | |||||
| } | |||||
| } | |||||
| div#content p { | |||||
| font-size: 1em; | |||||
| margin: 1em 0; | |||||
| } | |||||
| table { | table { | ||||
| width:100%; | width:100%; | ||||
| border-collapse:collapse; | border-collapse:collapse; | ||||
| @@ -275,62 +275,62 @@ | |||||
| table tr:nth-child(even) td { | table tr:nth-child(even) td { | ||||
| background: #fff; | background: #fff; | ||||
| } | } | ||||
| </xsl:template> | |||||
| </xsl:template> | |||||
| <!-- | |||||
| Generates the JavaScript for the dynamic style. | |||||
| <!-- | |||||
| Generates the JavaScript for the dynamic style. | |||||
| Generated so this XSL is the single source of the whole report. | Generated so this XSL is the single source of the whole report. | ||||
| --> | --> | ||||
| <xsl:template name="switch.js"> | <xsl:template name="switch.js"> | ||||
| /* | |||||
| /* | |||||
| * Hides all "hideable" div-containers | * Hides all "hideable" div-containers | ||||
| */ | */ | ||||
| function hideAll() { | function hideAll() { | ||||
| allElements = document.getElementsByTagName("div"); | allElements = document.getElementsByTagName("div"); | ||||
| for (i = 0; i <xsl:text disable-output-escaping="yes"><</xsl:text> allElements.length; i++) { | |||||
| if (allElements[i].className=="hideable") { | |||||
| allElements[i].style.display="none"; | |||||
| } | |||||
| } | |||||
| return; | |||||
| } | |||||
| /* | |||||
| for (i = 0; i <xsl:text disable-output-escaping="yes"><</xsl:text> allElements.length; i++) { | |||||
| if (allElements[i].className=="hideable") { | |||||
| allElements[i].style.display="none"; | |||||
| } | |||||
| } | |||||
| return; | |||||
| } | |||||
| /* | |||||
| * Shows one div-container and hides the other. | * Shows one div-container and hides the other. | ||||
| * @param id id of the element to show | * @param id id of the element to show | ||||
| */ | */ | ||||
| function change(id) { | |||||
| hideAll(); | |||||
| e = document.getElementById(id); | |||||
| if (e.style.display=="none") { | |||||
| e.style.display=""; | |||||
| } | |||||
| window.scrollTo(0, 0); | |||||
| return; | |||||
| } | |||||
| /* | |||||
| function change(id) { | |||||
| hideAll(); | |||||
| e = document.getElementById(id); | |||||
| if (e.style.display=="none") { | |||||
| e.style.display=""; | |||||
| } | |||||
| window.scrollTo(0, 0); | |||||
| return; | |||||
| } | |||||
| /* | |||||
| * Shows only the first data row. | * Shows only the first data row. | ||||
| * Used in body:onload so the user could directly see some messages. | * Used in body:onload so the user could directly see some messages. | ||||
| */ | */ | ||||
| function openFirst() { | function openFirst() { | ||||
| hideAll(); | hideAll(); | ||||
| for (i = 0; i <xsl:text disable-output-escaping="yes"><</xsl:text> allElements.length; i++) { | |||||
| if (allElements[i].className=="hideable") { | |||||
| for (i = 0; i <xsl:text disable-output-escaping="yes"><</xsl:text> allElements.length; i++) { | |||||
| if (allElements[i].className=="hideable") { | |||||
| allElements[i].style.display=""; | allElements[i].style.display=""; | ||||
| return; | |||||
| } | |||||
| } | |||||
| return; | |||||
| return; | |||||
| } | |||||
| } | |||||
| return; | |||||
| } | } | ||||
| </xsl:template> | </xsl:template> | ||||
| <!-- | <!-- | ||||
| Calculates the index of the last occurrence of a substring in a string. | |||||
| Calculates the index of the last occurence of a substring in a string. | |||||
| @param txt the whole string in which to search | @param txt the whole string in which to search | ||||
| @delimiter the substring to search | @delimiter the substring to search | ||||
| --> | --> | ||||
| @@ -19,7 +19,7 @@ | |||||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| See the License for the specific language governing permissions and | See the License for the specific language governing permissions and | ||||
| limitations under the License. | limitations under the License. | ||||
| --> | --> | ||||
| <!-- | <!-- | ||||
| @@ -271,7 +271,7 @@ | |||||
| </xsl:if> | </xsl:if> | ||||
| <xsl:for-each select="UsedBy/Package"> | <xsl:for-each select="UsedBy/Package"> | ||||
| <a> | <a> | ||||
| <xsl:attribute name="href">overview-packages.html#PK<xsl:value-of select="node()"/></xsl:attribute> | |||||
| <xsl:attribute name="href">overview-packages.html#PK<xsl:value-of select="node()"/></xsl:attribute> | |||||
| <xsl:value-of select="node()"/> | <xsl:value-of select="node()"/> | ||||
| </a><br/> | </a><br/> | ||||
| </xsl:for-each> | </xsl:for-each> | ||||
| @@ -282,7 +282,7 @@ | |||||
| </xsl:if> | </xsl:if> | ||||
| <xsl:for-each select="DependsUpon/Package"> | <xsl:for-each select="DependsUpon/Package"> | ||||
| <a> | <a> | ||||
| <xsl:attribute name="href">overview-packages.html#PK<xsl:value-of select="node()"/></xsl:attribute> | |||||
| <xsl:attribute name="href">overview-packages.html#PK<xsl:value-of select="node()"/></xsl:attribute> | |||||
| <xsl:value-of select="node()"/> | <xsl:value-of select="node()"/> | ||||
| </a><br/> | </a><br/> | ||||
| </xsl:for-each> | </xsl:for-each> | ||||
| @@ -325,7 +325,7 @@ | |||||
| </td></tr></table> --> | </td></tr></table> --> | ||||
| <xsl:if test="count(Cycles/Package) = 0"> | <xsl:if test="count(Cycles/Package) = 0"> | ||||
| <p>There are no cyclic dependencies.</p> | |||||
| <p>There are no cyclic dependancies.</p> | |||||
| </xsl:if> | </xsl:if> | ||||
| <xsl:for-each select="Cycles/Package"> | <xsl:for-each select="Cycles/Package"> | ||||
| <h3><a><xsl:attribute name="name">#CY<xsl:value-of select="@Name"/></xsl:attribute><xsl:value-of select="@Name"/></a></h3><p> | <h3><a><xsl:attribute name="name">#CY<xsl:value-of select="@Name"/></xsl:attribute><xsl:value-of select="@Name"/></a></h3><p> | ||||
| @@ -373,10 +373,10 @@ | |||||
| <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> | <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> | <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 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 unstable package. </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> | <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>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 unstable (x=1, y=0). </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> | <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> | ||||
| </body> | </body> | ||||
| @@ -416,7 +416,7 @@ Creates an html file that contains a link to all package links in overview-packa | |||||
| <xsl:template match="JDepend/Packages/Package" mode="all.packages.link"> | <xsl:template match="JDepend/Packages/Package" mode="all.packages.link"> | ||||
| <tr> | <tr> | ||||
| <td nowrap="nowrap"> | <td nowrap="nowrap"> | ||||
| <a href="overview-packages.html#PK{@name}" target="classFrame"> | |||||
| <a href="overview-packages.html#PK{@name}" target="classFrame"> | |||||
| <xsl:value-of select="@name"/> | <xsl:value-of select="@name"/> | ||||
| </a> | </a> | ||||
| </td> | </td> | ||||
| @@ -465,7 +465,7 @@ Creates an html file that contains a link to all package links in overview-cycle | |||||
| <xsl:template match="JDepend/Cycles/Package" mode="all.cycles"> | <xsl:template match="JDepend/Cycles/Package" mode="all.cycles"> | ||||
| <tr> | <tr> | ||||
| <td nowrap="nowrap"> | <td nowrap="nowrap"> | ||||
| <a href="overview-cycles.html#CY{@Name}" target="classFrame"><xsl:value-of select="@Name"/></a> | |||||
| <a href="overview-cycles.html#CY{@Name}" target="classFrame"><xsl:value-of select="@Name"/></a> | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| </xsl:template> | </xsl:template> | ||||
| @@ -476,7 +476,7 @@ Creates an html file that contains a link to all package links in overview-cycle | |||||
| <table width="100%"> | <table width="100%"> | ||||
| <tr> | <tr> | ||||
| <td align="left"></td> | <td align="left"></td> | ||||
| <td 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>.</td> | |||||
| <td 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>.</td> | |||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <hr size="1"/> | <hr size="1"/> | ||||
| @@ -18,13 +18,13 @@ | |||||
| limitations under the License. | limitations under the License. | ||||
| --> | --> | ||||
| <xsl:output method="html" indent="yes" encoding="US-ASCII"/> | |||||
| <xsl:output method="html" indent="yes" encoding="US-ASCII"/> | |||||
| <xsl:template match="JDepend"> | <xsl:template match="JDepend"> | ||||
| <html> | <html> | ||||
| <head> | <head> | ||||
| <title>JDepend Analysis</title> | <title>JDepend Analysis</title> | ||||
| <style type="text/css"> | <style type="text/css"> | ||||
| body { | body { | ||||
| font:normal 68% verdana,arial,helvetica; | font:normal 68% verdana,arial,helvetica; | ||||
| @@ -41,7 +41,7 @@ | |||||
| table.details tr td{ | table.details tr td{ | ||||
| background:#eeeee0; | background:#eeeee0; | ||||
| } | } | ||||
| p { | p { | ||||
| line-height:1.5em; | line-height:1.5em; | ||||
| margin-top:0.5em; margin-bottom:1.0em; | margin-top:0.5em; margin-bottom:1.0em; | ||||
| @@ -76,21 +76,22 @@ | |||||
| text-align:right; | text-align:right; | ||||
| } | } | ||||
| </style> | </style> | ||||
| </head> | </head> | ||||
| <body> | <body> | ||||
| <!--h1>JDepend Report</h1> | <!--h1>JDepend Report</h1> | ||||
| <ul> | <ul> | ||||
| <xsl:for-each select="./Packages/Package"> | <xsl:for-each select="./Packages/Package"> | ||||
| <xsl:sort select="@name"/> | |||||
| <xsl:sort select="@name"/> | |||||
| <li><xsl:value-of select="@name"/></li> | <li><xsl:value-of select="@name"/></li> | ||||
| </xsl:for-each> | </xsl:for-each> | ||||
| </ul--> | </ul--> | ||||
| <h1><a name="top">JDepend Analysis</a></h1> | <h1><a name="top">JDepend Analysis</a></h1> | ||||
| <p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="https://ant.apache.org">Ant</a>.</p> | <p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="https://ant.apache.org">Ant</a>.</p> | ||||
| <hr size="2"/> | |||||
| <hr size="2" /> | |||||
| <table width="100%"><tr><td> | <table width="100%"><tr><td> | ||||
| <a name="NVsummary"><h2>Summary</h2></a> | <a name="NVsummary"><h2>Summary</h2></a> | ||||
| </td><td align="right"> | </td><td align="right"> | ||||
| @@ -99,7 +100,7 @@ | |||||
| [<a href="#NVcycles">cycles</a>] | [<a href="#NVcycles">cycles</a>] | ||||
| [<a href="#NVexplanations">explanations</a>] | [<a href="#NVexplanations">explanations</a>] | ||||
| </td></tr></table> | </td></tr></table> | ||||
| <table width="100%" class="details"> | <table width="100%" class="details"> | ||||
| <tr> | <tr> | ||||
| <th>Package</th> | <th>Package</th> | ||||
| @@ -111,6 +112,7 @@ | |||||
| <th><a href="#EXabstractness">Abstractness</a></th> | <th><a href="#EXabstractness">Abstractness</a></th> | ||||
| <th><a href="#EXinstability">Instability</a></th> | <th><a href="#EXinstability">Instability</a></th> | ||||
| <th><a href="#EXdistance">Distance</a></th> | <th><a href="#EXdistance">Distance</a></th> | ||||
| </tr> | </tr> | ||||
| <xsl:for-each select="./Packages/Package"> | <xsl:for-each select="./Packages/Package"> | ||||
| <xsl:if test="count(error) = 0"> | <xsl:if test="count(error) = 0"> | ||||
| @@ -130,6 +132,8 @@ | |||||
| <td align="right"><xsl:value-of select="Stats/A"/></td> | <td align="right"><xsl:value-of select="Stats/A"/></td> | ||||
| <td align="right"><xsl:value-of select="Stats/I"/></td> | <td align="right"><xsl:value-of select="Stats/I"/></td> | ||||
| <td align="right"><xsl:value-of select="Stats/D"/></td> | <td align="right"><xsl:value-of select="Stats/D"/></td> | ||||
| </tr> | </tr> | ||||
| </xsl:if> | </xsl:if> | ||||
| </xsl:for-each> | </xsl:for-each> | ||||
| @@ -144,7 +148,7 @@ | |||||
| </xsl:if> | </xsl:if> | ||||
| </xsl:for-each> | </xsl:for-each> | ||||
| </table> | </table> | ||||
| <table width="100%"><tr><td> | <table width="100%"><tr><td> | ||||
| <a name="NVpackages"><h2>Packages</h2></a> | <a name="NVpackages"><h2>Packages</h2></a> | ||||
| </td><td align="right"> | </td><td align="right"> | ||||
| @@ -153,12 +157,12 @@ | |||||
| [<a href="#NVcycles">cycles</a>] | [<a href="#NVcycles">cycles</a>] | ||||
| [<a href="#NVexplanations">explanations</a>] | [<a href="#NVexplanations">explanations</a>] | ||||
| </td></tr></table> | </td></tr></table> | ||||
| <xsl:for-each select="./Packages/Package"> | <xsl:for-each select="./Packages/Package"> | ||||
| <xsl:if test="count(error) = 0"> | <xsl:if test="count(error) = 0"> | ||||
| <h3><a><xsl:attribute name="name">PK<xsl:value-of select="@name"/></xsl:attribute> | <h3><a><xsl:attribute name="name">PK<xsl:value-of select="@name"/></xsl:attribute> | ||||
| <xsl:value-of select="@name"/></a></h3> | <xsl:value-of select="@name"/></a></h3> | ||||
| <table width="100%"><tr> | <table width="100%"><tr> | ||||
| <td><a href="#EXafferent">Afferent Couplings</a>: <xsl:value-of select="Stats/Ca"/></td> | <td><a href="#EXafferent">Afferent Couplings</a>: <xsl:value-of select="Stats/Ca"/></td> | ||||
| <td><a href="#EXefferent">Efferent Couplings</a>: <xsl:value-of select="Stats/Ce"/></td> | <td><a href="#EXefferent">Efferent Couplings</a>: <xsl:value-of select="Stats/Ce"/></td> | ||||
| @@ -166,7 +170,7 @@ | |||||
| <td><a href="#EXinstability">Instability</a>: <xsl:value-of select="Stats/I"/></td> | <td><a href="#EXinstability">Instability</a>: <xsl:value-of select="Stats/I"/></td> | ||||
| <td><a href="#EXdistance">Distance</a>: <xsl:value-of select="Stats/D"/></td> | <td><a href="#EXdistance">Distance</a>: <xsl:value-of select="Stats/D"/></td> | ||||
| </tr></table> | </tr></table> | ||||
| <table width="100%" class="details"> | <table width="100%" class="details"> | ||||
| <tr> | <tr> | ||||
| <th>Abstract Classes</th> | <th>Abstract Classes</th> | ||||
| @@ -217,7 +221,7 @@ | |||||
| </table> | </table> | ||||
| </xsl:if> | </xsl:if> | ||||
| </xsl:for-each> | </xsl:for-each> | ||||
| <table width="100%"><tr><td> | <table width="100%"><tr><td> | ||||
| <a name="NVcycles"><h2>Cycles</h2></a> | <a name="NVcycles"><h2>Cycles</h2></a> | ||||
| </td><td align="right"> | </td><td align="right"> | ||||
| @@ -226,7 +230,7 @@ | |||||
| [<a href="#NVcycles">cycles</a>] | [<a href="#NVcycles">cycles</a>] | ||||
| [<a href="#NVexplanations">explanations</a>] | [<a href="#NVexplanations">explanations</a>] | ||||
| </td></tr></table> | </td></tr></table> | ||||
| <xsl:if test="count(Cycles/Package) = 0"> | <xsl:if test="count(Cycles/Package) = 0"> | ||||
| <p>There are no cyclic dependancies.</p> | <p>There are no cyclic dependancies.</p> | ||||
| </xsl:if> | </xsl:if> | ||||
| @@ -236,7 +240,7 @@ | |||||
| <xsl:value-of select="."/><br/> | <xsl:value-of select="."/><br/> | ||||
| </xsl:for-each></p> | </xsl:for-each></p> | ||||
| </xsl:for-each> | </xsl:for-each> | ||||
| <table width="100%"><tr><td> | <table width="100%"><tr><td> | ||||
| <a name="NVexplanations"><h2>Explanations</h2></a> | <a name="NVexplanations"><h2>Explanations</h2></a> | ||||
| </td><td align="right"> | </td><td align="right"> | ||||
| @@ -245,26 +249,26 @@ | |||||
| [<a href="#NVcycles">cycles</a>] | [<a href="#NVcycles">cycles</a>] | ||||
| [<a href="#NVexplanations">explanations</a>] | [<a href="#NVexplanations">explanations</a>] | ||||
| </td></tr></table> | </td></tr></table> | ||||
| <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> | <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> | <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 number of concrete and abstract classes (and interfaces) in the package is an indicator of the extensibility of the package.</p> | ||||
| <h3><a name="EXafferent">Afferent Couplings</a></h3> | <h3><a name="EXafferent">Afferent Couplings</a></h3> | ||||
| <p>The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. </p> | <p>The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. </p> | ||||
| <h3><a name="EXefferent">Efferent Couplings</a></h3> | <h3><a name="EXefferent">Efferent Couplings</a></h3> | ||||
| <p>The number of other packages that the classes in the package depend upon is an indicator of the package's independence. </p> | <p>The number of other packages that the classes in the package depend upon is an indicator of the package's independence. </p> | ||||
| <h3><a name="EXabstractness">Abstractness</a></h3> | |||||
| <h3><a name="EXabstractness">Abstractness</a></h3> | |||||
| <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 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> | <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> | <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 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 unstable package. </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> | <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>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 unstable (x=1, y=0). </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> | <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> | ||||
| </body> | </body> | ||||
| </html> | </html> | ||||
| </xsl:template> | </xsl:template> | ||||
| @@ -20,9 +20,9 @@ | |||||
| <target name="setUp"> | <target name="setUp"> | ||||
| <mkdir dir="${output}"/> | <mkdir dir="${output}"/> | ||||
| <!-- this property can be overridden programmatically in the Java test case --> | |||||
| <!-- this property can be overriden programatically in the Java test case --> | |||||
| <property name="timeToWait" value="10"/> | <property name="timeToWait" value="10"/> | ||||
| <!-- this property can be overridden programmatically in the Java test case --> | |||||
| <!-- this property can be overriden programatically in the Java test case --> | |||||
| <property name="logFile" value="${output}/spawn.log"/> | <property name="logFile" value="${output}/spawn.log"/> | ||||
| <property environment="env"/> | <property environment="env"/> | ||||
| <!-- UNIX --> | <!-- UNIX --> | ||||
| @@ -19,11 +19,11 @@ | |||||
| <!-- | <!-- | ||||
| /* | /* | ||||
| * Since the initial version of this file was developed on the clock on | |||||
| * Since the initial version of this file was deveolped on the clock on | |||||
| * an NSF grant I should say the following boilerplate: | * an NSF grant I should say the following boilerplate: | ||||
| * | * | ||||
| * This material is based upon work supported by the National Science | * This material is based upon work supported by the National Science | ||||
| * Foundation under Grant No. EIA-0196404. Any opinions, findings, and | |||||
| * Foundaton under Grant No. EIA-0196404. Any opinions, findings, and | |||||
| * conclusions or recommendations expressed in this material are those | * conclusions or recommendations expressed in this material are those | ||||
| * of the author and do not necessarily reflect the views of the | * of the author and do not necessarily reflect the views of the | ||||
| * National Science Foundation. | * National Science Foundation. | ||||
| @@ -33,44 +33,44 @@ | |||||
| <project name="symlink-test" basedir="." default="all"> | <project name="symlink-test" basedir="." default="all"> | ||||
| <!-- | |||||
| <!-- | |||||
| Since the symlink task and some of these targets rely on | Since the symlink task and some of these targets rely on | ||||
| calls to exec, it may be possible for the JVM to outrun the | |||||
| calls to exec, it may be possible for the JVM to outrun the | |||||
| execution of the command line system calls, so this value is | execution of the command line system calls, so this value is | ||||
| the number of seconds we give the operating system to | the number of seconds we give the operating system to | ||||
| catch up before executing a task that depends on the | |||||
| catch up before executing a task that depends on the | |||||
| completion of previous tasks. This delay is also added to | completion of previous tasks. This delay is also added to | ||||
| the end of each target so junit doesn't go testing things | the end of each target so junit doesn't go testing things | ||||
| before they have finished (hopefully). Tweak if needed. | |||||
| before they have finnished (hopefully). Tweak if needed. | |||||
| --> | --> | ||||
| <property name="delay" value="0"/> | <property name="delay" value="0"/> | ||||
| <import file="../../../buildfiletest-base.xml"/> | <import file="../../../buildfiletest-base.xml"/> | ||||
| <target name="setUp"> | <target name="setUp"> | ||||
| <mkdir dir="${output}"/> | |||||
| <mkdir dir="${output}" /> | |||||
| </target> | </target> | ||||
| <target name="all" | <target name="all" | ||||
| depends="setUp, test-single, test-delete, test-record, test-recreate, tearDown"/> | depends="setUp, test-single, test-delete, test-record, test-recreate, tearDown"/> | ||||
| <!-- test for action = single --> | <!-- test for action = single --> | ||||
| <!-- | |||||
| <!-- | |||||
| Creates: | Creates: | ||||
| File: ${output}/symlink.test | File: ${output}/symlink.test | ||||
| Link: ${output}/singletest | Link: ${output}/singletest | ||||
| --> | --> | ||||
| <target name="test-single"> | <target name="test-single"> | ||||
| <touch file="${output}/symlink.test"/> | <touch file="${output}/symlink.test"/> | ||||
| <symlink resource="${output}/symlink.test" | |||||
| link="${output}/singletest" | |||||
| <symlink resource="${output}/symlink.test" | |||||
| link="${output}/singletest" | |||||
| failonerror="yes"/> | failonerror="yes"/> | ||||
| <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
| <available file="${output}/symlink.test" | |||||
| <available file="${output}/symlink.test" | |||||
| property="test.single.file.created"/> | property="test.single.file.created"/> | ||||
| <available file="${output}/singletest" | |||||
| <available file="${output}/singletest" | |||||
| property="test.single.link.created"/> | property="test.single.link.created"/> | ||||
| </target> | </target> | ||||
| @@ -78,7 +78,7 @@ | |||||
| <!-- test for action = delete (no calls to command line so no sleep) --> | <!-- test for action = delete (no calls to command line so no sleep) --> | ||||
| <!-- | |||||
| <!-- | |||||
| Creates: | Creates: | ||||
| (none) | (none) | ||||
| Deletes: | Deletes: | ||||
| @@ -87,8 +87,8 @@ | |||||
| <target name="test-delete"> | <target name="test-delete"> | ||||
| <touch file="${output}/symlink.test"/> | <touch file="${output}/symlink.test"/> | ||||
| <symlink resource="${output}/symlink.test" | |||||
| link="${output}/singletest" | |||||
| <symlink resource="${output}/symlink.test" | |||||
| link="${output}/singletest" | |||||
| failonerror="yes"/> | failonerror="yes"/> | ||||
| <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
| @@ -96,19 +96,19 @@ | |||||
| <symlink action="delete" link="${output}/symlink.test" failonerror="no"/> | <symlink action="delete" link="${output}/symlink.test" failonerror="no"/> | ||||
| <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
| <available file="${output}/symlink.test" | |||||
| <available file="${output}/symlink.test" | |||||
| property="test.delete.file.still.there"/> | property="test.delete.file.still.there"/> | ||||
| <available file="${output}/singletest" | |||||
| <available file="${output}/singletest" | |||||
| property="test.delete.link.still.there" | property="test.delete.link.still.there" | ||||
| value="ERROR: link deletion failed"/> | value="ERROR: link deletion failed"/> | ||||
| </target> | </target> | ||||
| <!-- test for action = record --> | <!-- test for action = record --> | ||||
| <!-- | |||||
| <!-- | |||||
| Creates: | Creates: | ||||
| Dir: ${output}/symtest1 | Dir: ${output}/symtest1 | ||||
| Dir: ${output}/symtest1/symtest2 | Dir: ${output}/symtest1/symtest2 | ||||
| @@ -143,22 +143,22 @@ | |||||
| <touch file="${output}/symtest1/symtest3/fileB"/> | <touch file="${output}/symtest1/symtest3/fileB"/> | ||||
| <touch file="${output}/symtest1/symtest3/fileC"/> | <touch file="${output}/symtest1/symtest3/fileC"/> | ||||
| <symlink resource="${output}/symtest1/file1" | |||||
| link="${output}/symtest1/link1" | |||||
| failonerror="no"/> | |||||
| <symlink resource="${output}/symtest1/symtest2/file2" | |||||
| link="${output}/symtest1/link2" | |||||
| failonerror="no"/> | |||||
| <symlink resource="${output}/symtest1/symtest2/file2" | |||||
| link="${output}/symtest1/symtest2/link3" | |||||
| failonerror="no"/> | |||||
| <symlink resource="${output}/symtest1/file1" | |||||
| link="${output}/symtest1/link1" | |||||
| failonerror="no" /> | |||||
| <symlink resource="${output}/symtest1/symtest2/file2" | |||||
| link="${output}/symtest1/link2" | |||||
| failonerror="no" /> | |||||
| <symlink resource="${output}/symtest1/symtest2/file2" | |||||
| link="${output}/symtest1/symtest2/link3" | |||||
| failonerror="no" /> | |||||
| <symlink resource="${output}/symtest1/symtest3" | <symlink resource="${output}/symtest1/symtest3" | ||||
| link="${output}/symtest1/dirlink" | link="${output}/symtest1/dirlink" | ||||
| failonerror="no"/> | |||||
| <symlink resource="${output}/symtest1/symtest3" | |||||
| failonerror="no" /> | |||||
| <symlink resource="${output}/symtest1/symtest3" | |||||
| link="${output}/symtest1/dirlink2" | link="${output}/symtest1/dirlink2" | ||||
| failonerror="no"/> | failonerror="no"/> | ||||
| <symlink resource="${output}/symtest1/symtest3" | |||||
| <symlink resource="${output}/symtest1/symtest3" | |||||
| link="${output}/symtest1/dirlink3" | link="${output}/symtest1/dirlink3" | ||||
| failonerror="no"/> | failonerror="no"/> | ||||
| @@ -217,7 +217,7 @@ | |||||
| <!-- this is redundant for this test, but used in the recreate test --> | <!-- this is redundant for this test, but used in the recreate test --> | ||||
| <available file="${output}/symtest1/dirlink2" | |||||
| <available file="${output}/symtest1/dirlink2" | |||||
| property="test.record.dirlink2.created"/> | property="test.record.dirlink2.created"/> | ||||
| <!-- Test to see if the linkfiles were created --> | <!-- Test to see if the linkfiles were created --> | ||||
| @@ -239,7 +239,7 @@ | |||||
| <!-- test for action = recreate --> | <!-- test for action = recreate --> | ||||
| <!-- | |||||
| <!-- | |||||
| Deletes: | Deletes: | ||||
| Link: ${output}/symtest1/link1==>${output}/symtest1/file1 | Link: ${output}/symtest1/link1==>${output}/symtest1/file1 | ||||
| Link: ${output}/symtest1/link2==>${output}/symtest1/symtest2/file2 | Link: ${output}/symtest1/link2==>${output}/symtest1/symtest2/file2 | ||||
| @@ -278,7 +278,7 @@ | |||||
| <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | ||||
| <symlink resource="${output}/symtest1/symtest2" | |||||
| <symlink resource="${output}/symtest1/symtest2" | |||||
| link="${output}/symtest1/dirlink3" | link="${output}/symtest1/dirlink3" | ||||
| failonerror="no"/> | failonerror="no"/> | ||||
| @@ -321,7 +321,7 @@ | |||||
| property="test.recreate.dirlink.recreated"/> | property="test.recreate.dirlink.recreated"/> | ||||
| <!-- this should not get set --> | <!-- this should not get set --> | ||||
| <available file="${output}/symtest1/symtest3/symtest3" | |||||
| <available file="${output}/symtest1/symtest3/symtest3" | |||||
| property="test.recreate.dirlink2.recreated.twice" | property="test.recreate.dirlink2.recreated.twice" | ||||
| value="ERROR: dirlink2 was created a second time (bug 25181)"/> | value="ERROR: dirlink2 was created a second time (bug 25181)"/> | ||||
| @@ -329,13 +329,13 @@ | |||||
| <sleep seconds="${delay}"/> <!-- make sure OS has time to do the execs --> | <sleep seconds="${delay}"/> <!-- make sure OS has time to do the execs --> | ||||
| <available file="${output}/symtest1/symtest3/WhereAmI" | |||||
| <available file="${output}/symtest1/symtest3/WhereAmI" | |||||
| property="test.recreate.dirlink3.was.altered"/> | property="test.recreate.dirlink3.was.altered"/> | ||||
| </target> | </target> | ||||
| <!-- actually tests the symlink methods in FileUtils, but this | <!-- actually tests the symlink methods in FileUtils, but this | ||||
| test fixture already has all the necessary environment in place | |||||
| testfixture already has all the necessary envirnment in place | |||||
| --> | --> | ||||
| <target name="test-fileutils" depends="setUp"> | <target name="test-fileutils" depends="setUp"> | ||||
| <mkdir dir="${output}/dir1"/> | <mkdir dir="${output}/dir1"/> | ||||
| @@ -16,14 +16,15 @@ | |||||
| limitations under the License. | limitations under the License. | ||||
| --> | --> | ||||
| <!-- | |||||
| Invalid test XML file without any schema references | |||||
| <!-- | |||||
| Invalid test XML file without any schema refeferences | |||||
| --> | --> | ||||
| <doc> | <doc> | ||||
| <section title="endpiece"> | <section title="endpiece"> | ||||
| With a little luck, the network will pick me up. | |||||
| With a little luck, the network will pick me up. | |||||
| This is Ripley - last survivor of The Nostromo - signing off. | This is Ripley - last survivor of The Nostromo - signing off. | ||||
| </section> | </section> | ||||
| <invalidelement/> | <invalidelement/> | ||||
| </doc> | </doc> | ||||
| @@ -16,12 +16,13 @@ | |||||
| limitations under the License. | limitations under the License. | ||||
| --> | --> | ||||
| <!-- | |||||
| Test XML file without any schema references | |||||
| <!-- | |||||
| Test XML file without any schema refeferences | |||||
| --> | --> | ||||
| <doc> | <doc> | ||||
| <section title="endpiece"> | <section title="endpiece"> | ||||
| With a little luck, the network will pick me up. | |||||
| With a little luck, the network will pick me up. | |||||
| This is Ripley - last survivor of The Nostromo - signing off. | This is Ripley - last survivor of The Nostromo - signing off. | ||||
| </section> | </section> | ||||
| </doc> | </doc> | ||||
| @@ -27,171 +27,175 @@ | |||||
| includes="*.java" | includes="*.java" | ||||
| source="${source}" | source="${source}" | ||||
| debug="true" | debug="true" | ||||
| destdir="${output}"/> | |||||
| destdir="${output}" | |||||
| /> | |||||
| </target> | </target> | ||||
| <property name="src.dir" location="assertions"/> | <property name="src.dir" location="assertions"/> | ||||
| <property name="classname" value="AssertionMain"/> | <property name="classname" value="AssertionMain"/> | ||||
| <property name="test.classname" value="AssertionTest"/> | <property name="test.classname" value="AssertionTest"/> | ||||
| <path id="assert.classpath"> | <path id="assert.classpath"> | ||||
| <pathelement location="${output}"/> | <pathelement location="${output}"/> | ||||
| </path> | |||||
| </path> | |||||
| <!-- if per-class assertions work, this run asserts --> | <!-- if per-class assertions work, this run asserts --> | ||||
| <target name="test-classname" depends="setUp"> | <target name="test-classname" depends="setUp"> | ||||
| <java fork="true" failonerror="true" | <java fork="true" failonerror="true" | ||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions enablesystemassertions="true"> | <assertions enablesystemassertions="true"> | ||||
| <enable class="${classname}"/> | |||||
| <enable class="${classname}" /> | |||||
| </assertions> | </assertions> | ||||
| </java> | </java> | ||||
| </target> | </target> | ||||
| <!-- if package works, this run asserts --> | <!-- if package works, this run asserts --> | ||||
| <target name="test-package" depends="setUp"> | <target name="test-package" depends="setUp"> | ||||
| <java fork="true" failonerror="true" | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions enableSystemAssertions="false"> | |||||
| <enable package="..."/> | |||||
| <java fork="true" failonerror="true" | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions enableSystemAssertions="false" > | |||||
| <enable package="..." /> | |||||
| </assertions> | </assertions> | ||||
| </java> | </java> | ||||
| </target> | </target> | ||||
| <!-- this test should run the app successfully --> | <!-- this test should run the app successfully --> | ||||
| <target name="test-empty-assertions" depends="setUp"> | <target name="test-empty-assertions" depends="setUp"> | ||||
| <java fork="true" failonerror="true" | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <java fork="true" failonerror="true" | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions/> | <assertions/> | ||||
| </java> | </java> | ||||
| </target> | |||||
| </target> | |||||
| <!-- this test should run the app successfully --> | <!-- this test should run the app successfully --> | ||||
| <target name="test-disable" depends="setUp"> | <target name="test-disable" depends="setUp"> | ||||
| <java fork="true" failonerror="true" | <java fork="true" failonerror="true" | ||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions enableSystemAssertions="false"> | |||||
| <enable package="..."/> | |||||
| <disable class="${classname}"/> | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions enableSystemAssertions="false" > | |||||
| <enable package="..." /> | |||||
| <disable class="${classname}" /> | |||||
| </assertions> | </assertions> | ||||
| </java> | </java> | ||||
| </target> | |||||
| </target> | |||||
| <!-- repeated settings result in the last declaration winning | |||||
| except that the rule 'classes win over packages takes priority | |||||
| this run will assert --> | |||||
| <!-- repeated settigns result in the last declaration winning | |||||
| except that the rule 'classes win over packages takes priority | |||||
| this run will assert --> | |||||
| <target name="test-override" depends="setUp"> | <target name="test-override" depends="setUp"> | ||||
| <java fork="true" failonerror="true" | <java fork="true" failonerror="true" | ||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions enableSystemAssertions="false"> | |||||
| <enable package="..."/> | |||||
| <disable class="${classname}"/> | |||||
| <enable class="${classname}"/> | |||||
| <disable package="..."/> | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions enableSystemAssertions="false" > | |||||
| <enable package="..." /> | |||||
| <disable class="${classname}" /> | |||||
| <enable class="${classname}" /> | |||||
| <disable package="..." /> | |||||
| </assertions> | </assertions> | ||||
| </java> | </java> | ||||
| </target> | |||||
| </target> | |||||
| <!-- repeated settings result in the last declaration winning; | |||||
| this run will not assert --> | |||||
| <!-- repeated settigns result in the last declaration winning; | |||||
| this run will not assert --> | |||||
| <target name="test-override2" depends="setUp"> | <target name="test-override2" depends="setUp"> | ||||
| <java fork="true" failonerror="true" | <java fork="true" failonerror="true" | ||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions enableSystemAssertions="false"> | |||||
| <enable package="..."/> | |||||
| <enable class="${classname}"/> | |||||
| <disable class="${classname}"/> | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions enableSystemAssertions="false" > | |||||
| <enable package="..." /> | |||||
| <enable class="${classname}" /> | |||||
| <disable class="${classname}" /> | |||||
| </assertions> | </assertions> | ||||
| </java> | </java> | ||||
| </target> | |||||
| </target> | |||||
| <!-- if references work, this run asserts --> | <!-- if references work, this run asserts --> | ||||
| <target name="test-references"> | <target name="test-references"> | ||||
| <assertions id="project.assertions"> | |||||
| <enable package="org.apache.test"/> | |||||
| <disable package="org.apache.log4j"/> | |||||
| <enable package="..."/> | |||||
| </assertions> | |||||
| <assertions id="project.assertions" > | |||||
| <enable package="org.apache.test" /> | |||||
| <disable package="org.apache.log4j"/> | |||||
| <enable package="..."/> | |||||
| </assertions> | |||||
| <java fork="true" failonerror="true" | <java fork="true" failonerror="true" | ||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions refid="project.assertions"/> | <assertions refid="project.assertions"/> | ||||
| </java> | </java> | ||||
| </target> | </target> | ||||
| <!-- when fork=false; we need to reject the construct --> | <!-- when fork=false; we need to reject the construct --> | ||||
| <target name="test-nofork" depends="setUp"> | <target name="test-nofork" depends="setUp"> | ||||
| <java fork="false" failonerror="true" | <java fork="false" failonerror="true" | ||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions enablesystemassertions="true"> | <assertions enablesystemassertions="true"> | ||||
| <enable class="${classname}"/> | |||||
| <enable class="${classname}" /> | |||||
| </assertions> | </assertions> | ||||
| </java> | </java> | ||||
| </target> | |||||
| </target> | |||||
| <!-- this throws a build error --> | <!-- this throws a build error --> | ||||
| <target name="test-multiple-assertions" depends="setUp"> | <target name="test-multiple-assertions" depends="setUp"> | ||||
| <java fork="true" failonerror="true" | <java fork="true" failonerror="true" | ||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions enablesystemassertions="true"> | <assertions enablesystemassertions="true"> | ||||
| <enable class="${classname}"/> | |||||
| <enable class="${classname}" /> | |||||
| </assertions> | </assertions> | ||||
| <assertions/> | <assertions/> | ||||
| </java> | </java> | ||||
| </target> | |||||
| </target> | |||||
| <!-- should throw a build exception --> | <!-- should throw a build exception --> | ||||
| <target name="test-reference-abuse" depends="setUp"> | <target name="test-reference-abuse" depends="setUp"> | ||||
| <assertions id="project.assertions2"> | |||||
| <enable package="org.apache.test"/> | |||||
| <disable package="org.apache.log4j"/> | |||||
| <enable package="..."/> | |||||
| </assertions> | |||||
| <assertions id="project.assertions2" > | |||||
| <enable package="org.apache.test" /> | |||||
| <disable package="org.apache.log4j"/> | |||||
| <enable package="..."/> | |||||
| </assertions> | |||||
| <java fork="true" failonerror="true" | <java fork="true" failonerror="true" | ||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| classname="${classname}" | |||||
| classpathref="assert.classpath"> | |||||
| <assertions refid="project.assertions2"> | <assertions refid="project.assertions2"> | ||||
| <disable class="${classname}"/> | |||||
| </assertions> | |||||
| <disable class="${classname}" /> | |||||
| </assertions> | |||||
| </java> | </java> | ||||
| </target> | |||||
| </target> | |||||
| <target name="test-junit" depends="setUp"> | <target name="test-junit" depends="setUp"> | ||||
| <junit fork="true" | |||||
| haltonerror="true" haltonfailure="true"> | |||||
| <junit fork="true" | |||||
| haltonerror="true" haltonfailure="true" | |||||
| > | |||||
| <classpath> | <classpath> | ||||
| <path refid="assert.classpath"/> | <path refid="assert.classpath"/> | ||||
| </classpath> | </classpath> | ||||
| <formatter type="plain" usefile="false"/> | |||||
| <assertions> | |||||
| <enable class="${test.classname}"/> | |||||
| </assertions> | |||||
| <formatter type="plain" usefile="false"/> | |||||
| <assertions > | |||||
| <enable class="${test.classname}" /> | |||||
| </assertions> | |||||
| <test name="${test.classname}"/> | <test name="${test.classname}"/> | ||||
| </junit> | </junit> | ||||
| </target> | </target> | ||||
| <!-- This is here to show that setting it as a property works | <!-- This is here to show that setting it as a property works | ||||
| so there is some defect in pass-on of assertions that | |||||
| is causing the problem --> | |||||
| so there is some defect in pass-on of assertions that | |||||
| is causing the problem --> | |||||
| <target name="test-junit-manual-setup" depends="setUp"> | <target name="test-junit-manual-setup" depends="setUp"> | ||||
| <junit fork="true" | |||||
| haltonerror="true" haltonfailure="true"> | |||||
| <junit fork="true" | |||||
| haltonerror="true" haltonfailure="true" | |||||
| > | |||||
| <classpath> | <classpath> | ||||
| <path refid="assert.classpath"/> | <path refid="assert.classpath"/> | ||||
| </classpath> | </classpath> | ||||
| <formatter type="plain" usefile="false"/> | |||||
| <formatter type="plain" usefile="false"/> | |||||
| <test name="${test.classname}"/> | <test name="${test.classname}"/> | ||||
| <jvmarg value="-ea:AssertionTest"/> | <jvmarg value="-ea:AssertionTest"/> | ||||
| </junit> | </junit> | ||||
| </target> | |||||
| </target> | |||||
| </project> | </project> | ||||
| @@ -25,40 +25,40 @@ | |||||
| </target> | </target> | ||||
| <property name="etc.dir" value=".."/> | <property name="etc.dir" value=".."/> | ||||
| <property name="test.dir" | <property name="test.dir" | ||||
| value="${output}/selectortest"/> | |||||
| value="${output}/selectortest"/> | |||||
| <property name="testregexpsrc.dir" | <property name="testregexpsrc.dir" | ||||
| value="${output}/regexpseltestsrc"/> | |||||
| value="${output}/regexpseltestsrc"/> | |||||
| <property name="testregexpdest.dir" | <property name="testregexpdest.dir" | ||||
| value="${output}/regexpseltestdest"/> | |||||
| value="${output}/regexpseltestdest"/> | |||||
| <property name="mirror.dir" | <property name="mirror.dir" | ||||
| value="${output}/selectortest2"/> | |||||
| value="${output}/selectortest2"/> | |||||
| <target name="setupfiles"> | <target name="setupfiles"> | ||||
| <mkdir dir="${test.dir}"/> | |||||
| <mkdir dir="${test.dir}/zip"/> | |||||
| <mkdir dir="${test.dir}/tar"/> | |||||
| <mkdir dir="${test.dir}/tar/gz"/> | |||||
| <mkdir dir="${test.dir}/tar/bz2"/> | |||||
| <mkdir dir="${test.dir}" /> | |||||
| <mkdir dir="${test.dir}/zip" /> | |||||
| <mkdir dir="${test.dir}/tar" /> | |||||
| <mkdir dir="${test.dir}/tar/gz" /> | |||||
| <mkdir dir="${test.dir}/tar/bz2" /> | |||||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.md5" | <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.md5" | ||||
| tofile="${test.dir}/asf-logo.gif.md5"/> | |||||
| tofile="${test.dir}/asf-logo.gif.md5" /> | |||||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.bz2" | <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.bz2" | ||||
| tofile="${test.dir}/asf-logo.gif.bz2"/> | |||||
| tofile="${test.dir}/asf-logo.gif.bz2" /> | |||||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.gz" | <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.gz" | ||||
| tofile="${test.dir}/asf-logo.gif.gz"/> | |||||
| tofile="${test.dir}/asf-logo.gif.gz" /> | |||||
| <copy file="${etc.dir}/taskdefs/expected/copy.filterset.filtered" | <copy file="${etc.dir}/taskdefs/expected/copy.filterset.filtered" | ||||
| tofile="${test.dir}/copy.filterset.filtered"/> | |||||
| tofile="${test.dir}/copy.filterset.filtered" /> | |||||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.zip" | <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.zip" | ||||
| tofile="${test.dir}/zip/asf-logo.gif.zip"/> | |||||
| tofile="${test.dir}/zip/asf-logo.gif.zip" /> | |||||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar" | <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar" | ||||
| tofile="${test.dir}/tar/asf-logo.gif.tar"/> | |||||
| tofile="${test.dir}/tar/asf-logo.gif.tar" /> | |||||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo-huge.tar.gz" | <copy file="${etc.dir}/taskdefs/expected/asf-logo-huge.tar.gz" | ||||
| tofile="${test.dir}/tar/asf-logo-huge.tar.gz"/> | |||||
| tofile="${test.dir}/tar/asf-logo-huge.tar.gz" /> | |||||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar.gz" | <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar.gz" | ||||
| tofile="${test.dir}/tar/gz/asf-logo.gif.tar.gz"/> | |||||
| tofile="${test.dir}/tar/gz/asf-logo.gif.tar.gz" /> | |||||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar.bz2" | <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar.bz2" | ||||
| tofile="${test.dir}/tar/bz2/asf-logo.gif.tar.bz2"/> | |||||
| tofile="${test.dir}/tar/bz2/asf-logo.gif.tar.bz2" /> | |||||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo-huge.tar.bz2" | <copy file="${etc.dir}/taskdefs/expected/asf-logo-huge.tar.bz2" | ||||
| tofile="${test.dir}/tar/bz2/asf-logo-huge.tar.bz2"/> | |||||
| tofile="${test.dir}/tar/bz2/asf-logo-huge.tar.bz2" /> | |||||
| <!-- Make linefeeds consistent between platforms --> | <!-- Make linefeeds consistent between platforms --> | ||||
| <fixcrlf srcdir="${test.dir}" includes="*.filtered" eol="lf"/> | <fixcrlf srcdir="${test.dir}" includes="*.filtered" eol="lf"/> | ||||
| <!-- Set a known base time for all files --> | <!-- Set a known base time for all files --> | ||||
| @@ -69,23 +69,23 @@ | |||||
| </touch> | </touch> | ||||
| <!-- Then adjust individual ones --> | <!-- Then adjust individual ones --> | ||||
| <touch file="${test.dir}/asf-logo.gif.bz2" | <touch file="${test.dir}/asf-logo.gif.bz2" | ||||
| datetime="01/01/2001 12:00 AM"/> | |||||
| datetime="01/01/2001 12:00 AM"/> | |||||
| <touch file="${test.dir}/asf-logo.gif.gz" | <touch file="${test.dir}/asf-logo.gif.gz" | ||||
| datetime="04/15/2002 2:30 PM"/> | |||||
| datetime="04/15/2002 2:30 PM"/> | |||||
| <touch file="${test.dir}/zip/asf-logo.gif.zip" | <touch file="${test.dir}/zip/asf-logo.gif.zip" | ||||
| datetime="05/10/2002 2:30 PM"/> | |||||
| datetime="05/10/2002 2:30 PM"/> | |||||
| <touch file="${test.dir}/tar/asf-logo.gif.tar" | <touch file="${test.dir}/tar/asf-logo.gif.tar" | ||||
| datetime="05/10/2002 2:29 PM"/> | |||||
| datetime="05/10/2002 2:29 PM"/> | |||||
| <touch file="${test.dir}/tar/asf-logo-huge.tar.gz" | <touch file="${test.dir}/tar/asf-logo-huge.tar.gz" | ||||
| datetime="05/10/2002 2:29 AM"/> | |||||
| datetime="05/10/2002 2:29 AM"/> | |||||
| </target> | </target> | ||||
| <target name="mirrorfiles"> | <target name="mirrorfiles"> | ||||
| <mkdir dir="${mirror.dir}"/> | |||||
| <mkdir dir="${mirror.dir}/zip"/> | |||||
| <mkdir dir="${mirror.dir}/tar"/> | |||||
| <mkdir dir="${mirror.dir}/tar/gz"/> | |||||
| <mkdir dir="${mirror.dir}/tar/bz2"/> | |||||
| <mkdir dir="${mirror.dir}" /> | |||||
| <mkdir dir="${mirror.dir}/zip" /> | |||||
| <mkdir dir="${mirror.dir}/tar" /> | |||||
| <mkdir dir="${mirror.dir}/tar/gz" /> | |||||
| <mkdir dir="${mirror.dir}/tar/bz2" /> | |||||
| <touch file="${mirror.dir}/asf-logo.gif.md5"/> | <touch file="${mirror.dir}/asf-logo.gif.md5"/> | ||||
| <touch file="${mirror.dir}/asf-logo.gif.bz2"/> | <touch file="${mirror.dir}/asf-logo.gif.bz2"/> | ||||
| <touch file="${mirror.dir}/zip/asf-logo.gif.zip"/> | <touch file="${mirror.dir}/zip/asf-logo.gif.zip"/> | ||||
| @@ -97,18 +97,18 @@ | |||||
| </target> | </target> | ||||
| <target name="containsregexp"> | <target name="containsregexp"> | ||||
| <mkdir dir="${testregexpsrc.dir}"/> | |||||
| <mkdir dir="${testregexpdest.dir}"/> | |||||
| <mkdir dir="${testregexpsrc.dir}" /> | |||||
| <mkdir dir="${testregexpdest.dir}" /> | |||||
| <!-- Make two test files, shouldcopy.txt will get selected if everything works | <!-- Make two test files, shouldcopy.txt will get selected if everything works | ||||
| shouldnotcopy.txt will not get selected for copy. The test looks to see | shouldnotcopy.txt will not get selected for copy. The test looks to see | ||||
| that only one file is copied | that only one file is copied | ||||
| --> | --> | ||||
| <echo message="Some testregexp text 2.0" file="${testregexpsrc.dir}/shouldcopy.txt"/> | |||||
| <echo message="Some testregexp text 20" file="${testregexpsrc.dir}/shouldnotcopy.txt"/> | |||||
| <echo message="Some testregexp text 2.0" file="${testregexpsrc.dir}/shouldcopy.txt" /> | |||||
| <echo message="Some testregexp text 20" file="${testregexpsrc.dir}/shouldnotcopy.txt" /> | |||||
| <copy todir="${testregexpdest.dir}"> | <copy todir="${testregexpdest.dir}"> | ||||
| <fileset dir="${testregexpsrc.dir}"> | <fileset dir="${testregexpsrc.dir}"> | ||||
| <include name="*.txt"/> | |||||
| <containsregexp expression="[0-9]\.[0,1,2]"/> | |||||
| <include name="*.txt" /> | |||||
| <containsregexp expression="[0-9]\.[0,1,2]" /> | |||||
| </fileset> | </fileset> | ||||
| </copy> | </copy> | ||||
| </target> | </target> | ||||
| @@ -185,7 +185,7 @@ | |||||
| <copy todir="${test.dir}/to-1"> | <copy todir="${test.dir}/to-1"> | ||||
| <fileset dir="${test.dir}/src"> | <fileset dir="${test.dir}/src"> | ||||
| <modified cache="propertyfile" algorithm="hashvalue" update="true"> | <modified cache="propertyfile" algorithm="hashvalue" update="true"> | ||||
| <param name="cache.cachefile" value="core.cache.properties"/> | |||||
| <param name="cache.cachefile" value="core.cache.properties" /> | |||||
| </modified> | </modified> | ||||
| </fileset> | </fileset> | ||||
| </copy> | </copy> | ||||
| @@ -193,7 +193,7 @@ | |||||
| <copy todir="${test.dir}/to-2"> | <copy todir="${test.dir}/to-2"> | ||||
| <fileset dir="${test.dir}/src"> | <fileset dir="${test.dir}/src"> | ||||
| <modified cache="propertyfile" algorithm="hashvalue" update="true"> | <modified cache="propertyfile" algorithm="hashvalue" update="true"> | ||||
| <param name="cache.cachefile" value="core.cache.properties"/> | |||||
| <param name="cache.cachefile" value="core.cache.properties" /> | |||||
| </modified> | </modified> | ||||
| </fileset> | </fileset> | ||||
| </copy> | </copy> | ||||
| @@ -203,7 +203,7 @@ | |||||
| <copy todir="${test.dir}/to-3"> | <copy todir="${test.dir}/to-3"> | ||||
| <fileset dir="${test.dir}/src"> | <fileset dir="${test.dir}/src"> | ||||
| <modified cache="propertyfile" algorithm="hashvalue" update="true"> | <modified cache="propertyfile" algorithm="hashvalue" update="true"> | ||||
| <param name="cache.cachefile" value="core.cache.properties"/> | |||||
| <param name="cache.cachefile" value="core.cache.properties" /> | |||||
| </modified> | </modified> | ||||
| </fileset> | </fileset> | ||||
| </copy> | </copy> | ||||
| @@ -251,9 +251,11 @@ | |||||
| <property name="pkg.live" value="org.apache.tools.ant.types.selectors.modifiedselector"/> | <property name="pkg.live" value="org.apache.tools.ant.types.selectors.modifiedselector"/> | ||||
| <property name="pkg.test" value="org.apache.tools.ant.types.selectors"/> | <property name="pkg.test" value="org.apache.tools.ant.types.selectors"/> | ||||
| <fileset id="fs.mod" dir="${test.dir}/src"> | <fileset id="fs.mod" dir="${test.dir}/src"> | ||||
| <modified algorithmclass="${pkg.test}.MockAlgorithm" | |||||
| cacheclass="${pkg.test}.MockCache" | |||||
| comparatorclass="${pkg.test}.MockComparator"> | |||||
| <modified | |||||
| algorithmclass="${pkg.test}.MockAlgorithm" | |||||
| cacheclass="${pkg.test}.MockCache" | |||||
| comparatorclass="${pkg.test}.MockComparator" | |||||
| > | |||||
| <classpath> | <classpath> | ||||
| <pathelement location="${build.tests.value}"/> | <pathelement location="${build.tests.value}"/> | ||||
| </classpath> | </classpath> | ||||
| @@ -265,15 +267,15 @@ | |||||
| </target> | </target> | ||||
| <target name="modifiedselectortest-ResourceSimple"> | <target name="modifiedselectortest-ResourceSimple"> | ||||
| <fail message="Didn't get the required numbers of Resources."> | |||||
| <fail message="Didnt get the required numbers of Resources."> | |||||
| <condition> | <condition> | ||||
| <not> | <not> | ||||
| <resourcecount when="equal" count="3"> | <resourcecount when="equal" count="3"> | ||||
| <restrict> | <restrict> | ||||
| <resources> | <resources> | ||||
| <file file="foo"/> | |||||
| <resource name="foo"/> | |||||
| <file file="foo" basedir="${basedir}"/> | |||||
| <file file="foo" /> | |||||
| <resource name="foo" /> | |||||
| <file file="foo" basedir="${basedir}" /> | |||||
| </resources> | </resources> | ||||
| <modified selres="true" xmlns="antlib:org.apache.tools.ant.types.resources.selectors"/> | <modified selres="true" xmlns="antlib:org.apache.tools.ant.types.resources.selectors"/> | ||||
| </restrict> | </restrict> | ||||
| @@ -290,7 +292,7 @@ | |||||
| <resourcecount when="equal" count="1"> | <resourcecount when="equal" count="1"> | ||||
| <restrict> | <restrict> | ||||
| <resources> | <resources> | ||||
| <resource name="notExisting"/> | |||||
| <resource name="notExisting" /> | |||||
| </resources> | </resources> | ||||
| <modified selres="true" xmlns="antlib:org.apache.tools.ant.types.resources.selectors"/> | <modified selres="true" xmlns="antlib:org.apache.tools.ant.types.resources.selectors"/> | ||||
| </restrict> | </restrict> | ||||
| @@ -307,7 +309,7 @@ | |||||
| <resourcecount when="equal" count="0"> | <resourcecount when="equal" count="0"> | ||||
| <restrict> | <restrict> | ||||
| <resources> | <resources> | ||||
| <resource name="notExisting"/> | |||||
| <resource name="notExisting" /> | |||||
| </resources> | </resources> | ||||
| <modified selres="false" xmlns="antlib:org.apache.tools.ant.types.resources.selectors"/> | <modified selres="false" xmlns="antlib:org.apache.tools.ant.types.resources.selectors"/> | ||||
| </restrict> | </restrict> | ||||
| @@ -335,20 +337,20 @@ | |||||
| </resourcecount> | </resourcecount> | ||||
| </not> | </not> | ||||
| </condition> | </condition> | ||||
| </fail> | |||||
| </fail> | |||||
| </sequential> | </sequential> | ||||
| </macrodef> | </macrodef> | ||||
| <!-- select first time and create cachefile --> | <!-- select first time and create cachefile --> | ||||
| <check count="14" message="Initial set of files not ok."/> | <check count="14" message="Initial set of files not ok."/> | ||||
| <!-- check second time: nothing should be selected --> | <!-- check second time: nothing should be selected --> | ||||
| <check count="0" message="Selected files but shouldn't."/> | |||||
| <check count="0" message="Selected files but shouldnt."/> | |||||
| <!-- 'modify' the source files --> | <!-- 'modify' the source files --> | ||||
| <antcall target="modifiedselectortest-scenario-makeDirty"/> | <antcall target="modifiedselectortest-scenario-makeDirty"/> | ||||
| <!-- copy third time: only the files with new CONTENT should be copied --> | <!-- copy third time: only the files with new CONTENT should be copied --> | ||||
| <check count="2" message="Didn't select the 2 modified files."/> | |||||
| </target> | |||||
| <check count="2" message="Didnt select the 2 modified files."/> | |||||
| </target> | |||||
| </project> | </project> | ||||
| @@ -588,7 +588,7 @@ public final class Diagnostics { | |||||
| long drift = filetime - now; | long drift = filetime - now; | ||||
| tempFile.delete(); | tempFile.delete(); | ||||
| out.print("Temp dir is writable"); | |||||
| out.print("Temp dir is writeable"); | |||||
| if (total != TEST_FILE_SIZE * KILOBYTE) { | if (total != TEST_FILE_SIZE * KILOBYTE) { | ||||
| out.println(", but seems to be full. Wrote " | out.println(", but seems to be full. Wrote " | ||||
| + (TEST_FILE_SIZE * KILOBYTE) | + (TEST_FILE_SIZE * KILOBYTE) | ||||
| @@ -574,7 +574,7 @@ public class Ant extends Task { | |||||
| log("Adding clone of reference " + oldKey, Project.MSG_DEBUG); | log("Adding clone of reference " + oldKey, Project.MSG_DEBUG); | ||||
| } | } | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| // not Cloneable | |||||
| // not Clonable | |||||
| } | } | ||||
| if (copy instanceof ProjectComponent) { | if (copy instanceof ProjectComponent) { | ||||
| @@ -663,7 +663,7 @@ public class Checksum extends MatchingTask implements Condition { | |||||
| /** | /** | ||||
| * Get the default value - CHECKSUM. | * Get the default value - CHECKSUM. | ||||
| * @return the default value. | |||||
| * @return the defaul value. | |||||
| */ | */ | ||||
| public static FormatElement getDefault() { | public static FormatElement getDefault() { | ||||
| FormatElement e = new FormatElement(); | FormatElement e = new FormatElement(); | ||||
| @@ -217,7 +217,7 @@ public class Exec extends Task { | |||||
| /** | /** | ||||
| * Log an output message. | * Log an output message. | ||||
| * @param line the line to output | |||||
| * @param line the line to putput | |||||
| * @param messageLevel the level of logging - ignored | * @param messageLevel the level of logging - ignored | ||||
| * if output is going to a file | * if output is going to a file | ||||
| */ | */ | ||||
| @@ -602,7 +602,7 @@ public class SignJar extends AbstractJarSignerTask { | |||||
| * either file doesn't exist, or the destfile has an out of date timestamp, | * either file doesn't exist, or the destfile has an out of date timestamp, | ||||
| * then the return value is false.</p> | * then the return value is false.</p> | ||||
| * | * | ||||
| * <p>If we are signing ourselves, the check {@link #isSigned(File)} is used to | |||||
| * <p>If we are signing ourself, the check {@link #isSigned(File)} is used to | |||||
| * trigger the process.</p> | * trigger the process.</p> | ||||
| * | * | ||||
| * @param jarFile the unsigned jar file | * @param jarFile the unsigned jar file | ||||
| @@ -2136,7 +2136,7 @@ public class Zip extends MatchingTask { | |||||
| /** | /** | ||||
| * Policy for creation of Unicode extra fields: never, always or | * Policy for creation of Unicode extra fields: never, always or | ||||
| * not-encodable. | |||||
| * not-encodeable. | |||||
| * | * | ||||
| * @since Ant 1.8.0 | * @since Ant 1.8.0 | ||||
| */ | */ | ||||
| @@ -78,7 +78,7 @@ public class IsReachable extends ProjectComponent implements Condition { | |||||
| /** Error message when url and host are specified. */ | /** Error message when url and host are specified. */ | ||||
| public static final String ERROR_BOTH_TARGETS | public static final String ERROR_BOTH_TARGETS | ||||
| = "Both url and host have been specified"; | = "Both url and host have been specified"; | ||||
| /** Error message when no reachability test avail. */ | |||||
| /** Error message when no reachably test avail. */ | |||||
| public static final String MSG_NO_REACHABLE_TEST | public static final String MSG_NO_REACHABLE_TEST | ||||
| = "cannot do a proper reachability test on this Java version"; | = "cannot do a proper reachability test on this Java version"; | ||||
| /** Error message when an invalid url is used. */ | /** Error message when an invalid url is used. */ | ||||
| @@ -121,7 +121,7 @@ public class IsReachable extends ProjectComponent implements Condition { | |||||
| } | } | ||||
| /** | /** | ||||
| * emptiness test | |||||
| * emptyness test | |||||
| * | * | ||||
| * @param string param to check | * @param string param to check | ||||
| * | * | ||||
| @@ -389,7 +389,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||||
| try { | try { | ||||
| handler = getDescriptorHandler(config.srcDir); | handler = getDescriptorHandler(config.srcDir); | ||||
| // Retrieve the files to be added to JAR from EJB descriptor | |||||
| // Retreive the files to be added to JAR from EJB descriptor | |||||
| Hashtable<String, File> ejbFiles = parseEjbFiles(descriptorFileName, saxParser); | Hashtable<String, File> ejbFiles = parseEjbFiles(descriptorFileName, saxParser); | ||||
| // Add any support classes specified in the build file | // Add any support classes specified in the build file | ||||
| @@ -688,7 +688,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||||
| * If the file does not exist the global manifest from the config is used | * If the file does not exist the global manifest from the config is used | ||||
| * otherwise the default Ant manifest will be used. | * otherwise the default Ant manifest will be used. | ||||
| * | * | ||||
| * @param prefix the prefix where to look for the manifest file based on | |||||
| * @param prefix the prefix where to llook for the manifest file based on | |||||
| * the naming convention. | * the naming convention. | ||||
| * | * | ||||
| * @return the manifest file or null if the manifest file does not exist | * @return the manifest file or null if the manifest file does not exist | ||||
| @@ -768,7 +768,7 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||||
| } | } | ||||
| /* ----------------------------------------------------------------------------------- */ | /* ----------------------------------------------------------------------------------- */ | ||||
| /* utility methods */ | |||||
| /* utilitary methods */ | |||||
| /* ----------------------------------------------------------------------------------- */ | /* ----------------------------------------------------------------------------------- */ | ||||
| /** | /** | ||||
| @@ -798,7 +798,7 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||||
| /** | /** | ||||
| * Add a file to the a given hashtable. If the file is a directory, add | * Add a file to the a given hashtable. If the file is a directory, add | ||||
| * recursively all the files inside to the hashtable. | |||||
| * recursivly all the files inside to the hashtable. | |||||
| * | * | ||||
| * @param file the file to add. | * @param file the file to add. | ||||
| * @param rootDir the current sub-directory to scan. | * @param rootDir the current sub-directory to scan. | ||||
| @@ -153,7 +153,7 @@ public class WLJspc extends MatchingTask { | |||||
| args[j++] = "-docroot"; | args[j++] = "-docroot"; | ||||
| args[j++] = sourceDirectory.getAbsolutePath().trim(); | args[j++] = sourceDirectory.getAbsolutePath().trim(); | ||||
| args[j++] = "-keepgenerated"; | args[j++] = "-keepgenerated"; | ||||
| //Call compiler as class... don't want to fork again | |||||
| //Call compiler as class... dont want to fork again | |||||
| //Use classic compiler -- can be parameterised? | //Use classic compiler -- can be parameterised? | ||||
| args[j++] = "-compilerclass"; | args[j++] = "-compilerclass"; | ||||
| args[j++] = "sun.tools.javac.Main"; | args[j++] = "sun.tools.javac.Main"; | ||||
| @@ -106,7 +106,7 @@ public class JUnitLauncherTask extends Task { | |||||
| if (this.classPath == null) { | if (this.classPath == null) { | ||||
| // create a "wrapper" path which can hold on to multiple | // create a "wrapper" path which can hold on to multiple | ||||
| // paths that get passed to this method (if at all the task in the build is | // paths that get passed to this method (if at all the task in the build is | ||||
| // configured with multiple classpath elements) | |||||
| // configured with multiple classpaht elements) | |||||
| this.classPath = new Path(getProject()); | this.classPath = new Path(getProject()); | ||||
| } | } | ||||
| this.classPath.add(path); | this.classPath.add(path); | ||||
| @@ -31,7 +31,7 @@ import java.util.List; | |||||
| final class TestRequest implements AutoCloseable { | final class TestRequest implements AutoCloseable { | ||||
| private final TestDefinition ownerTest; | private final TestDefinition ownerTest; | ||||
| private final LauncherDiscoveryRequestBuilder discoveryRequest; | private final LauncherDiscoveryRequestBuilder discoveryRequest; | ||||
| private final List<Closeable> closeables = new ArrayList<>(); | |||||
| private final List<Closeable> closables = new ArrayList<>(); | |||||
| private final List<TestResultFormatter> interestedInSysOut = new ArrayList<>(); | private final List<TestResultFormatter> interestedInSysOut = new ArrayList<>(); | ||||
| private final List<TestResultFormatter> interestedInSysErr = new ArrayList<>(); | private final List<TestResultFormatter> interestedInSysErr = new ArrayList<>(); | ||||
| @@ -53,7 +53,7 @@ final class TestRequest implements AutoCloseable { | |||||
| if (closeable == null) { | if (closeable == null) { | ||||
| return; | return; | ||||
| } | } | ||||
| this.closeables.add(closeable); | |||||
| this.closables.add(closeable); | |||||
| } | } | ||||
| void addSysOutInterest(final TestResultFormatter out) { | void addSysOutInterest(final TestResultFormatter out) { | ||||
| @@ -81,10 +81,10 @@ final class TestRequest implements AutoCloseable { | |||||
| } | } | ||||
| public void close() throws Exception { | public void close() throws Exception { | ||||
| if (this.closeables.isEmpty()) { | |||||
| if (this.closables.isEmpty()) { | |||||
| return; | return; | ||||
| } | } | ||||
| for (final Closeable closeable : closeables) { | |||||
| for (final Closeable closeable : closables) { | |||||
| closeable.close(); | closeable.close(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -827,7 +827,7 @@ public class FTP extends Task implements FTPTaskConfig { | |||||
| if (!isCaseSensitive() && (remoteSystemCaseSensitive | if (!isCaseSensitive() && (remoteSystemCaseSensitive | ||||
| || !remoteSensitivityChecked)) { | || !remoteSensitivityChecked)) { | ||||
| currentPathElement = | currentPathElement = | ||||
| findPathElementCaseInsensitive(this.curpwd, | |||||
| findPathElementCaseUnsensitive(this.curpwd, | |||||
| currentPathElement); | currentPathElement); | ||||
| if (currentPathElement == null) { | if (currentPathElement == null) { | ||||
| return; | return; | ||||
| @@ -854,7 +854,7 @@ public class FTP extends Task implements FTPTaskConfig { | |||||
| * @param soughtPathElement what is being sought | * @param soughtPathElement what is being sought | ||||
| * @return the first file found or null if not found | * @return the first file found or null if not found | ||||
| */ | */ | ||||
| private String findPathElementCaseInsensitive(String parentPath, | |||||
| private String findPathElementCaseUnsensitive(String parentPath, | |||||
| String soughtPathElement) { | String soughtPathElement) { | ||||
| // we are already in the right path, so the second parameter | // we are already in the right path, so the second parameter | ||||
| // is false | // is false | ||||
| @@ -729,7 +729,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror { | |||||
| if (!this.client.changeWorkingDirectory(currentPathElement)) { | if (!this.client.changeWorkingDirectory(currentPathElement)) { | ||||
| if (!isCaseSensitive() && (remoteSystemCaseSensitive | if (!isCaseSensitive() && (remoteSystemCaseSensitive | ||||
| || !remoteSensitivityChecked)) { | || !remoteSensitivityChecked)) { | ||||
| currentPathElement = findPathElementCaseInsensitive(this.curpwd, | |||||
| currentPathElement = findPathElementCaseUnsensitive(this.curpwd, | |||||
| currentPathElement); | currentPathElement); | ||||
| if (currentPathElement == null) { | if (currentPathElement == null) { | ||||
| return; | return; | ||||
| @@ -752,7 +752,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror { | |||||
| * @param soughtPathElement what is being sought | * @param soughtPathElement what is being sought | ||||
| * @return the first file found or null if not found | * @return the first file found or null if not found | ||||
| */ | */ | ||||
| private String findPathElementCaseInsensitive(String parentPath, | |||||
| private String findPathElementCaseUnsensitive(String parentPath, | |||||
| String soughtPathElement) { | String soughtPathElement) { | ||||
| // we are already in the right path, so the second parameter | // we are already in the right path, so the second parameter | ||||
| // is false | // is false | ||||
| @@ -772,7 +772,7 @@ public abstract class MSVSS extends Task implements MSVSSConstants { | |||||
| } | } | ||||
| /** | /** | ||||
| * Extension of EnumeratedAttribute to hold the values for writable files. | |||||
| * Extension of EnumeratedAttribute to hold the values for writable filess. | |||||
| */ | */ | ||||
| public static class WritableFiles extends EnumeratedAttribute { | public static class WritableFiles extends EnumeratedAttribute { | ||||
| /** | /** | ||||
| @@ -95,7 +95,7 @@ public class MSVSSCHECKIN extends MSVSS { | |||||
| } | } | ||||
| /** | /** | ||||
| * Autoresponse behaviour. Valid options are Y and N. | |||||
| * Autoresponce behaviour. Valid options are Y and N. | |||||
| * | * | ||||
| * @param response The auto response value. | * @param response The auto response value. | ||||
| */ | */ | ||||
| @@ -118,7 +118,7 @@ import org.xml.sax.XMLReader; | |||||
| public class XMLCatalog extends DataType | public class XMLCatalog extends DataType | ||||
| implements EntityResolver, URIResolver { | implements EntityResolver, URIResolver { | ||||
| /** helper for some File.toURL conversions */ | |||||
| /** helper for some File.toURL connversions */ | |||||
| private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); | private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); | ||||
| //-- Fields ---------------------------------------------------------------- | //-- Fields ---------------------------------------------------------------- | ||||
| @@ -1228,7 +1228,7 @@ public class FileUtils { | |||||
| * @return true if path starts with leading; false otherwise. | * @return true if path starts with leading; false otherwise. | ||||
| * @since Ant 1.10.5 | * @since Ant 1.10.5 | ||||
| * @throws IOException if resolveSymlinks is true and invoking | * @throws IOException if resolveSymlinks is true and invoking | ||||
| * getCanonicalPath on either argument throws an exception | |||||
| * getCanonicaPath on either argument throws an exception | |||||
| */ | */ | ||||
| public boolean isLeadingPath(File leading, File path, boolean resolveSymlinks) | public boolean isLeadingPath(File leading, File path, boolean resolveSymlinks) | ||||
| throws IOException { | throws IOException { | ||||
| @@ -105,7 +105,7 @@ public class ProxySetup { | |||||
| owner.log(message, Project.MSG_DEBUG); | owner.log(message, Project.MSG_DEBUG); | ||||
| System.setProperty(USE_SYSTEM_PROXIES, proxies); | System.setProperty(USE_SYSTEM_PROXIES, proxies); | ||||
| } catch (SecurityException e) { | } catch (SecurityException e) { | ||||
| //log security exceptions and continue; it ain't that | |||||
| //log security exceptions and continue; it aint that | |||||
| //important and may be quite common running Ant embedded. | //important and may be quite common running Ant embedded. | ||||
| owner.log("Security Exception when " + message); | owner.log("Security Exception when " + message); | ||||
| } | } | ||||
| @@ -660,10 +660,10 @@ public class ZipOutputStream extends FilterOutputStream { | |||||
| } | } | ||||
| private boolean isZip64Required(ZipEntry entry1, Zip64Mode requestedMode) { | private boolean isZip64Required(ZipEntry entry1, Zip64Mode requestedMode) { | ||||
| return requestedMode == Zip64Mode.Always || isTooLargeForZip32(entry1); | |||||
| return requestedMode == Zip64Mode.Always || isTooLageForZip32(entry1); | |||||
| } | } | ||||
| private boolean isTooLargeForZip32(ZipEntry zipArchiveEntry) { | |||||
| private boolean isTooLageForZip32(ZipEntry zipArchiveEntry) { | |||||
| return zipArchiveEntry.getSize() >= ZIP64_MAGIC | return zipArchiveEntry.getSize() >= ZIP64_MAGIC | ||||
| || zipArchiveEntry.getCompressedSize() >= ZIP64_MAGIC; | || zipArchiveEntry.getCompressedSize() >= ZIP64_MAGIC; | ||||
| } | } | ||||
| @@ -61,7 +61,7 @@ if classes \= '' then classpath = prepend(classpath classes) | |||||
| classpath = prepend(classpath ANT_HOME || '\lib\ant-launcher.jar') | classpath = prepend(classpath ANT_HOME || '\lib\ant-launcher.jar') | ||||
| 'SET CLASSPATH=' || classpath | 'SET CLASSPATH=' || classpath | ||||
| /* Setting classpaths, options and arguments */ | |||||
| /* Setting classpathes, options and arguments */ | |||||
| envset = _getenv_('envset') | envset = _getenv_('envset') | ||||
| if cp\='' then interpret 'call "' || envset || '"' '"; CLASSPATH"' '"' || cp || '"' | if cp\='' then interpret 'call "' || envset || '"' '"; CLASSPATH"' '"' || cp || '"' | ||||
| if lcp\='' then interpret 'call "' || envset || '"' '"; LOCALCLASSPATH"' '"' || lcp || '"' | if lcp\='' then interpret 'call "' || envset || '"' '"; LOCALCLASSPATH"' '"' || lcp || '"' | ||||
| @@ -37,7 +37,7 @@ not interpreted | |||||
| the parameters are changed to name=expanded_name | the parameters are changed to name=expanded_name | ||||
| Other options have optional equal sign. If it is found, only the part after | Other options have optional equal sign. If it is found, only the part after | ||||
| the equal sign will be optionally expanded. | |||||
| the equal sign will be oprionally expanded. | |||||
| If the parameter is the minus sign, the next parameter will not be expanded. | If the parameter is the minus sign, the next parameter will not be expanded. | ||||
| If the parameter is a single dot, it will be replaced with the value of the | If the parameter is a single dot, it will be replaced with the value of the | ||||
| @@ -79,7 +79,7 @@ | |||||
| <a:something a:foo="bar"/> | <a:something a:foo="bar"/> | ||||
| </echoxml> | </echoxml> | ||||
| <au:assertResourceContains resource="${file}" value="a:something"/> | <au:assertResourceContains resource="${file}" value="a:something"/> | ||||
| <au:assertFalse message="Didn't expect ${file} to contain antlib:a"> | |||||
| <au:assertFalse message="Didn't expecte ${file} to contain antlib:a"> | |||||
| <resourcecontains resource="${file}" substring="antlib:a"/> | <resourcecontains resource="${file}" substring="antlib:a"/> | ||||
| </au:assertFalse> | </au:assertFalse> | ||||
| </target> | </target> | ||||
| @@ -197,7 +197,7 @@ public class UnzipTest { | |||||
| /** | /** | ||||
| * assert that a file exists, relative to the project | * assert that a file exists, relative to the project | ||||
| * @param message message if there is no match | |||||
| * @param message message if there is no mpatch | |||||
| * @param filename filename to resolve against the project | * @param filename filename to resolve against the project | ||||
| */ | */ | ||||
| private void assertFileExists(String message, String filename) { | private void assertFileExists(String message, String filename) { | ||||
| @@ -141,7 +141,7 @@ public class TraXLiaisonTest extends AbstractXSLTLiaisonTest implements XSLTLogg | |||||
| liaison.setStylesheet(xsl); | liaison.setStylesheet(xsl); | ||||
| liaison.addParam("param", "value"); | liaison.addParam("param", "value"); | ||||
| File in = getFile("/taskdefs/optional/xsltliaison-in.xml"); | File in = getFile("/taskdefs/optional/xsltliaison-in.xml"); | ||||
| // test for 10 consecutive transforms | |||||
| // test for 10 consecutives transform | |||||
| for (int i = 0; i < 50; i++) { | for (int i = 0; i < 50; i++) { | ||||
| File out = new File("xsltliaison" + i + ".tmp"); | File out = new File("xsltliaison" + i + ".tmp"); | ||||
| try { | try { | ||||
| @@ -81,9 +81,9 @@ public class ReaderInputStreamTest { | |||||
| } | } | ||||
| @Test | @Test | ||||
| public void testPreamble() { | |||||
| public void testPreample() { | |||||
| byte[] bytes = "".getBytes(StandardCharsets.UTF_16); | byte[] bytes = "".getBytes(StandardCharsets.UTF_16); | ||||
| System.out.println("Preamble len is " + bytes.length); | |||||
| System.out.println("Preample len is " + bytes.length); | |||||
| } | } | ||||
| @Test | @Test | ||||