21

The team are using find bugs. I would like to skip using find bugs.

I can see it has an option maven.findbugs.enable,but I don't know how to use that as an argument to maven.

I have tried - Dmaven.findbugs.enable=false but I can see find bugs is still running.

What is the argument to stop findbugs?

Rishikesh Darandale
  • 3,222
  • 4
  • 17
  • 35
bharal
  • 15,461
  • 36
  • 117
  • 195
  • 3
    Did you try using `-Dfindbugs.skip=true`? https://gleclaire.github.io/findbugs-maven-plugin/check-mojo.html#skip – Tome Nov 02 '17 at 14:29
  • The only mention of the `maven.findbugs.enable` parameter date from the 1.4 version from 2007 ! http://maven-plugins.sourceforge.net/maven-findbugs-plugin/properties.html What version are you using? – Pierre B. Nov 02 '17 at 16:39
  • @halfer hi. you've made 8 comments against me in 10 mins... did I upset you? I meant see in this case – bharal Dec 31 '17 at 01:55
  • @bharal: you have not upset me at all, no - comments are usually a good thing. (If I point out a typographical error, please fix it, so that the question is in a readable condition for future readers. I have fixed it on this occasion). – halfer Dec 31 '17 at 01:58
  • 1
    (Ah, I think the messages you have received are _edit notifications_ - I didn't think I had commented that number of times. Obviously, post improvements are good to receive too.) – halfer Dec 31 '17 at 02:02
  • Both -Dfindbugs.skip=true, -Dfindbugs.skip didn't work for me. I wanted to use it as a workaround for the issue https://stackoverflow.com/questions/53676071/maven-clean-command-java-util-collections-unmodifiablerandomaccesslist-to-prope/55834783#55834783, but I got the error anyway: Unable to parse configuration of mojo org.codehaus.mojo:findbugs-maven-plugin:3.0.3:findbugs for parameter pluginArtifacts: Cannot assign configuration entry 'pluginArtifacts' with value '${plugin.artifacts}' of type java.util.Collections.UnmodifiableRandomAccessList to property of type java.util.ArrayList – Alexander Samoylov Apr 24 '19 at 16:38

4 Answers4

28

If you are using FindBugs 3.x:

mvn [goal] -Dfindbugs.skip=true

According to the FindBugs documentation. This should work for the check and findbugs goals.

Pierre B.
  • 11,612
  • 1
  • 37
  • 58
22

Although unrelated to this question, Spotbugs is the successor of Findbugs and to skip it we need to pass the below flag:

-Dspotbugs.skip=true
veben
  • 19,637
  • 14
  • 60
  • 80
sujikin
  • 351
  • 3
  • 11
4

Run the following for maven version 3.0.5 and above.

mvn [goal] -Dfindbugs.skip
Kasun Siyambalapitiya
  • 3,956
  • 8
  • 38
  • 58
-2

Although the above answers work, I found that this error disappeared for me when I downgraded from Java 11 to Java 8. For reference, I am using Maven version 3.3.9.

Khalil
  • 175
  • 2
  • 8