我有一个使用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]
...没有进一步的线索,以什么失败。