MAVEN2 + 7.0.2 Serious problems

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
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:585)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:499)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:319)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:147)
org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:212)
org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:294)
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody4(MavenEmbedder.java:799)
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody5$advice(MavenEmbedder.java:294)
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
org.jetbrains.idea.maven.builder.executor.MavenEmbeddedExecutor.execute(MavenEmbeddedExecutor.java:113)
org.jetbrains.idea.maven.builder.MavenBuilderImpl$2.run(MavenBuilderImpl.java:112)
com.intellij.openapi.progress.impl.ProgressManagerImpl$5.run(ProgressManagerImpl.java:1)
com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:1)
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:75)
com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:90)
com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:4)
com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:7)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
java.util.concurrent.FutureTask.run(FutureTask.java:138)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
java.lang.Thread.run(Thread.java:619)
com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:6)



Attachment(s):
mavenbug1.jpg
mavenbug2.jpg
9 comments

As a follow-up to my previous message, I un-installed the 7.0.2 release and re-installed 7.0.1. Issues 2 and 4 are not happening now, but the other two problems are still happening.

0

Hello, Darren,

I'll try to answer you questons step by step.

1. Indeed, plugin sets up all the folders for each module. Do these 'phantom' folders cause any problem?
2. We are going to solve the problem with dependencies scope very soon.
3. Could you please create jira issue and provide samle project for that problem?
4. Unfortunately it's quite hard to say that the problem is, without sample project. If you could, please provide if.

We are going to release 7.0.3 eap this week, in which there were loads of relative fixes. Please try it then it is released - very likely some of you problem will be solved.

0

Hello, Darren,

I'll try to answer you questons step by step.

1. Indeed, plugin sets up all the folders for each module. Do these 'phantom' folders cause any problem?
2. We are going to solve the problem with dependencies scope very soon.
3. Could you please create jira issue and provide samle project for that problem?
4. Unfortunately it's quite hard to say that the problem is, without sample project. If you could, please provide if.

We are going to release 7.0.3 eap this week, in which there were loads of relative fixes. Please try it then it is released - very likely some of you problem will be solved.

0

Darren Davis wrote:

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.


Please report any problems using the maven-idea-plugin together with
IDEA 7, to the Maven project at:

http://jira.codehaus.org/browse/MIDEA

Maven Embedder execution error: Compilation failure
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:585)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:499)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:319)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:147)
org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:212)
org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:294)
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody4(MavenEmbedder.java:799)
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody5$advice(MavenEmbedder.java:294)
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
org.jetbrains.idea.maven.builder.executor.MavenEmbeddedExecutor.execute(MavenEmbeddedExecutor.java:113)
org.jetbrains.idea.maven.builder.MavenBuilderImpl$2.run(MavenBuilderImpl.java:112)
com.intellij.openapi.progress.impl.ProgressManagerImpl$5.run(ProgressManagerImpl.java:1)
com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:1)
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:75)
com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:90)
com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:4)
com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:7)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
java.util.concurrent.FutureTask.run(FutureTask.java:138)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
java.lang.Thread.run(Thread.java:619)
com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:6)


------------------------------------------------------------------------


------------------------------------------------------------------------

0

I have downloaded the EAP version and it does fix issue #2. Thanks for your efforts on that one.

I am still have problems compiling within the IDE after a clean build with the EAP release (IntelliJ Selena #7626). The problem first appears if I try the process-resources or compile goals of my base module.

The output from the screen shows more details now:

Scanning for projects...
-


Building LoggerApp
task-segment:
-


artifact org.apache.maven.plugins:maven-resources-plugin: checking for updates from repository.jboss.com
artifact org.apache.maven.plugins:maven-resources-plugin: checking for updates from repository.apache.org
artifact org.apache.maven.plugins:maven-resources-plugin: checking for updates from central
Maven Embedder execution error: The PluginDescriptor for the plugin org.apache.maven.plugins:maven-resources-plugin was not found. Should have been in realm: ClassRealm[/plugins/org.apache.maven.plugins:maven-resources-plugin:2.3-20071129.184111-5@48, parent: null]
org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:393)
org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:232)
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:181)
org.apache.maven.plugin.loader.DefaultPluginLoader.loadPlugin(DefaultPluginLoader.java:198)
org.apache.maven.plugin.loader.DefaultPluginLoader.loadPlugin(DefaultPluginLoader.java:63)
org.apache.maven.lifecycle.plan.DefaultBuildPlanner.loadPluginDescriptor(DefaultBuildPlanner.java:197)
org.apache.maven.lifecycle.plan.DefaultBuildPlanner.findForkModifiers(DefaultBuildPlanner.java:115)
org.apache.maven.lifecycle.plan.DefaultBuildPlanner.addForkedLifecycleModifiers(DefaultBuildPlanner.java:108)
org.apache.maven.lifecycle.plan.DefaultBuildPlanner.constructBuildPlan(DefaultBuildPlanner.java:63)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getLifecycleBindings(DefaultLifecycleExecutor.java:422)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:303)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:147)
org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:219)
org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody4(MavenEmbedder.java:816)
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody5$advice(MavenEmbedder.java:304)
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
org.jetbrains.idea.maven.runner.executor.MavenEmbeddedExecutor.execute(MavenEmbeddedExecutor.java:94)
org.jetbrains.idea.maven.runner.MavenRunnerImpl$2.run(MavenRunnerImpl.java:112)
com.intellij.openapi.progress.impl.ProgressManagerImpl$5.run(ProgressManagerImpl.java:2)
com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:2)
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:24)
com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:73)
com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:8)
com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:1)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
java.util.concurrent.FutureTask.run(FutureTask.java:138)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
java.lang.Thread.run(Thread.java:619)
com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:5)

0

Could you please create a jira issue for the problem and describe your project in details? (the sample poms will be great)

0

I also have some problems with Maven2 and IntelliJ EAP (#7648).

When trying to launch some tests.
I'm using surefire plugin 2.4.

The exception is raised only when tests fail. If tests succeed everything works just fine.

Maven Embedder execution error: There are test failures.

Please refer to C:\projects\range2prefix\target\surefire-reports for the individual test results.
org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:519)
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:596)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:499)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:319)
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:147)
org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:212)
org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:295)
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody58(MavenEmbedder.java:799)
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody60(MavenEmbedder.java:1)
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody61$advice(MavenEmbedder.java:295)
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
org.jetbrains.idea.maven.builder.executor.MavenEmbeddedExecutor.execute(MavenEmbeddedExecutor.java:113)
org.jetbrains.idea.maven.builder.MavenBuilderImpl$2.run(MavenBuilderImpl.java:112)
com.intellij.openapi.progress.impl.ProgressManagerImpl$5.run(ProgressManagerImpl.java:2)
com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:4)
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:90)
com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:1)
com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:1)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
java.util.concurrent.FutureTask.run(FutureTask.java:138)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
java.lang.Thread.run(Thread.java:619)
com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:1)

0

Here's the mandatory screenshot ;)



Attachment(s):
idea-maven-surefire.jpg
0

Please sign in to leave a comment.