From: Lukas T. <luk...@us...> - 2007-05-29 20:55:13
|
lukas_theussl 07/05/29 13:54:59 Modified: findbugs/src/plugin-resources findbugs.jsl findbugs/xdocs changes.xml findbugs project.xml plugin.jelly Log: Prepare next version. Update to findbugs 1.2.0. Fix invalid xhtml generated by plugin. Revision Changes Path 1.5 +124 -120 maven-plugins/findbugs/src/plugin-resources/findbugs.jsl Index: findbugs.jsl =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/findbugs/src/plugin-resources/findbugs.jsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- findbugs.jsl 29 May 2007 20:43:33 -0000 1.4 +++ findbugs.jsl 29 May 2007 20:54:58 -0000 1.5 @@ -1,120 +1,124 @@ -<?xml version="1.0"?> - -<jsl:stylesheet - select="$doc" - xmlns:j="jelly:core" - xmlns:jsl="jelly:jsl" - xmlns:util="jelly:util" - xmlns:x="jelly:xml" - xmlns:doc="doc" - xmlns="dummy" trim="false"> - - <!-- This needs to be instantiated here to be available in the template matches --> - <j:useBean var="mavenTool" class="org.apache.maven.util.MavenTool"/> - <j:useBean var="htmlescape" class="org.apache.velocity.anakia.Escape"/> - <j:useBean var="fileutil" class="org.apache.velocity.texen.util.FileUtil"/> - <j:useBean var="pathtool" class="org.apache.maven.util.DVSLPathTool"/> - - <jsl:template match="BugCollection"> - <document> - - <properties> - <title>FindBugs Results</title> - </properties> - - <body> - <section name="FindBugs Results"> - <p> - The following document contains the results of - <a - href="http://findbugs.sourceforge.net/">FindBugs</a>. - </p> - </section> - - <section name="Summary"> - <j:set var="fileCount"><x:expr select="count(file)"/></j:set> - <j:set var="errorCount"><x:expr select="count(file/BugInstance)"/></j:set> - <table> - <tr> - <th>Files</th> - <th>Errors</th> - </tr> - <tr> - <td><doc:formatAsNumber string="${fileCount}" pattern="0"/></td> - <td><doc:formatAsNumber string="${errorCount}" pattern="0"/></td> - </tr> - </table> - </section> - - <section name="Files"> - <table> - <tr> - <th>Files</th> - <th>Violations</th> - </tr> - <x:set var="files" select="file"/> - <!-- x:forEach is busted --> - <j:forEach var="file" items="${files}"> - - <j:set var="name" value="${file.attribute('classname').getValue()}"/> - <!--- +1 is for the trailing slash above --> - <j:set var="errorCount"><x:expr select="count($file/BugInstance)"/></j:set> - - <j:if test="${errorCount != 0}"> - <tr> - <td> - <a href="#${name}">${name}</a> - </td> - <td><doc:formatAsNumber string="${errorCount}" pattern="0"/></td> - </tr> - </j:if> - </j:forEach> - </table> - - <j:forEach var="file" items="${files}"> - <x:set var="errorCount" select="count($file/BugInstance)"/> - <j:if test="${errorCount != 0}"> - <j:set var="name" value="${file.attribute('classname').getValue()}"/> - <subsection name="${name}"> - <table> - <tr> - <th>Violation</th> - <th>Line</th> - <th>Priority</th> - </tr> - <x:set var="errors" select="$file/BugInstance"/> - <j:forEach var="error" items="${errors}"> - <tr> - <td> - <j:set var="errorMessage" value="${error.attribute('message').getValue()}"/> - <a alt="Bug Description" title="Bug Description" target="_blank" - href="http://findbugs.sourceforge.net/bugDescriptions.html#${error.attribute('type').getValue()}"> - ${htmlescape.getText(errorMessage)} - </a> - </td> - <td> - <j:set var="line" value="${error.attribute('line').getValue()}"/> - <util:replace var="jxrName1" value="${name}" oldChar="." newChar="/"/> - <util:tokenize var="jxrName2" delim="\$">${jxrName1}</util:tokenize> - - <j:set var="loopOnceVar" value="TRUE"/> - <j:forEach var="jxrName3" items="${jxrName2}"> - <j:if test="${loopOnceVar=='TRUE'}"> - <a href="xref/${jxrName3}.html#${line}">${line}</a> - <j:set var="loopOnceVar" value="FALSE"/> - </j:if> - </j:forEach> - </td> - <td>${error.attribute('priority').getValue()} - </td> - </tr> - </j:forEach> - </table> - </subsection> - </j:if> - </j:forEach> - </section> - </body> - </document> - </jsl:template> -</jsl:stylesheet> +<?xml version="1.0"?> + +<jsl:stylesheet + select="$doc" + xmlns:j="jelly:core" + xmlns:jsl="jelly:jsl" + xmlns:util="jelly:util" + xmlns:x="jelly:xml" + xmlns:doc="doc" + xmlns="dummy" trim="false"> + + <!-- This needs to be instantiated here to be available in the template matches --> + <j:useBean var="mavenTool" class="org.apache.maven.util.MavenTool"/> + <j:useBean var="htmlescape" class="org.apache.velocity.anakia.Escape"/> + <j:useBean var="fileutil" class="org.apache.velocity.texen.util.FileUtil"/> + <j:useBean var="pathtool" class="org.apache.maven.util.DVSLPathTool"/> + + <jsl:template match="BugCollection"> + <document> + + <properties> + <title>FindBugs Results</title> + </properties> + + <body> + <section name="FindBugs Results"> + <p> + The following document contains the results of + <a + href="http://findbugs.sourceforge.net/">FindBugs</a>. + </p> + </section> + + <section name="Summary"> + <j:set var="fileCount"><x:expr select="count(file)"/></j:set> + <j:set var="errorCount"><x:expr select="count(file/BugInstance)"/></j:set> + <table> + <tr> + <th>Files</th> + <th>Errors</th> + </tr> + <tr> + <td><doc:formatAsNumber string="${fileCount}" pattern="0"/></td> + <td><doc:formatAsNumber string="${errorCount}" pattern="0"/></td> + </tr> + </table> + </section> + + <section name="Files"> + <table> + <tr> + <th>Files</th> + <th>Violations</th> + </tr> + <x:set var="files" select="file"/> + <!-- x:forEach is busted --> + <j:forEach var="file" items="${files}"> + + <j:set var="name" value="${file.attribute('classname').getValue()}"/> + <util:replace var="escapename" value="${name}" oldChar="$" newChar="_"/> + <util:replace var="escapename" value="${escapename}" oldChar="." newChar="_"/> + <!--- +1 is for the trailing slash above --> + <j:set var="errorCount"><x:expr select="count($file/BugInstance)"/></j:set> + + <j:if test="${errorCount != 0}"> + <tr> + <td> + <a href="#${escapename}">${name}</a> + </td> + <td><doc:formatAsNumber string="${errorCount}" pattern="0"/></td> + </tr> + </j:if> + </j:forEach> + </table> + + <j:forEach var="file" items="${files}"> + <x:set var="errorCount" select="count($file/BugInstance)"/> + <j:if test="${errorCount != 0}"> + <j:set var="name" value="${file.attribute('classname').getValue()}"/> + <util:replace var="escapename" value="${name}" oldChar="$" newChar="_"/> + <util:replace var="escapename" value="${escapename}" oldChar="." newChar="_"/> + <subsection name="${name}" id="${escapename}"> + <table> + <tr> + <th>Violation</th> + <th>Line</th> + <th>Priority</th> + </tr> + <x:set var="errors" select="$file/BugInstance"/> + <j:forEach var="error" items="${errors}"> + <tr> + <td> + <j:set var="errorMessage" value="${error.attribute('message').getValue()}"/> + <a title="Bug Description" target="_blank" + href="http://findbugs.sourceforge.net/bugDescriptions.html#${error.attribute('type').getValue()}"> + ${htmlescape.getText(errorMessage)} + </a> + </td> + <td> + <j:set var="line" value="${error.attribute('line').getValue()}"/> + <util:replace var="jxrName1" value="${name}" oldChar="." newChar="/"/> + <util:tokenize var="jxrName2" delim="\$">${jxrName1}</util:tokenize> + + <j:set var="loopOnceVar" value="TRUE"/> + <j:forEach var="jxrName3" items="${jxrName2}"> + <j:if test="${loopOnceVar=='TRUE'}"> + <a href="xref/${jxrName3}.html#${line}">${line}</a> + <j:set var="loopOnceVar" value="FALSE"/> + </j:if> + </j:forEach> + </td> + <td>${error.attribute('priority').getValue()} + </td> + </tr> + </j:forEach> + </table> + </subsection> + </j:if> + </j:forEach> + </section> + </body> + </document> + </jsl:template> +</jsl:stylesheet> 1.36 +4 -0 maven-plugins/findbugs/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/findbugs/xdocs/changes.xml,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- changes.xml 28 Jan 2007 15:37:15 -0000 1.35 +++ changes.xml 29 May 2007 20:54:59 -0000 1.36 @@ -7,6 +7,10 @@ <author email="jef...@so...">Jeff Jensen</author> </properties> <body> + <release version="1.4-SNAPSHOT" date="in CVS"> + <action dev="lukas_theussl" type="update">Update to findbugs 1.2.0.</action> + <action dev="lukas_theussl" type="fix">Plugin produced invalid xhtml.</action> + </release> <release version="1.3.1" date="2007-01-28"> <action dev="jeffjensen" type="update" issue="1536970" due-to="Shinobu Kawai"> Should use prereqs for java:compile. 1.46 +40 -9 maven-plugins/findbugs/project.xml Index: project.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/findbugs/project.xml,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- project.xml 17 May 2007 20:22:37 -0000 1.45 +++ project.xml 29 May 2007 20:54:59 -0000 1.46 @@ -11,7 +11,7 @@ <name>FindBugs Plug-in</name> <!-- groupId is in parent --> - <currentVersion>1.3.1</currentVersion> + <currentVersion>1.4-SNAPSHOT</currentVersion> <!-- organization is in parent --> <inceptionYear>2003</inceptionYear> @@ -112,30 +112,61 @@ <dependencies> <dependency> - <groupId>findbugs</groupId> + <groupId>net.sourceforge.findbugs</groupId> <artifactId>bcel</artifactId> - <version>5.1</version> + <version>1.2.0</version> </dependency> <dependency> - <groupId>findbugs</groupId> + <groupId>net.sourceforge.findbugs</groupId> <artifactId>coreplugin</artifactId> - <version>1.0.0</version> + <version>1.2.0</version> </dependency> <dependency> - <groupId>findbugs</groupId> + <groupId>net.sourceforge.findbugs</groupId> <artifactId>findbugs</artifactId> - <version>1.0.0</version> + <version>1.2.0</version> </dependency> <dependency> - <groupId>findbugs</groupId> + <groupId>net.sourceforge.findbugs</groupId> <artifactId>findbugs-ant</artifactId> - <version>1.0.0</version> + <version>1.2.0</version> </dependency> <dependency> <groupId>dom4j</groupId> <artifactId>dom4j</artifactId> <version>1.4</version> </dependency> + <!-- Transitive deps needed by findbugs --> + <dependency> + <groupId>asm</groupId> + <artifactId>asm</artifactId> + <version>3.0</version> + </dependency> + <dependency> + <groupId>asm</groupId> + <artifactId>asm-analysis</artifactId> + <version>3.0</version> + </dependency> + <dependency> + <groupId>asm</groupId> + <artifactId>asm-commons</artifactId> + <version>3.0</version> + </dependency> + <dependency> + <groupId>asm</groupId> + <artifactId>asm-tree</artifactId> + <version>3.0</version> + </dependency> + <dependency> + <groupId>asm</groupId> + <artifactId>asm-util</artifactId> + <version>3.0</version> + </dependency> + <dependency> + <groupId>asm</groupId> + <artifactId>asm-xml</artifactId> + <version>3.0</version> + </dependency> </dependencies> <!-- build is in the parent --> <!-- reports is in the parent --> 1.18 +11 -5 maven-plugins/findbugs/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/findbugs/plugin.jelly,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- plugin.jelly 9 Aug 2006 02:13:29 -0000 1.17 +++ plugin.jelly 29 May 2007 20:54:59 -0000 1.18 @@ -64,15 +64,21 @@ <!-- Define a FindBugs task with the rulesets and all jars in the classpath --> <path id="findbugs.classpath"> - <pathelement location="${plugin.getDependencyPath('findbugs:bcel')}"/> - <pathelement location="${plugin.getDependencyPath('findbugs:coreplugin')}"/> - <pathelement location="${plugin.getDependencyPath('findbugs:findbugs')}"/> - <pathelement location="${plugin.getDependencyPath('findbugs:findbugs-ant')}"/> + <pathelement location="${plugin.getDependencyPath('net.sourceforge.findbugs:bcel')}"/> + <pathelement location="${plugin.getDependencyPath('net.sourceforge.findbugs:coreplugin')}"/> + <pathelement location="${plugin.getDependencyPath('net.sourceforge.findbugs:findbugs')}"/> + <pathelement location="${plugin.getDependencyPath('net.sourceforge.findbugs:findbugs-ant')}"/> <pathelement location="${plugin.getDependencyPath('dom4j:dom4j')}" /> + <pathelement location="${plugin.getDependencyPath('asm:asm')}" /> + <pathelement location="${plugin.getDependencyPath('asm:asm-analysis')}" /> + <pathelement location="${plugin.getDependencyPath('asm:asm-commons')}" /> + <pathelement location="${plugin.getDependencyPath('asm:asm-tree')}" /> + <pathelement location="${plugin.getDependencyPath('asm:asm-util')}" /> + <pathelement location="${plugin.getDependencyPath('asm:asm-xml')}" /> </path> <path id="findbugs.pluginlist"> - <pathelement location="${plugin.getDependencyPath('findbugs:coreplugin')}"/> + <pathelement location="${plugin.getDependencyPath('net.sourceforge.findbugs:coreplugin')}"/> <j:if test="${context.getVariable('maven.findbugs.plugins') != null}"> <pathelement path="${maven.findbugs.plugins}"/> </j:if> |