Reputation: 1
I'm trying to implement a simple Ant project who start a server in background mode in windows. Here is my build.xml :
<project name="Test">
<target name="TargetTest">
<echo message="Starting Server"/>
<forget>
<exec dir="C:\path\to\folder\" executable="C:\path\to\folder\executable.bat" spawn="true"/>
</forget>
<waitfor maxwait="5" maxwaitunit="minute" checkevery="10" checkeveryunit="second">
<http url="localhost:port/applicationName"/>
</waitfor>
<echo message="Server started"/>
</target>
</project>
And i'm getting this error :
Problem: failed to create task or type forget Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <"presetdef>/<"macrodef> declarations have taken place.
Thx for your help,
Upvotes: 0
Views: 197
Reputation: 1
It's about adding ant-contrib Jar file to Ant lib and declare the path this way :
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="/usr/share/java/lib/ant-contrib-version.jar"/>
</classpath>
</taskdef>
Upvotes: 0