 <p>To set the composer autoloader you can create a target as:</p> <pre><code>&lt;target name="require.autoload"&gt; &lt;adhoc&gt;&lt;![CDATA[ require_once 'lib/composer/autoload.php'; ]]&gt;&lt;/adhoc&gt; &lt;/target&gt; </code></pre> <p>Then all the targets that need autoloader, has this requirement</p> <pre><code> &lt;target name="test.coverage.html" depends="require.autoload"&gt; </code></pre> <p>Note: require once the file placed in</p> <pre><code>"config": { "vendor-dir": "lib/composer" </code></pre>