Cannot force IDEA to work with maven created Flex project

I am using IDEA 10.5.4 (I have licence for that version of IDEA)
I have maven project which part are Flex mxml files.
Application compiles with maven and works properly when target war is deployed in tomcat.
Maven project has dependency to Flex 3.5 version.
I have run mvn idea:idea in project directory.
After that I have imported created ipr file to IDEA.
All source files are visible in project view, but IDEA seems to do not recognize Flex code.
Even after I have made Add Framework Support for project and pointed to extracted Flex 3.6a SDK  in source code IDEA is pointing to errors in <mx:Script> like: Unresolved type String or Unresolved type Boolean.

How to force IDEA to recognize Flex syntax?

3 comments

Is your Flex maven project set up using Flexmojos-maven-plugin? What Flexmojos version?
Workflow with Flexmojos projects is described in this tutorial. Tutorial targets IntelliJ IDEA 12, but anyway you'll get some information there. Or take a look at my 3-years old blog post.
I don't know who is the author of maven-idea-plugin, and what this plugin does. It seems to be outdated and we never recommended to use it because IntelliJ IDEA has full Maven support out-of-the-box. Look for official information on the topic.

0

OK,

I tryied to: File->New Project->Import project from external model->Maven->selected pom.xml

I have unzipped Flex 3.6 SDK in my home directory and PATH variable set. (Command mxmlc –help is working properly)
When pointing to ~/flex/flex_sdk_36a/ where sdk is unzipped I receive error: "The selected directory id not valid home for Flex SDK".
What I am doing wrong? This directory contains Flex SDK (with /bin, /framework and other directories)

flexsdkerror.png


What is suprising it works with Flex 4.6 SDK.
But project in maven is build using 3.5 so I do not want support of newer version in IDEA (to not accidentally use something not suported by older SDK).

0

Michal, please answer my questions:
Is your Flex maven project set up using Flexmojos-maven-plugin? What Flexmojos version?

During Flexmojos project import Flex facet and Flexmojos SDK are created automatically - you do not even need to have Flex SDK installed on your computer because all required files exist in your local maven repository (assume 'mvn compile' builds output swf successfully).

Again, in case of Flexmojos project you need to click File | Open Project, select pom.xml (or File->New Project->Import project from external model->Maven->selected pom.xml - that's what you have already done) and that's all. After that, if no errors/warnings happened during import, you should be able to launch the app from the IDE.

Error "The selected directory id not valid home for Flex SDK" means that IntelliJ IDEA failed to read file flex-sdk-description.xml in the SDK root folder. Make sure that this file exists.

0

Please sign in to leave a comment.