mxmlc task explicitly defines the source-path and library-path options
<!--
Code from Flex 4 Documentation "Using Adobe Flex 4".
This user guide is licensed for use under the terms of the Creative Commons Attribution
Non-Commercial 3.0 License.
This License allows users to copy, distribute, and transmit the user guide for noncommercial
purposes only so long as
(1) proper attribution to Adobe is given as the owner of the user guide; and
(2) any reuse or distribution of the user guide contains a notice that use of the user guide is governed by these terms.
The best way to provide notice is to include the following link.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/
-->
<!-- myMXMLCBuild.xml -->
<project name="My App Builder" basedir=".">
<taskdef resource="flexTasks.tasks" classpath="${basedir}/flexTasks/lib/flexTasks.jar" />
<property name="FLEX_HOME" value="C:/flex/sdk" />
<property name="APP_ROOT" value="apps" />
<property name="DEPLOY_DIR" value="c:/jrun4/servers/default/default-war" />
<target name="main">
<mxmlc file="${APP_ROOT}/Main.mxml" output="${DEPLOY_DIR}/Main.swf"
actionscript-file-encoding="UTF-8" keep-generated-actionscript="true"
incremental="true">
<!-- Get default compiler options. -->
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
<!--
List of path elements that form the roots of ActionScript class
hierarchies.
-->
<source-path path-element="${FLEX_HOME}/frameworks" />
<!-- List of SWC files or directories that contain SWC files. -->
<compiler.library-path dir="${FLEX_HOME}/frameworks"
append="true">
<include name="libs" />
<include name="../bundles/{locale}" />
</compiler.library-path>
<!-- Set size of output SWF file. -->
<default-size width="500" height="600" />
</mxmlc>
</target>
<target name="clean">
<delete dir="${APP_ROOT}/generated" />
<delete>
<fileset dir="${DEPLOY_DIR}" includes="Main.swf" />
</delete>
</target>
</project>
Related examples in the same category