title: Invoking FindBugs from Ant: passing a space-separated list of files to java
body: <p>I'm trying to invoke FindBugs from inside Ant. In order to control the amount of memory available to FindBugs, I've chosen not to use the ant-task. The problem I have now is that I want to pass a number of jars on the command-line to FindBugs:</p>
  
  <pre><code>java -jar .../findbugs.jar foo.jar bar.jar fie.jar
  </code></pre>
  
  <p>However, since these jars actually are Eclipse plugins, I don't know the exact name of the jars so I need a way to use a wildcard to obtain the list. This is what I've come up with:</p>
  
  <pre><code>&lt;target name="findbugs"&gt;
      &lt;property name="findbugs.home" location="${user.home}/eclipse/findbugs" /&gt;
      &lt;path id="findbugs.input"&gt;
          &lt;fileset dir="${testDirectory}/eclipse/plugins"&gt;
              &lt;include name="my.plugins.*.jar" /&gt;
          &lt;/fileset&gt;
      &lt;/path&gt;
      &lt;path id="findbugs.auxinput"&gt;
          &lt;fileset dir="${testDirectory}/eclipse/plugins"&gt;
              &lt;include name="*.jar" /&gt;
              &lt;include name="**/*.jar" /&gt;
          &lt;/fileset&gt;
      &lt;/path&gt;
      &lt;java jar="${findbugs.home}/lib/findbugs.jar" fork="true"&gt;
          &lt;jvmarg value="-Xmx1048m" /&gt;
          &lt;arg value="-textui" /&gt;
          &lt;arg value="-output" /&gt;
          &lt;arg value="findbugs.xml" /&gt;
          &lt;arg value="-xml" /&gt;
          &lt;arg value="-exclude" /&gt;
          &lt;arg value="${basedir}/findbugsExclude.xml" /&gt;
          &lt;arg value="-auxclasspath" /&gt;
          &lt;arg pathref="findbugs.auxinput"/&gt;
          &lt;arg pathref="findbugs.input" /&gt;
      &lt;/java&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>However, the <code>findbugs.input</code> pathref is a <strong>comma-separated</strong> list of jars, and not space-separated as FindBugs wants it. How do I get the list of jars as a space-separated list?</p>
  
  <p>(Is this perhaps easier to do with the FindBugs ant-task. I can't really tell from the documentation.) </p>