From: Eric P. <de...@us...> - 2005-05-06 22:05:07
|
dep4b 05/05/06 15:05:01 Modified: findbugs/xdocs properties.xml changes.xml findbugs plugin.jelly project.xml Log: add include/exclude filters for what bug patterns to match. Revision Changes Path 1.5 +18 -0 maven-plugins/findbugs/xdocs/properties.xml Index: properties.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/findbugs/xdocs/properties.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- properties.xml 7 Sep 2004 09:17:19 -0000 1.4 +++ properties.xml 6 May 2005 22:05:00 -0000 1.5 @@ -58,6 +58,24 @@ </p> </td> </tr> + <tr> + <td>maven.findbugs.excludeFilter</td> + <td>Yes</td> + <td> + <p> + Report all bug instances except those matching the filter specified in the xml Filter file. See http://findbugs.sourceforge.net for more information. + </p> + </td> + </tr> + <tr> + <td>maven.findbugs.includeFilter</td> + <td>Yes</td> + <td> + <p> + Only report bug instances that match the filter specified in the xml Filter file. See http://findbugs.sourceforge.net for more information. + </p> + </td> + </tr> </table> </section> 1.16 +18 -1 maven-plugins/findbugs/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/findbugs/xdocs/changes.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- changes.xml 18 Mar 2005 22:49:57 -0000 1.15 +++ changes.xml 6 May 2005 22:05:01 -0000 1.16 @@ -6,7 +6,24 @@ </properties> <body> - <release version="0.8.6" date="s"> + <release version="0.8.8" date="in CVS"> + <action dev="gleclaire" type="add"> + Added maven.findbugs.debug property. + </action> + <action dev="gleclaire" type="add"> + Added maven.findbugs.jvmargs property. + </action> + <action dev="gleclaire" type="add"> + Added maven.findbugs.excludeFilter property. + </action> + <action dev="gleclaire" type="add"> + Added maven.findbugs.includeFilter property. + </action> + <action dev="epugh" type="update"> + Use findbugs version 0.8.8. + </action> + </release> + <release version="0.8.6" date=""> <action dev="epugh" type="update"> Use findbugs version 0.8.6. Jar's are included as part of the plugin. </action> 1.10 +174 -166 maven-plugins/findbugs/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/findbugs/plugin.jelly,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- plugin.jelly 18 Mar 2005 22:49:57 -0000 1.9 +++ plugin.jelly 6 May 2005 22:05:01 -0000 1.10 @@ -1,166 +1,174 @@ -<?xml version="1.0"?> - -<!-- - ============================================================================= - FindBugs Plugin. Generate FindBugs reports using the FindBugs framework. - ============================================================================= ---> -<project xmlns:j="jelly:core" xmlns:doc="doc" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven" > - - <!-- - ======================================================================== - Register a FindBugs report. - ======================================================================== - --> - <goal name="maven-findbugs-plugin:register"> - <j:if test="${sourcesPresent}"> - <doc:registerReport - name="FindBugs Report" - pluginName="maven-findbugs-plugin" - description="Verification of coding rules." - link="findbugs-report"/> - </j:if> - </goal> - - <!-- - ======================================================================== - Deregister a FindBugs report. - ======================================================================== - --> - <goal name="maven-findbugs-plugin:deregister"> - <j:if test="${sourcesPresent}"> - <doc:deregisterReport name="FindBugs Report"/> - </j:if> - </goal> - - <!-- - ======================================================================== - Main FindBugs plugin goal. - ======================================================================== - --> - <goal name="findbugs" description="Static Code Analyzer"> - - <!-- Only run FindBugs if it is enabled --> - <j:set var="enable" value="${maven.findbugs.enable}"/> - - <j:if test="${enable == 'true'}"> - <attainGoal name="maven-findbugs-plugin:report"/> - </j:if> - - </goal> - - <!-- - ======================================================================== - Generate the FindBugs report. - ======================================================================== - --> - <goal name="maven-findbugs-plugin:report" - description="Generate source code report with FindBugs"> - - <attainGoal name="java:compile"/> - - <!-- Create the dirs if we start from a previously cleaned project --> - <mkdir dir="${maven.build.dir}"/> - <mkdir dir="${maven.docs.dest}"/> - - <!-- Define a FindBugs task with the rulesets and all jars in the - classpath --> - <path id="findbugs.classpath"> - <fileset dir="${plugin.resources}/jars"> - <include name="**/*.jar"/> - <!--exclude name="**/*plugin*.jar"/--> - </fileset> - <pathelement location="${plugin.getDependencyPath('dom4j:dom4j')}" /> - </path> - - <path id="findbugs.pluginlist"> - <fileset dir="${plugin.resources}/jars"> - <include name="**/*plugin*.jar"/> - </fileset> - </path> - - <ant:taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"> - <classpath refid="findbugs.classpath"/> - </ant:taskdef> - - <!-- Run the FindBugs task - need a way to define the rulesets dynamically --> - <echo>Running the FindBugs task...</echo> - - - <findbugs classpathref="findbugs.classpath" - pluginlistref="findbugs.pluginlist" - reportLevel="${maven.findbugs.detail}" - conserveSpace="${maven.findbugs.conserveSpace}" - debug="${maven.findbugs.debug}" - output="xdocs" - outputFile="${maven.build.dir}/findbugs-raw-report.xml"> - - <j:if test="${context.getVariable('maven.findbugs.jvmargs') != null}"> - <ant:setProperty name="jvmargs" value="${maven.findbugs.jvmargs}" /> - </j:if> - - <j:forEach var="lib" items="${pom.artifacts}"> - <j:if test="${lib.dependency.type =='jar'}"> - <auxClasspath path="${lib.path}"/> - </j:if> - </j:forEach> - <sourcePath path="${basedir}/src/java" /> - <j:if test="${sourcesPresent}"> - <j:set var="srcDir" value="${pom.build.sourceDirectory}"/> - <j:if test="${ srcDir.startsWith( basedir ) }"> - - <j:set var="srcDir" value="${srcDir.substring(basedir.length())}"/> - <!-- - cut off also slash or backslash from basedir. - Is there a way to make it in one step in Jelly? - --> - <j:set var="srcDir" value="${srcDir.substring(1)}"/> - </j:if> - <sourcePath path="${srcDir}"/> - </j:if> - <!--class location="${maven.build.dir}/${maven.final.name}.jar" /--> - <class location="${maven.build.dest}" /> - </findbugs> - - <!-- Run JSL to transform the report into XDOC --> - - <echo>Converting the FindBugs report to xdoc ...</echo> - - <doc:jsl - input="${maven.build.dir}/findbugs-raw-report.xml" - output="findbugs-report.xml" - stylesheet="${plugin.resources}/findbugs.jsl" - outputMode="xml" - prettyPrint="true" - /> - - </goal> - - <!-- - ======================================================================== - Register the FindBugs report to the "site" plugin. - ======================================================================== - --> - <goal name="maven-findbugs-plugin:register"> - <j:if test="${sourcesPresent == 'true'}"> - <doc:registerReport - name="FindBugs" - pluginName="maven-findbugs-plugin" - link="findbugs" - description="Report on bug patterns found in compiled code."/> - </j:if> - </goal> - - <!-- - ======================================================================== - Deregister the FindBugs report from the "site" plugin. - ======================================================================== - --> - <goal name="maven-findbugs-plugin:deregister"> - <j:if test="${sourcesPresent == 'true'}"> - <doc:deregisterReport name="FindBugs"/> - </j:if> - </goal> - - -</project> +<?xml version="1.0"?> + +<!-- + ============================================================================= + FindBugs Plugin. Generate FindBugs reports using the FindBugs framework. + ============================================================================= +--> +<project xmlns:j="jelly:core" xmlns:doc="doc" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven" > + + <!-- + ======================================================================== + Register a FindBugs report. + ======================================================================== + --> + <goal name="maven-findbugs-plugin:register"> + <j:if test="${sourcesPresent}"> + <doc:registerReport + name="FindBugs Report" + pluginName="maven-findbugs-plugin" + description="Verification of coding rules." + link="findbugs-report"/> + </j:if> + </goal> + + <!-- + ======================================================================== + Deregister a FindBugs report. + ======================================================================== + --> + <goal name="maven-findbugs-plugin:deregister"> + <j:if test="${sourcesPresent}"> + <doc:deregisterReport name="FindBugs Report"/> + </j:if> + </goal> + + <!-- + ======================================================================== + Main FindBugs plugin goal. + ======================================================================== + --> + <goal name="findbugs" description="Static Code Analyzer"> + + <!-- Only run FindBugs if it is enabled --> + <j:set var="enable" value="${maven.findbugs.enable}"/> + + <j:if test="${enable == 'true'}"> + <attainGoal name="maven-findbugs-plugin:report"/> + </j:if> + + </goal> + + <!-- + ======================================================================== + Generate the FindBugs report. + ======================================================================== + --> + <goal name="maven-findbugs-plugin:report" + description="Generate source code report with FindBugs"> + + <attainGoal name="java:compile"/> + + <!-- Create the dirs if we start from a previously cleaned project --> + <mkdir dir="${maven.build.dir}"/> + <mkdir dir="${maven.docs.dest}"/> + + <!-- Define a FindBugs task with the rulesets and all jars in the + classpath --> + <path id="findbugs.classpath"> + <fileset dir="${plugin.resources}/jars"> + <include name="**/*.jar"/> + <!--exclude name="**/*plugin*.jar"/--> + </fileset> + <pathelement location="${plugin.getDependencyPath('dom4j:dom4j')}" /> + </path> + + <path id="findbugs.pluginlist"> + <fileset dir="${plugin.resources}/jars"> + <include name="**/*plugin*.jar"/> + </fileset> + </path> + + <ant:taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"> + <classpath refid="findbugs.classpath"/> + </ant:taskdef> + + <!-- Run the FindBugs task - need a way to define the rulesets dynamically --> + <echo>Running the FindBugs task...</echo> + + + <findbugs classpathref="findbugs.classpath" + pluginlistref="findbugs.pluginlist" + reportLevel="${maven.findbugs.detail}" + conserveSpace="${maven.findbugs.conserveSpace}" + debug="${maven.findbugs.debug}" + output="xdocs" + outputFile="${maven.build.dir}/findbugs-raw-report.xml"> + + <j:if test="${context.getVariable('maven.findbugs.jvmargs') != null}"> + <ant:setProperty name="jvmargs" value="${maven.findbugs.jvmargs}" /> + </j:if> + + <j:if test="${context.getVariable('maven.findbugs.excludeFilter') != null}"> + <ant:setProperty name="excludeFilter" value="${maven.findbugs.excludeFilter}" /> + </j:if> + + <j:if test="${context.getVariable('maven.findbugs.includeFilter') != null}"> + <ant:setProperty name="includeFilter" value="${maven.findbugs.includeFilter}" /> + </j:if> + + <j:forEach var="lib" items="${pom.artifacts}"> + <j:if test="${lib.dependency.type =='jar'}"> + <auxClasspath path="${lib.path}"/> + </j:if> + </j:forEach> + <sourcePath path="${basedir}/src/java" /> + <j:if test="${sourcesPresent}"> + <j:set var="srcDir" value="${pom.build.sourceDirectory}"/> + <j:if test="${ srcDir.startsWith( basedir ) }"> + + <j:set var="srcDir" value="${srcDir.substring(basedir.length())}"/> + <!-- + cut off also slash or backslash from basedir. + Is there a way to make it in one step in Jelly? + --> + <j:set var="srcDir" value="${srcDir.substring(1)}"/> + </j:if> + <sourcePath path="${srcDir}"/> + </j:if> + <!--class location="${maven.build.dir}/${maven.final.name}.jar" /--> + <class location="${maven.build.dest}" /> + </findbugs> + + <!-- Run JSL to transform the report into XDOC --> + + <echo>Converting the FindBugs report to xdoc ...</echo> + + <doc:jsl + input="${maven.build.dir}/findbugs-raw-report.xml" + output="findbugs-report.xml" + stylesheet="${plugin.resources}/findbugs.jsl" + outputMode="xml" + prettyPrint="true" + /> + + </goal> + + <!-- + ======================================================================== + Register the FindBugs report to the "site" plugin. + ======================================================================== + --> + <goal name="maven-findbugs-plugin:register"> + <j:if test="${sourcesPresent == 'true'}"> + <doc:registerReport + name="FindBugs" + pluginName="maven-findbugs-plugin" + link="findbugs" + description="Report on bug patterns found in compiled code."/> + </j:if> + </goal> + + <!-- + ======================================================================== + Deregister the FindBugs report from the "site" plugin. + ======================================================================== + --> + <goal name="maven-findbugs-plugin:deregister"> + <j:if test="${sourcesPresent == 'true'}"> + <doc:deregisterReport name="FindBugs"/> + </j:if> + </goal> + + +</project> 1.21 +2 -2 maven-plugins/findbugs/project.xml Index: project.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/findbugs/project.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- project.xml 18 Mar 2005 22:49:57 -0000 1.20 +++ project.xml 6 May 2005 22:05:01 -0000 1.21 @@ -6,14 +6,14 @@ <id>maven-findbugs-plugin</id> <name>FindBugs Plug-in</name> <!-- groupId is in parent --> - <currentVersion>0.8.6-SNAPSHOT</currentVersion> + <currentVersion>0.8.8-SNAPSHOT</currentVersion> <!-- organization is in parent --> <inceptionYear>2003</inceptionYear> <!-- package, logo are in parent. no gumpRepositoryId --> <description>A plugin to automate FindBugs tasks</description> <shortDescription>Findbugs tasks</shortDescription> <!-- issue tracking url, siteAddress are in parent --> - <siteDirectory>/home/groups/m/ma/maven-plugins/htdocs/findbugs/</siteDirectory> + <siteDirectory>/home/groups/m/ma/maven-plugins/htdocs/maven-findbugs-plugin/</siteDirectory> <repository> <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/maven-plugins:maven-plugins/findbugs</connection> |