flex.ant.MxmlcTask cannot be found - solved

While attempting to compile a Flex application with an ANT script, I got the following error

taskdef class flex.ant.MxmlcTask cannot be found using the classloader AntClassLoader[]

The problem is the Ant Classloader needs to know where the *.class file sits, so the problem was solved by adding the following line

<taskdef name="mxmlc" classname="flex.ant.MxmlcTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>

No comments: