I upgraded the flex application from flex 3.5 to flex 4.0. We use ant to compile our project, and we have the mxmlc task to handle the flexible part. After the upgrade, our mxmlc task broke down.
Here is the definition of the task:
<taskdef resource="flexTasks.tasks">
<classpath>
<pathelement path="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<fileset dir="${FLEX_HOME}/lib">
<include name="**/*.jar"/>
</fileset>
</classpath> </taskdef>
And here is the mxmlc task
<mxmlc file="${src}/Main.mxml" output="${build}/main.swf" debug="true"
target-player="10" services="../src/main/webapp/WEB-INF/flex/services-config.xml"
context-root="/" >
<compiler.library-path dir="${lib}">
<include name="*.swc"/>
</compiler.library-path>
<compiler.library-path dir="${FLEX_HOME}/frameworks/libs">
<include name="*.swc"/>
</compiler.library-path>
<compiler.library-path dir="${FLEX_HOME}/frameworks/libs/player/10.0">
<include name="*.swc"/>
</compiler.library-path>
<compiler.library-path dir="${FLEX_HOME}/frameworks/locale">
<include name="**/*"/>
</compiler.library-path>
</mxmlc>
And we get:
The class not found in jar file: mxmlc.jar
I checked the $ {FLEX_HOME} / lib folder and I see the mxmlc.jar file there.
Here is the detailed output of ant:
build.xml:69: The class not found in jar file: mxmlc.jar
at flex.ant.FlexTask.resolveClass(FlexTask.java:347)
at flex.ant.FlexTask.executeInProcess(FlexTask.java:273)
at flex.ant.FlexTask.execute(FlexTask.java:225)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
I appreciate your comments to resolve this issue,
Thanks, -A
source
share