flexmojo custom compiler configuration file location


I am using maven flexmojo plugin for a flex project and was able to import it into Intellij 9.0.2 following the instruction in http://blogs.jetbrains.com/idea/2009/09/flexmojos-inmaia/

It worked very neatly without a hitch. However, I have a problem with the location of the custom compiler configuration file location.

The compiler configuration files for the project and test are created in target directory. This means everytime I do mvn clean compile on the command line,
these files get deleted and need to be re-generated by re-importing the project if I want to run the project inside Intellij.

Is there a way to specify the location for the custom compiler configuration files?


Comment actions Permalink

This issue was reported. See http://youtrack.jetbrains.net/issue/IDEA-53246 The report shows it fixed in build 96.325 which, I believe, is the branch for IDEA 10. As far as I know, it has not been put in any of the v9.0.3 EAP or Release Candidate Builds as I still experience the issue in the 9.0.3 RC5 build (95.413).

You can see the thread http://devnet.jetbrains.net/thread/287536 for discussion on the issue (prior to the bug report) and how you can move the configuration file and specify an alternate location. The problem then becomes any time you reimport the maven POMs, this setting in the Flex Facet gets reset and you have to reconfigure it to use the alternate location again. But that happens far less often than doing cleans. So it is workable until the the new version of IDEA with this fix in place.
Comment actions Permalink

p.s. I just reviewed the thread I referenced above and noticed it does not explicitly specify where to make the setting change.

Open the Project Structure dialog (Ctrl+Alt+Shift+S)
Go to the Flex Facet for the maven module
There are settings for configuration files

Comment actions Permalink

See http://youtrack.jetbrains.net/issue/IDEA-53246 The report shows it fixed in build 96.325 which, I believe, is the branch for IDEA 10.

This issue is actually fixed in IDEA 9.0.3 branch as well. But it is about config_for_tests.xml file only. Now you shouldn't have errors like "config_for_tests.xml not found" because IDEA actually doesn't generate or use this file any more (see my comment to the issue: http://youtrack.jetbrains.net/issue/IDEA-53246#comment=27-143887)
But the ...-config-report.xml and other auxiliary files are still generated inside target directory so they still can be occasionally deleted by mvn clean or if 'Clear output directory on rebuild' is selected at Settings | Compiler. Related issue is open http://youtrack.jetbrains.net/issue/IDEA-55816

Comment actions Permalink

To generate compiler configuration files that IDEA needs use following comand line:
mvn (clean) compile -DconfigurationReport=true

Comment actions Permalink

Thanks Alexander. I was still getting the issue (i.e. setting the "config_for_tests.xml not found") error in 9.0.3 (95.413) when I tried it a few minutes ago. So I thought it had not been ported to the 9.0.3 branch. Turns out the issue was I still had the "Custom compiler configuration file tests" option checked. And the value in the corresponding settings box had gotten set to "{module}/target/config_for_tests.xml" upon reimporting of my maven project at some point in the past when using a previous IDEA build. I have not actively worked on my project's SWC module for the month or two, so I never reset that value back to my alternate location. But now of course I can just uncheck that option and all works fine.

Thanks for the information and for addressing that issue.


Please sign in to leave a comment.