More than half a year ago, an article
Development on Flex was written
in IntellliJ IDEA using maven - it was an overview and was written at the very beginning of the use of the aforementioned tools. Now I want to summarize and consider in more detail - this article will give an overview of the current situation and those flexmojos buns, which you will not find an analogue of anywhere else.
Current situation. What changed
If half a year ago, only maniacs could set up the environment (by environment I mean not only IntelliJ IDEA, but the environment as a whole, including the repository proxy server) so that it does not interfere with the company’s work and does not force ordinary employees to sigh about quiet times, now :
- No need for Flex SDK . IntelliJ IDEA itself will create everything you need - debugging and compilation will work. Currently there is no support for the AIR SDK due to license issues. We solve this problem with Marvin - after standardizing the coordinates of artifacts (from the side of jetbrains, everything has already been decided) it will be necessary to do approximately the same thing as with Sun JDK in linux - publish independently into your repository. Thus, you do not need to have a separate synchronization server (this is relevant if you frequently update the SDK, roll in your patches).
- Full compilation in IDE / console without additional configuration . flexmojos creates a complete configuration for IntelliJ IDEA - such a direct mapping and the ability to cheaply obtain complex flex-config is only in flexmojos (there is no incremental compilation during flexmojos, Marvin suggested that I release it myself - so far, the prospect of this feature is vague). Thus, after mvn compile -DconfigurationReport = true, you can implement make in IntelliJ IDEA without any problems (just do not use native fcsh - there is a critical error in the calculation algorithm of the config checksum develar.livejournal.com/77034.html ). In the next couple of weeks, flexmojos will create a configuration for IDEA even without the initial build.
- Working inspection without customization . namespace, resource bundle, locale - all this will work without any configuration (this link is for information only, I repeat - just open POM, nothing needs to be set up). conditional compilation is also supported, but its current implementation is such that the tokens are not validated, thus the absence of define is not yet checked - only at the syntax level.
Actually, what else do we need from the IDE? IntelliJ IDEA is currently the only environment at this level - just open POM (I’m misleading only about the initial mvn compile -DconfigurationReport = true, but it will be removed to the final version of Maia (probably already by September EAP)), supports flex development . I note - support for applications not at the helloworld level. A detailed article about working in the environment will be later (as the current workflow will be simplified), for now I’ll just note that the project is conveniently stored in a directory based format, ignoring * .iml, .idea / libraries.
')
Thus, from the IDE, we now need only one thing - support for flexunit. So far everything is sad. But this issue has already been discussed and will be resolved in the coming month (from the side of jetbrains
www.jetbrains.net/jira/browse/IDEADEV-39280 , and from the flexmojos community, finalizing the test mojo to dump the configuration dump).
Flexmojos buns
- load-externs . We have an application. It is in two versions - web and desktop (AIR). The application is skipped and the skin, style module, is loaded in runtime. We want to optimize the skin for these two versions - load-externs. Imagine what you need for this without flexmojos? In the POM of the application, we set the linkReport to true, and in the skin indicate the dependence on the artifact with the coordinates of the application, but with the replacement of the type by xml and the classifier by link-report. What could be easier?
- resource modules / libraries . To get them, you just need to specify runtimeLocales. And for the application, you will get the modules, and for the libraries. I note that this is implemented as one big problem ( develar.livejournal.com/71672.html , develar.livejournal.com/70325.html ), but for most users it is suitable (If you work with the locale chain, you will probably step on a rake, but no one wrote such issues;))
< runtimeLocales >
< locale > en_US < / locale >
< / runtimeLocales >
- Rdf . This is far from a killer bun, but just nice (however, this feature is often useless, since inheritance is in most cases impossible for flex POMs, and aggregation only builds project references).
- Manifestos . To include a manifest in the library, you must specify a namespace + includeNamespace (duplicate URI). After that, to feel the wretchedness of the compiler, not only in terms of speed, but also architecture - the inclusion of the manifest by all users (I was surprised that Marvin also considered the behavior of the compiler to be erroneous) is considered as an act of supporting namespaces in MXML, but not as an act of include - in as a result, we either have a circular reference error, or are forced to constantly prove to the compiler that we need to connect a certain class (for example, there may not be a certain utility in the link library itself). flexmojos provides you with a powerful and convenient syntax - you do not need to specify either the namespace or the includeNamespace; don't even need a manifest file. If you use mate and want to have a namespace for your eventmap, then all you need to write is
< manifests >
< manifest >
< uri > http : //example.com/2009 </ uri>
< includes >
< class > ** . maps . * < / class >
< / includes >
< / manifest >
< / manifests >
And everything, all EventMap will be in the specified namespace, while not included in the manifest and not having references to themselves classes will also be included in the library. - WAR . If you specify your application in WAR dependencies and bind the target to copy-flex-resources, then flexmojos will copy the application itself and everything connected with it (modules, rsls).
< execution >
< id > copy flex resourcs < / id >
< goals >
< goal > copy - flex - resources < / goal >
< / goals >
< / execution >
These are special flexmojos buns, besides that, being a plug-in for maven, we have a large number of inherited buns - maven, being a declarative build system, fully justifies itself - we haven’t given up on our choice for half a year.
Update on commentsNothing is said about flexmojos, because this was mentioned in the first part to which the link was given, the main link is to understand that flexmojos is a maven build system plugin to support flex and why do we need maven -
riapriority.com/blogs/agahov .php / 2007/11/23 / maven .
And about “I am surprised to find out that the Idea cannot be used without Maven :), this is very far from the truth” - the post was written by a person “believing” in CI and is dedicated to the buns of the corresponding assembly tool. IntelliJ IDEA may well compile the project and be configured in a non-trivial way by custom config file, but we are like engineers with you (omitting the prototype moment, however, due to the concept of archetypes, this question is also removed)?