Doz
Doz

Reputation: 7149

Flex-Ant: mxmlc doesn't support the "file" attribute

Just moved my Flex app onto Ant with a basic ant script and I am getting this stupid error: mxmlc doesn't support the "file" attribute. I looked through docos and it seems that my code is right, so hows it going.

<!-- load previously defined configuration properties file -->
<property file="build.properties" />

<!-- points to our flexTasks.jar we copied to the libs folder to distribute with the project -->
<taskdef resource="flexTasks.tasks" classpath="${basedir}/libs/flexTasks.jar"/> 

<!-- delete and recreate the DEPLOY dir -->
<target name="init">
    <delete dir="${DEPLOY_DIR}" />
    <mkdir dir="${DEPLOY_DIR}" />       
</target>

<!-- Build and output the Main.swf-->
<target name="compile flex project" depends="init">
    <mxmlc file="${SRC_DIR}/DNASupport.mxml"
        actionscript-file-encoding="UTF-8"
        keep-generated-actionscript="false"
        incremental="true"
        optimize="true"
        output="${DEPLOY_DIR}/Main.swf">
        <license product="flexbuilder3" serial-number="137740016118223699076222" />
        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
        <source-path path-element="${app_root_dir}/src" />
        <source-path path-element="${FLEX_HOME}/frameworks" />
        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
        <source-path path-element="${FLEX_HOME}/frameworks"/>
        <compiler.debug>false</compiler.debug>          
    </mxmlc>
</target>

Upvotes: 0

Views: 1546

Answers (1)

just_a_dude
just_a_dude

Reputation: 2735

are you using the flex ant tasks?

This is a part of my "typical" build file

<taskdef resource="flexTasks.tasks"  />
...
<target name="compile">
  <mxmlc file="Main.mxml" debug="true" output="main.swf">
    <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
    <source-path path-element="${FLEX_HOME}/frameworks" />
    <source-path path-element="${src}" />
  </mxmlc>
</target>

Hope this helps

Upvotes: 1

Related Questions