Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 使用mxmlc ant任务时如何包含其他编译器参数?_Apache Flex_Ant_Service_Mxmlc - Fatal编程技术网

Apache flex 使用mxmlc ant任务时如何包含其他编译器参数?

Apache flex 使用mxmlc ant任务时如何包含其他编译器参数?,apache-flex,ant,service,mxmlc,Apache Flex,Ant,Service,Mxmlc,Flex Builder允许在编译器选项的“属性”下设置其他编译器参数。它确立了论点 -services“../services config.xml” 在使用ant任务mxmlc时,是否有方法设置相同的参数 干杯 据我所知,迈克不是 如果仍然无法在文档中找到该任务,则始终可以将其与子节点一起使用 例如: <exec executable="${mxmlc.exe}" dir="${basedir}"> <arg line="-source-path '${flex2s

Flex Builder允许在编译器选项的“属性”下设置其他编译器参数。它确立了论点

-services“../services config.xml”

在使用ant任务mxmlc时,是否有方法设置相同的参数

干杯

据我所知,迈克不是

如果仍然无法在文档中找到该任务,则始终可以将其与子节点一起使用

例如:

<exec executable="${mxmlc.exe}" dir="${basedir}">
    <arg line="-source-path '${flex2sdk.locale.dir}'" />
    <arg line="-locale en_US" />
</exec>

您应该能够将其设置为mxmlc任务的属性:

<mxmlc services="../services-config.xml"/>

这是通过以下方式实现的:

<target name="compileApp">
<mxmlc file="src/app.mxml" 
...other options
services="[path to your services-config.xml]" 
context-root="[path to where your gateway file is]">
...
</target>

...

这就是我们目前构建mxml应用程序的方式。。。这意味着Christophe是正确的。

我遇到了同样的问题,服务属性不能在ant任务中使用,因此我添加了修复该问题的选项:

 <mxmlc file="path" output="path to output" >
       <compiler.services>${path-to-services}</compiler.services>
       <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
       <source-path path-element="${FLEX_HOME}/frameworks"/>
       <compiler.debug>false</compiler.debug>
       <compiler.context-root>/PATWeb</compiler.context-root>
 </mxmlc>

${服务路径}
假的
/帕特韦

大多数编译器选项都可以作为
mxmlc
任务的属性或标记使用,但是有些选项缺失,或者以某种意外的方式工作。最糟糕的是缺乏flex Ant任务的适当文档。 有时我发现这样做更容易:

<mxmlc file="Main.as" output="bin/app.swf">
    <load-config filename="${FLEX_HOME}/flex-config.xml" />
    <load-config filename="build/config.xml" />
</mxmlc>


然后在build/config.xml中指定我想要的所有选项,至少语法是,并且您可以始终使用SDK中的
flex-config.xml
air-config.xml
作为(注释良好的)示例。

mxmlc ant任务上没有服务属性。我发现我不得不使用下面所述的任务依赖于mxml.exe