I have a Maven project that uses Flexmojos to execute unit tests and build a SWC. As it executes unit tests, I need to tell Flexmojos where my Flash player is, which I do via settings.xml
:
<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>
This works nicely in development, but when I perform a Maven release:perform
, it fails with:
[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
Why does release:perform
not find the Flash player specified in settings.xml
? How can I fix this?
UPDATE:
I have also tried the following:
- Setting the Flash player as the default program for
.swf
files (note that this is on a Mac) - Adding
flashplayer
to the path
... all to no avail.
UPDATE 2:
If I put the Flash Player debugger onto the path with the name flashplayer
, then the error changes to:
[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]
... with no further clue as to what failed.