the new built-in flex-mojos support is just awsome! I just had to import the Maven 2 projects using Flex Mojos and was able to compile these projects right away. That's really great.
Unfortunately it does not help much, when your application has a dependency to other libraries that are consumed as RSLs. Each time you want to launch the application from within the IDE the application cannot load the library RSLs as they are not included in the target folder. So you have to copy all RSLs of dependent libraries there. But this isn't a practical solution.
So it would be great, if IntelliJ could provide a workaround this:
- Suggestion: Look up the libraries that have either the scope 'rsl' or 'caching' and automatically copy them to the output directory according to the configured rslUrl schema. E.g. this can be configured with Flex Mojos like this:
so an RSL should be copied to target/rsls/myLibrary-1.0-SNAPSHOT.swf.
- When running a compile in IDEA offer the option in the Flex facet to link libraries statically and ignore the RSL scope.
I would prefer Option 1, since this is closest to the Maven build, but Option 2 would also be OK as our current workaround is to not use the generated flex-config, but use the IDEA internal compiler to create an application that statically links against the libraries.