我有一個使用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]
...沒有進一步的線索,以什麼失敗。