【问题标题】:Compile several SWF files with Flexmojos and install them into local repository使用 Flexmojos 编译多个 SWF 文件并将它们安装到本地存储库中
【发布时间】:2013-04-18 16:07:04
【问题描述】:

我正在尝试将一个主应用程序 (.mxml) 编译为 SWF 文件,并将许多 CSS 文件编译为 SWF 文件,以创建可以在运行时加载的皮肤。

我用这个:

...
<execution>
    <id>default-compile-swf</id>
    <configuration>
        <sourceFile>./com/sim/tide/views/impls/application/Sim.mxml</sourceFile>
        <debug>true</debug>
        <services>${web.services.location}/services-config.xml</services>
    </configuration>
</execution>
<execution>
    <id>compile-css-black_is_mine</id>
    <phase>compile</phase>
    <goals>
        <goal>compile-swf</goal>
    </goals>
    <configuration>
        <finalName>black_is_mine</finalName>
        <sourceFile>../resources/styles/black_is_mine.css</sourceFile>                      
    </configuration>
</execution>
...

此代码似乎有效,因为在我的${project.build.directory} 中有 2 个 SWF 文件,一个用于我的应用程序,一个用于我的皮肤。

我的问题出现在install 阶段。现在,它是我的 SWF 皮肤文件,它安装在我的本地存储库中,它不再是基于我的应用程序的 SWF,但工件的名称仍然是我的应用程序皮肤的名称......总而言之,如果 m.swf 是我生成的 SWF 文件基于我的应用程序文件,c.swf 是我基于我的 css 文件生成的 SWF 文件,目标 install 将在我的本地存储库上安装 c.swf,名称为 m.swf

我尝试像这样更改执行配置:

<execution>
     <id>default-install</id>
        <phase>install</phase>
        <goals>
          <goal>install</goal>
        </goals>            
        <configuration>                    
        <file>${project.build.directory}/${project.artifactId}-${sim-flex.version}.swf</file>
        </configuration>
      </execution>

选择正确的 SWF 安装但没有效果...

那么我怎样才能使用Flexmojos 来编译我想要的尽可能多的 SWF 文件并将它们正确安装到本地存储库中呢?好像只能安装一个 SWF 文件。

【问题讨论】:

    标签: flexmojos


    【解决方案1】:

    我发现了一个“hack”,只需使用org.apache.maven.plugins:maven-install-plugin:install-file 将我想要的 SWF 安装到我的本地存储库中并取消默认安装目标:

    <execution>
        <id>default-install</id>
        <phase>non_existing_phase</phase>
    </execution> 
    

    现在,这个目标将永远不会被触发,因为它的有界阶段不存在。

    【讨论】:

      猜你喜欢
      • 2015-11-14
      • 2015-03-21
      • 2021-05-14
      • 1970-01-01
      • 2023-02-07
      • 1970-01-01
      • 1970-01-01
      • 2011-11-26
      • 2012-11-29
      相关资源
      最近更新 更多