Getting NoClassDefFoundError when using findbugs

I am running gradle 2.4 with findbugs, the findbugs config is such:

findbugs {
    sourceSets = [sourceSets.main]
    ignoreFailures = true
}

The issue is that I get the following exception:

Caused by: java.lang.NoClassDefFoundError: [Ljavax/annotation/meta/When;
	at edu.umd.cs.findbugs.ba.jsr305.TypeQualifierAnnotation.<clinit>(TypeQualifierAnnotation.java:95)
	at edu.umd.cs.findbugs.FindBugs2.clearCaches(FindBugs2.java:318)
	at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:301)

So this might be a classpath issue with findbugs. I have multiple modules in my project, and this only fails on one of them. So I am not sure why I would get the error on one module, and not others. What can affect the classpath of findbugs? Can my dependencies override something in findbugs? Still can’t see how that would cause a class to disappear.

Ok, looks like I had the following at the top:

all*.exclude group: "com.google.code.findbugs", module: "jsr305"
all*.exclude group: "com.google.code.findbugs", module: "annotations"

I might need to see if removing those breaks something else. I know I had issues in the past with jsr305 annotations and jetty due to security constraints (javax.annotation package exists in java, with signing, the jsr305 classes are not part of that signature).