We have been building our Flex app forever using Maven. Due to the fact that we use RIATest for integration testing we need to create a special test version of the app with the RIATest agent compiled in it and with the Flex automation libraries available. Apparently for the latter we need to provide the flex compiler with our license since this is only available from a version higher than Standard.
Up until Flex 4.0 and RIATest 3.8 this worked fine, we had our license information defined in a flex-config file in the user home directory.
However currently with the combination Flex 4.5 and RIATest 4 we are having problems, the tests always fail with "License not present. With the trial version only limited replays are allowed."
We have tried multiple variations of defining the license key for Flashbuilder 4.5 but we have had no success. Currently our flexmojo configuration in the POM references an external flex-config file and there we try to define the license key.
Well we defined our flexmojo (4.0-RC1) configuration this way:
With this I am able to build Applications using Flex SDK 4.5.0.20967 using my FlashBuilder 4 Key ... don't know if something has changed with the 4.5 Keys.
It seems that you can define it directly in Flexmojos configuration itself without the need for an external file like so:
Note as @Boris said, you need to take the derived license number you can get after installing FlashBuilder (See About configuration files for locations for each OS where this file can be found).
Using flexmojos 3.8, RIATest 4 and the Flex SDK 4.5.1 we have figured out a solution.
First off it turns out that we had a stray configuration lying around in the
file in the Jenkins user's home directory on the build server. It's important to know that configuration from here gets automatically included in builds by flexmojos. So if you want to make sure you have a nice isolated build with no external dependencies, remove this file.
Then we figured out that we can reference an external flex-config.xml file from the flexmojo configuration like so:
Inside the flex-config.xml file you need to use the following license syntax:
And now for the final kicker: the LICENSE CODE we need to use in the serial-number element is NOT the license number that we got from Adobe (and that we use when installing the Flash Builder tooling) but it is a derived form of that license number that can be found for example in the license.properties file of a developer that has Flash Builder installed. This derived license number does not resemble the original license number and has no dashes.
Mysterious.