Importing Flexmojos Projects to IntelliJ IDEA 8.1.3
To start the import we need to have a compilable Flexmojos project that generates Flex compiler configuration file during compilation. Let’s take a Flexmojos application sample from the book Maven: The Definitive Guide, chapter 17 Developing with Flexmojos, section 17.3.2. Creating a Flex Application.
- Generate a Flexmojos project from the archetype as described in the book.
- Configure it. IntelliJ IDEA will need a Flex compiler configuration file so we have to configure Flexmojos to save a configuration report. Debugging capabilities may also be configured if required. To achieve it we change project configuration a little bit (edit pom.xml file, added lines are highlighted with bold font):
... <plugin> <configuration> <configurationReport>true</configurationReport> <debug>true</debug> </configuration> <groupId>org.sonatype.flexmojos</groupId> <artifactId>flexmojos-maven-plugin</artifactId> <version>3.2.0</version> <extensions>true</extensions> </plugin> ...
- Compile project using Maven (just type mvn compile in the command line): target directory is then generated. It contains compiled *.swf file, *-config-report.xml file and auxilary files in the classes sub-directory.
We are ready to import the project to IntelliJ IDEA. The easiest way for that is to open pom.xml as if it was a native IntelliJ IDEA project file — click Open Project on the File menu and select this pom.xml.
In order highlighting, completion and other coding assistance features to work properly, IntelliJ IDEA needs a configured Flex SDK. So, you must download an SDK of the same version that is used by Flexmojos compiler (184.108.40.20658 by default), add Flex SDK in the JDKs section of Project Structure dialog (Ctrl+Alt+Shift+S), and then set this SDK for the Flex facet that has been automatically created during import of Maven pom.xml.
Note that configuration report created by Flexmojos is used in IntelliJ IDEA as a custom compiler configuration file. That’s why clicking Make Project, or pressing Ctrl+F9 creates sample-application-1.0-SNAPSHOT.swf file in the same way as Flexmojos compiler does.
Now you can edit, compile, run and debug your Flex application right from IntelliJ IDEA.
P.S. Flexmojos support is under active development for IntelliJ IDEA 9 (Maia) and is getting smarter and easier, so keep in touch with the latest EAP builds to see new and improved features.
Subscribe to Blog updates
Thanks, we've got you!
Import Postman Collections to the HTTP Client
We know that many of you use Postman collections and want to stay in the flow while working with them. This means staying inside IntelliJ IDEA and not switching to a different app. Great news! You can now effortlessly transform Postman collections into .http and use them in the HTTP Client …
What’s New in IntelliJ IDEA 2023.1 for Spring Developers
The IntelliJ IDEA 2023.1 release came packed with updates for Spring. This blog post will highlight the most noticeable changes, including full support for Lombok, a reworked Spring tool window, navigation for Spring Security rules, Spring Security 6 support, and more. Remember that these featur…
‘Quick’ Features in IntelliJ IDEA
A few IntelliJ IDEA features or actions include the term ‘quick’. Do they speed up certain processes? Let’s find out. In this blog post, I’ll cover what these features are, why you need them, and how you can use them. 1. Quick Lists If you have actions that you use regularly but don’t have shortcut…
5 Best Features for Profiling Java Code In IntelliJ IDEA
When it comes to apps functioning efficiently, there is always room for improvement. Fast, lag-free, smooth operation – what else can a Java developer dream of? However, when you aim for this level of perfection in your app, you will need a comprehensive toolset to monitor performance and identif…