2012-05-29 16 views
0

我有一个使用Flexmojos执行单元测试并构建SWC的Maven项目。在执行单元测试,我需要告诉的Flexmojos哪里我的Flash播放器,这是我通过settings.xml做:在Maven发行版中配置Flash Player与Flexmojos配合使用:执行

<profiles> 
    <profile> 
     <id>dev</id> 
     <properties> 
      <flex.flashPlayer.command>/Applications/Flash Player Debugger.app/Contents/MacOS/Flash Player Debugger</flex.flashPlayer.command> 
     </properties> 
    </profile> 
</profiles> 

<activeProfiles> 
    <activeProfile>dev</activeProfile> 
</activeProfiles> 

这个工作很好的发展,但是当我执行一个Maven release:perform,它失败:

[INFO] [WARNING] The requested profile "release" could not be activated because it does not exist. 
[INFO] [ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.1-beta:test-run (default-test-run) on project swf-module: Failed to launch Flash Player. Probably java was not able to find flashplayer. 
[INFO] [ERROR] Make sure flashplayer is available on PATH 
[INFO] [ERROR] or use -DflashPlayer.command=${flashplayer executable} 
[INFO] [ERROR] Read more at: https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests: Cannot run program "flashplayer": error=2, No such file or directory 

为什么release:perform找不到settings.xml中指定的Flash播放器?我怎样才能解决这个问题?

UPDATE:

我也曾尝试以下操作:

  • 设置Flash播放器作为默认程序.swf文件(注意,这是在Mac)
  • 添加flashplayer到路径

......都无济于事。

更新2:

如果我把Flash Player调试到路径名为flashplayer,那么错误更改:

[INFO] [WARNING] The requested profile "release" could not be activated because it does not exist. 
[INFO] [ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.1-beta:test-run (default-test-run) on project swf-module: Unexpected return code 1 - /Users/blah/blah/swf-module/target/test-classes/TestRunner.swf -> [Help 1] 

...没有进一步的线索,以什么失败。

回答

0

我认为原因是你明确地试图激活一个没有定义在任何地方的配置文件“发布”。由于Flash Player属性的定义在配置文件“dev”中定义,因此必须激活此属性才能提供该属性。在flexmojos中,您还可以让flexmojos通过将其命名为“flashplayer”并将目录包含在系统路径中找到该播放器。另一个解决方案是在您的settings.xml中创建一个名为“release”的重复配置文件,然后protery将可用。

0

也许你是以错误的方式调用maven,我不认为问题来自Flash播放器的位置。该错误清楚地表明,“释放”字符串被读取为配置文件,而不应该。你能提供你的Maven命令行吗?

相关问题