【问题标题】:Specifying a flex-config.xml with Maven / Flex Mojos使用 Maven / Flex Mojos 指定 flex-config.xml
【发布时间】:2014-09-04 18:37:35
【问题描述】:

我必须将现有项目移植到 Maven,它包含一个名为“config.xml”的资源,该资源与 SWF 和 HTML 一起复制到部署目录,并在运行时加载以定位一堆 WSDL。

Flex Mojos 认为我的 xml 文件是一个带有编译器指令的 flex-config 文件,这当然很快就放弃了。

问题是:如何为编译器指定一个命名配置文件,以便 Maven 停止这种废话(以及指定我的编译时选项)?

【问题讨论】:

标签: apache-flex maven-2


【解决方案1】:
<configuration>
     <configFile>path/to/yourConfigFile.xml</configFile>
</configuration>

https://docs.sonatype.org/display/FLEXMOJOS/compile-swf-mojo.html#compile-swf-mojo.html-configFile

【讨论】:

  • 我应该把配置元素放在哪里?除非您已经是 Maven 专家,否则这些文档无济于事:-/
  • 在试验了一些之后,它似乎进入了 flexmojos-maven-plugin 的 build/plugins/plugin 元素,而不是 flexmojos:generate-config-swf 特有的东西
【解决方案2】:

对不起考古。如果只想隐藏一些警告,可以在 pom 中添加以下内容:

<configuration>
    <!-- Maven is more strict than Flash Builder, so I'm hiding some warnings -->
    <compilerWarnings>
        <warn-no-constructor>false</warn-no-constructor>
    </compilerWarnings>
</configuration>

来自this documentation

compilerWarnings
  A list of warnings that should be enabled/disabled
  Equivalent to -compiler.show-actionscript-warnings,
  -compiler.show-binding-warnings,
  -compiler.show-shadowed-device-font-warnings,
  -compiler.show-unused-type-selector-warnings and -compiler.warn-*
  Usage:
  <compilerWarnings>
    <show-actionscript-warnings>true</show-actionscript-warnings>
    <warn-bad-nan-comparison>false</warn-bad-nan-comparison>
  </compilerWarnings>

【讨论】:

    猜你喜欢
    • 2012-01-15
    • 2012-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-09
    • 1970-01-01
    相关资源
    最近更新 更多