Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to configure FindBugs to run only on one project in a multi-module maven project
    text
    copied!<p>I use the findbugs-maven-plugin to check for bugs with maven. My maven project is a multi-module project that roughly looks as follows:</p> <pre><code>java-module pom.xml src/ ... pom.xml scala-module pom.xml src/ ... </code></pre> <p>I use Jenkins to build and test the project, and Jenkins runs goal <code>findbugs:findbugs</code> in the top-most directory. Since FindBugs reports many spurious warnings for code that is generated by the Scala compiler, I would like to tell FindBugs not to analyze the code in <code>scala-module</code>. However, when I run <code>findbugs:findbugs</code> in the top-most directory, it always analyzes all classes in <code>java-module</code> and <code>scala-module</code>. How can I tell maven to ignore <code>scala-module</code> as a whole? I know about FindBugs exclude filters but I would to have a configuration option for FindBugs that tells it to simply not analyze the code in a certain submodule.</p> <p>FindBugs is configured in <code>pom.xml</code> in subdirectory <code>java-module</code> as follows:</p> <pre><code>&lt;reporting&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;findbugs-maven-plugin&lt;/artifactId&gt; &lt;version&gt;${version.plugin.codehaus.findbugs}&lt;/version&gt; &lt;configuration&gt; &lt;findbugsXmlOutput&gt;true&lt;/findbugsXmlOutput&gt; &lt;findbugsXmlWithMessages&gt;true&lt;/findbugsXmlWithMessages&gt; &lt;xmlOutput&gt;true&lt;/xmlOutput&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/reporting&gt; </code></pre> <p>Despite the configuration being done only for the <code>java-module</code>, FindBugs will always also analyze <code>scala-module</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload