Failed to load definitions from flexTasks.tasks resource. Couldn't find
I am trying to compile a Flex application from an ANT script inside Eclipse ( CFBuilder based on Eclipse) and I ran into this error:
Failed to load definitions from flexTasks.tasks resource. It could not be found.
I was unable to find anything giving directions on where this file (flexTasks.tasks) should be copied, if at all. Some places indicate that they should be part of the flexTasks.jar file. I've tried two different things:
- Copy jar file to ant / plugins / lib folder (and restart my CF Builder instance)
- Provide the path to the jar in the attribute
classpath
as suggested by the comment of this page
Doesn't help me to overcome this error.
Here's my build script, for reference:
<project name="Tagging" default="compile-tagging" basedir=".">
<!-- setup flex compilation capability -->
<taskdef resource="flexTasks.tasks" />
<property name="flex.src" value="./src" />
<property name="flex.bin" value="./bin"/>
<target name="compile-tagging">
<mxmlc
file="${flex.src}/main.mxml"
output="${flex.bin}/main.swf"
keep-generated-actionscript="true">
<source-path path-element="${FLEX_HOME}/frameworks" />
</mxmlc>
</target>
</project>
source to share
While not perfect, this code is working for me at the moment:
<project name="IOLTagging" default="go" basedir=".">
<!-- setup flex compilation capability -->
<property name="FLEX_HOME" value="C:/program files (x86)/Adobe/Adobe Flash Builder Beta 2/sdks/3.4.1/" />
<taskdef name="mxmlc" classname="flex.ant.MxmlcTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<taskdef name="html-wrapper" classname="flex.ant.HtmlWrapperTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<property name="flex.src" value="./src" />
<property name="flex.bin" value="./bin"/>
<property name="swf.name" value="main" />
<target name="go" depends="compile-flex" />
<target name="compile-flex">
<mxmlc
file="${flex.src}/main.mxml"
output="${flex.bin}/${swf.name}.swf"
debug="false"
keep-generated-actionscript="false">
<source-path path-element="${FLEX_HOME}/frameworks" />
<compiler.library-path dir="${basedir}/libs" append="true">
<include name="*.swc" />
</compiler.library-path>
</mxmlc>
</target>
</project>
source to share
Adam, I believe you need to tell taskdef where to look for the file. try saving the flextasks.jar file in the same directory as your ant file (now ... you can move it later after you get it working).
then you can do something like this:
<taskdef name="mxmlc" classname="WhateverTheTaskIsNamed" classpath="flexTAsks.jar" />
source to share
I think you should solve this problem. just tried flexmonkey today and also got the same problem.
"Failed to load definitions from flexTasks.tasks. Could not find it." the solution is to make sure flexTasks.jar is included in the dir lib of your project workspace. when i copied flexTasks.jar from flashbuild \ ant \ lib folder and built it again. the problem is fixed.
source to share