I’m trying to apply findbugs plugin to a 1.8 java project with Gradle 2.0. I use findbugs 3.0.0-rc2 which support Java 1.8. I started to add the findbugs jar to my local maven repository, then I specify the tool version like that :
apply plugin: 'findbugs'
findbugs {
toolVersion = "3.0.0-rc2"
}
I’ve the following error :
09:29:48.907 [DEBUG] [system.err] 09:29:48.905 [ERROR] [system.err] java.lang.NoClassDefFoundError: org/apache/bcel/classfile/ClassFormatException
09:29:48.969 [DEBUG] [system.err] 09:29:48.907 [ERROR] [system.err]
at org.gradle.api.plugins.quality.internal.findbugs.FindBugsExecuter.runFindbugs(FindBugsExecuter.java:41)
09:29:48.975 [DEBUG] [system.err] 09:29:48.908 [ERROR] [system.err]
at org.gradle.api.plugins.quality.internal.findbugs.FindBugsWorkerServer.execute(FindBugsWorkerServer.java:45)
09:29:48.981 [DEBUG] [system.err] 09:29:48.908 [ERROR] [system.err]
at org.gradle.api.plugins.quality.internal.findbugs.FindBugsWorkerServer.execute(FindBugsWorkerServer.java:35)
09:29:48.986 [DEBUG] [system.err] 09:29:48.909 [ERROR] [system.err]
at org.gradle.api.plugins.quality.internal.findbugs.FindBugsWorkerServer.execute(FindBugsWorkerServer.java:26)
09:29:48.994 [DEBUG] [system.err] 09:29:48.909 [ERROR] [system.err]
at org.gradle.process.internal.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:78)
09:29:49.000 [DEBUG] [system.err] 09:29:48.910 [ERROR] [system.err]
at org.gradle.process.internal.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:35)
09:29:49.004 [DEBUG] [system.err] 09:29:48.910 [ERROR] [system.err]
at org.gradle.process.internal.child.ImplementationClassLoaderWorker.execute(ImplementationClassLoaderWorker.java:85)
09:29:49.014 [DEBUG] [system.err] 09:29:48.911 [ERROR] [system.err]
at org.gradle.process.internal.child.ImplementationClassLoaderWorker.execute(ImplementationClassLoaderWorker.java:41)
09:29:49.018 [DEBUG] [system.err] 09:29:48.911 [ERROR] [system.err]
at org.gradle.process.internal.child.IsolatedApplicationClassLoaderWorker.call(IsolatedApplicationClassLoaderWorker.java:48)
09:29:49.027 [DEBUG] [system.err] 09:29:48.912 [ERROR] [system.err]
at org.gradle.process.internal.child.IsolatedApplicationClassLoaderWorker.call(IsolatedApplicationClassLoaderWorker.java:30)
09:29:49.033 [DEBUG] [system.err] 09:29:48.912 [ERROR] [system.err]
at org.gradle.process.internal.launcher.GradleWorkerMain.run(GradleWorkerMain.java:32)
09:29:49.037 [DEBUG] [system.err] 09:29:48.913 [ERROR] [system.err]
at org.gradle.process.internal.launcher.GradleWorkerMain.main(GradleWorkerMain.java:37)
09:29:49.047 [DEBUG] [system.err] 09:29:48.913 [ERROR] [system.err] Caused by: java.lang.ClassNotFoundException: org.apache.bcel.classfile.ClassFormatException
09:29:49.052 [DEBUG] [system.err] 09:29:48.914 [ERROR] [system.err]
at java.net.URLClassLoader$1.run(URLClassLoader.java2)7
09:29:49.061 [DEBUG] [system.err] 09:29:48.914 [ERROR] [system.err]
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
09:29:49.067 [DEBUG] [system.err] 09:29:48.915 [ERROR] [system.err]
at java.security.AccessController.doPrivileged(Native Method)
09:29:49.071 [DEBUG] [system.err] 09:29:48.915 [ERROR] [system.err]
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
09:29:49.080 [DEBUG] [system.err] 09:29:48.916 [ERROR] [system.err]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
09:29:49.086 [DEBUG] [system.err] 09:29:48.916 [ERROR] [system.err]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
09:29:49.094 [DEBUG] [system.err] 09:29:48.916 [ERROR] [system.err]
... 12 more
09:29:48.940 [ERROR] [org.gradle.messaging.remote.internal.hub.MessageHubBackedObjectConnection] Unexpected exception thrown.
org.gradle.messaging.remote.internal.MessageIOException: Could not write message [EndOfStream] to '/127.0.0.1:51354'.
at org.gradle.messaging.remote.internal.inet.SocketConnection.dispatch(SocketConnection.java:115)
at org.gradle.messaging.remote.internal.hub.MessageHub$ConnectionDispatch.run(MessageHub.java:279)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Une connexion existante a d¹ Ûtre fermÚe par lÆh¶te distant
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:51)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:466)
at org.gradle.messaging.remote.internal.inet.SocketConnection$SocketOutputStream.flush(SocketConnection.java:230)
at org.gradle.messaging.remote.internal.inet.SocketConnection.dispatch(SocketConnection.java:113)
... 5 more
09:29:49.102 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
09:29:49.136 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'Gradle FindBugs Worker 1' finished with exit value 1 (state: FAILED)
How can I add the missing dependency to the findbugs executor?