使用ant,是否有人知道如何构建由包含资源包的SWC(您已经构建)组成的SWF?

dw.*_*kie 3 apache-flex ant flexbuilder build

我正在尝试编写一个ant构建脚本来构建我的团队的flex应用程序,而且我遇到了一些障碍,我希望有人在SO上见过.

我们有两个项目构建到SWC中,这些组件包含资源包.一个SWC需要另一个SWC.我们将一个项目构建到我们的应用程序(SWF)中,该项目使用两个SWC.

当我构建SWC时,我没有抱怨没有找到资源包,当我在winzip中打开SWC时,我可以看到这些包(例如/ locale/EN_US)

然而,当我构建SWF时,我抱怨无法在两个swc中找到资源包,但没有抱怨无法找到任何其他资源包(如flex框架).这是我从蚂蚁那里得到的消息:

[mxmlc] Error: Unable to resolve resource bundle "whatever" for locale "en_US".
[mxmlc]
Run Code Online (Sandbox Code Playgroud)

当然,我不是第一个遇到这个陷阱的人,所以有谁知道这里的问题是什么?我是在构建SWC错误还是SWF?

作为参考,这是我使用compc构建任务之一(出于某种原因,我无法显示开始目标标记)

    <path id="facet.sourcePath">
        <pathelement location="${flex.facet.src}"/>
    </path>
    <property name="facet.sourcePath" refid="facet.sourcePath"/>
    <echo message="sourcePath is ${facet.sourcePath}"/>
    <fileset dir="${facet.sourcePath}" id="facet.sources">
        <include name="**/*.as"/>
    </fileset>
    <pathconvert property="facet.classes" pathsep=" " refid="facet.sources">
        <compositemapper>
            <chainedmapper>
                <globmapper from="*.as" to="*"/>
                <globmapper from="${facet.sourcePath}\*" to="*" handledirsep="true" />
            </chainedmapper>
            <chainedmapper>
                <globmapper from="*.mxml" to="*"/>      
                <globmapper from="${facet.sourcePath}\*" to="*" handledirsep="true" />
            </chainedmapper>
        </compositemapper>                     
    </pathconvert>           
    <echo message="classes: ${facet.classes}"/>
    <compc output="${flex.lib.output}/${facet.swc.name}" locale="EN_US" 
                include-classes="${facet.classes}" directory="false"
                target-player="10.0.0" 
                >
        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
        <include-resource-bundles bundle="foo"/>
        <include-resource-bundles bundle="bar"/>
        <include-resource-bundles bundle="whatever"/>
        <sp path-element="${flex.facet.dir}/locale/{locale}"/>
        <keep-as3-metadata name="Bindable"/>
        <keep-as3-metadata name="Remotable"/>
        <keep-as3-metadata name="Embed"/>
        <keep-as3-metadata name="Event"/>
        <keep-as3-metadata name="ResourceBundle"/>
        <source-path path-element="${flex.facet.src}"/>
    <compiler.library-path append="true" dir="${flex.framework.lib}">
      <include name="*.swc"/>
      <include name="../locale/${locale}"/>
    </compiler.library-path>
    <compiler.library-path append="true" dir="${flex.rsm.lib}">
      <include name="*.swc"/>
    </compiler.library-path>
  </compc>
</target>
Run Code Online (Sandbox Code Playgroud)

这是我的mxmlc任务:

<target name="flex.webapp.compile" description="compiles your flex app">
      <mxmlc file="${flex.webapp.src}\RSM.mxml"
           output="${flex.webapp.deploy}\ant_test\RSM.swf"
           use-network="true" 
           keep-generated-actionscript="true" 
           debug="true" 
           locale="en_US"
           incremental="true"
           actionscript-file-encoding="utf-8" 
           target-player="10.0.0" 
        >
        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
        <include-resource-bundles bundle="RSM"/>
        <source-path path-element="${FLEX_HOME}/frameworks"/>   
        <source-path path-element="${flex.webapp.src}" />         
        <source-path path-element="${flex.webapp.dir}/locale/en_US" />
        <source-path path-element="${flex.rsm.lib}" />
        <sp path-element="${flex.core.dir}/locale/{locale}"/>
        <sp path-element="${flex.facet.dir}/locale/{locale}" /> 
        <compiler.library-path append="true" dir="${flex.framework.lib}">
            <include name="*.swc"/>
            <!--include name="../locale/${locale}"/-->
        </compiler.library-path>
        <compiler.library-path append="true" dir="${flex.rsm.lib}">
            <include name="*.swc"/>
            <include name="../locale/${locale}" />          
            <!--include name="rsm_rb.swc" /-->
        </compiler.library-path>
    </mxmlc>
</target>
Run Code Online (Sandbox Code Playgroud)

dw.*_*kie 5

Arrgh!

经过几个小时的盯着这个问题,我意识到这个问题一直在面对我.
compc任务使用'locale ="EN_US"',mxmlc任务使用'locale ="en_US"'.
如果有人发表过"你曾经遇到过什么最愚蠢的工作问题?",这就是我的答案.