Q:

Using Api gen with ant

I user apigen to genereate my phpdoc out of netbeans. But now I want to use it in my antscript.
I've downloaded the standalone version for windows. https://github.com/apigen/apigen/downloads The newest 2.8.0 version.
My ant script looks like this.
<target name="phpdocWindows">
    <echo message="Creating PHPDoc" />
    <mkdir dir="phpdoc" />
    <exec executable="cmd" dir="." spawn="false">
        <arg line="C:/xampp/php/apigen/apigen.bat --source Classes --destination phpdoc"/>
    </exec>
</target>

The mkdir command works fine, but then the exec command isn't performed ... I don't get any errors.

A:

solution is:
<target name="phpdocWindows">
    <echo message="Creating PHPDoc" />
    <delete dir="${basedir}\Resources\Public\phpdoc"/>
    <mkdir dir="${basedir}\Resources\Public\phpdoc" />
    <exec executable="cmd" dir="." spawn="false">
        <arg line="/C C:/xampp/php/php.exe C:/xampp/php/apigen/apigen.php  --source ${basedir}\Classes --destination ${basedir}\Resources\Public\phpdoc"/>
    </exec>
</target>

The apigen.php must be an parameter of the php.exe then you cann also add the parameters for apigen

