I am using the latest version of IDEA (7.0.2) with a maven2 project that includes a master pom file, and several sub-modules. I was able to get around a few issues with the 7.0/7.01 release, but with the newer version the plugin seems to be completely dysfunctional. Here are the problems I am having when opening up the master pom file as a project:
1) Phantom source directories referenced in sub-modules. My Web Module has two source and two test directories configured: src\main\java, src\main\resources and src\test\java, src\test\resources, and the maven plugin correctly configures these appropriately as source and test folders. However, all of the other modules are configured with all 4 source/test folders as well, even though they don't exist and show up in red on the screen. I have to manually delete the unneeded ones.
2) scope for dependencies ignored. Many of the modules refer to junit or spring modules for the test scope. Others refer to provided packages already included with jboss. After importing the modules, every single jar file is marked for export. I have to manually uncheck the unwanted ones, which is irritating, especially the transitive ones that are pulled in from other jars.
3) EAR Deployment descriptors ignored. In my EAR module, I have a source directory (src\main\application\META-INF) which contains application.xml and jboss-app.xml descriptor files. These are being ignored during the import process and have to be manually referenced. A related problem is the web-module is not assigned a context at all, which has to be manually fixed after adding a link to the application.xml file.
4) Unable to run the master compile goal on a clean system. If I run the clean goal, I am not able to run the compile maven goal within IDEA. I get a Compilation failure error message. If I go to the command line and run the mvn compile command everything works just fine, and IDEA is able to re-compile. The stack trace for this error appears below.
All of these problems are making maven unusable within the IDEA environment, which is unfortunate as we're preparing to move the entire development team over to IntelliJ due to it's better maven support (compared to eclipse). Is there a way to configure the plugin to work better, or are these known problems being worked on? Or perhaps there is something misconfigured in one of the pom files? I've attached a couple of screenshots which highlight some of these issues.
I've also tried running the idea:idea goal, but the resulting project has similar, but worse problems with IntelliJ 7.
Maven Embedder execution error: Compilation failure