In my last post, I expressed frustration with the fact that the MXMLC Ant task choked on the runtime-shared-library-path attributes.

Well, I decided to not use the MXMLC task and instead use Ant’s EXEC command to compile the app.  Works like a charm.  Therefore, I can only assume that there’s a bug in the MCMLC and COMPC tasks provided in the flexTasks.jar file in the Flex 3.5.0 SDK.

Here’s how my compile task looks now.

<exec dir="." executable="${FLEX_HOME}/bin/mxmlc.exe">
    <arg value="${src.dir}/${main.application}" />
    <arg value="-output=${build.dir}/${build.file}" />
    <arg value="-incremental=false" />
    <arg value="-locale=${locale}" />
    <arg value="-library-path=${FLEX_HOME}/frameworks/locale/${locale}/rpc_rb.swc" />
    <arg value="-library-path+=${FLEX_HOME}/frameworks/locale/${locale}/framework_rb.swc" />
    <arg value="-library-path+=${FLEX_HOME}/frameworks/locale/${locale}/datavisualization_rb.swc" />
    <arg value="-library-path+=${main.lib.dir}/applicationAPI.swc" />
    <arg value="-library-path+=${common.lib.dir}/it_common.swc" />
    <arg value="-library-path+=${framework.lib.dir}/common_framework.swc" />
    <arg value="-source-path=${src.dir}" />
    <arg value="-runtime-shared-library-path=${FLEX_HOME}/frameworks/libs/framework.swc,${web.root.dir}/lib/flex/${flex.build.number}/framework_${flex.build.number}.swz,${web.root.dir}/cross-domain.xml,${web.root.dir}/lib/flex/${flex.build.number}/framework_${flex.build.number}.swf,${web.root.dir}/cross-domain.xml" />
    <arg value="-runtime-shared-library-path=${FLEX_HOME}/frameworks/libs/rpc.swc,${web.root.dir}/lib/flex/${flex.build.number}/rpc_${flex.build.number}.swz,${web.root.dir}/cross-domain.xml,${web.root.dir}/lib/flex/${flex.build.number}/rpc_${flex.build.number}.swf,${web.root.dir}/cross-domain.xml" />
    <arg value="-runtime-shared-library-path=${FLEX_HOME}/frameworks/libs/datavisualization.swc,${web.root.dir}/lib/flex/${flex.build.number}/datavisualization_${flex.build.number}.swz,${web.root.dir}/cross-domain.xml,${web.root.dir}/lib/flex/${flex.build.number}/datavisualization_${flex.build.number}.swf,${web.root.dir}/cross-domain.xml" />
</exec>

Very happy that this works, so that we can upgrade the SDK to 3.5.0 and take advantage of the bug fixes.