CreateProcess error=206, The filename or extension is too long

I had the same problem.
I used

<fileset dir="${basedir}/build">
  <include name="**/*.class"/>
</fileset>

inside findbugs target and it seems that there is too much .class files to be passed to findbug (?via command line?) because when I used

<fileset dir="${basedir}/build/com/domain/package">
  <include name="**/*.class"/>
</fileset>

that had low number of classes, the error was gone.

So, I solved the problem by making one jar file and feeding it to findbugs target with

<findbugs home="${findbugs.home}">
  ...
  <class location="${basedir}/targets/classes-to-analyze.jar"/>
</findbugs>

Leave a Comment