1166 Maven 2 Integration Maven 2 91 Ralf 4.5 49388 ralfq72 2007-04-24 1.2.3

Maven 2 Integration

Compatible with  IntelliJ IDEA
49 388
This plugin integrates Maven 2 into IntelliJ IDEA

Download plugin

Recent change notes

Release Notes - MAIDEA - IntelliJ IDEA Maven-2 Plugin - Version 1.2.3 Bug
  • Maven process exits because of classpath error

General usage instructions


The IntelliJ IDEA Maven-2 plugin integrates Maven-2 into IntelliJ IDEA.

Similar to the Ant plugin, the Maven-2 plugin allows execution of goals (or phases) and redirects output (with error highlighting) to the message window.


Available for IDEA 6.0 (until version 1.1 also for IDEA 5.0) through IDEAs built-in plugin manager or directly from

In case you downloaded the plugin, simply extract the content of the binary archive into your IDEA plugin directory.

The extracted folder (idea-maven-plugin) contains another folder lib, where all the JARs reside.


Assuming you have specified the environment variables JAVA_HOME and M2_HOME the plugin should be ready to run without any further configuration.

In case JAVA_HOME is not defined, the plugin uses the internal IDEA JDK.

If M2_HOME is not defined, you must specify the home directory of Maven-2 in the configuration dialogs. This is a change starting from version 1.1 of the plugin.

Before version 1.1, Maven was called via the start script provided with the normal Maven installation. In order to get better access to the running Maven process Maven now is called directly by starting a Java process. This for example allows terminating the running Maven process by the user.

The configuration can be done in two ways:

Either via the IDE Settings or the Project Settings.

The project settings always override the application settings!

The plugin will not work with IDEA versions prior to 6.0!

The plugin was tested under Windows and Linux.

It was not tested under Mac OS X.

Retrotranslator was used to translate the JDK5 binaries into JDK1.4 ones.
yeah.I have a question for idea maven plugin.since I have mixed using eclipse and idea for 6+ years.eclipse maven plugin has one merit.that is maven ide visual plugin.such as its tree hierarchy dependency management together with search function.as we know,idea also has similar function.but when we have a monster project.so many dependency jars in my idea diagram.it's so difficult to find which dependency we are using.so if you provide anther vision,for example .using flat maven description to depict dependency.may be a good news for me and other developers
why in hell it is not possible to run a goal from projects view? Its nice that intellij supoprt maven via plugins but if you need much longer to use them than using a console, it does not help very much....
Is it possible to have separate pom.xml per module?
Currently I have to create separate project in order to take advantage of this plugin. Thanks,
the plugin fails working on intellij 7.0.4.
M2_HOME is set correct..under WindowsXP x64

getting this exception after clicking any phase

java.lang.NullPointerException: java.lang.NullPointerException
de.qu.idea.plugin.maven.util.IdeaMavenPluginException: java.lang.NullPointerException
at de.qu.idea.plugin.maven.action.MavenRunner.execute(MavenRunner.java:276)
at de.qu.idea.plugin.maven.action.ActionUtils.runSelectedGoals(ActionUtils.java:565)
at de.qu.idea.plugin.maven.action.PomTreeMouseActionListener.processLeftMouseButtonClick(PomTreeMouseActionListener.java:327)
at de.qu.idea.plugin.maven.action.PomTreeMouseActionListener.mousePressed(PomTreeMouseActionListener.java:285)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at com.intellij.util.ui.Tree.processMouseEvent(Tree.java:74)
at java.awt.Component.processEvent(Component.java:5806)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4413)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3983)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2440)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:146)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:118)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:87)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.lang.NullPointerException
at com.intellij.execution.impl.ConsoleViewImpl.clear(ConsoleViewImpl.java:241)
at de.qu.idea.plugin.maven.action.MavenRunner.createConsoleView(MavenRunner.java:340)
at de.qu.idea.plugin.maven.action.MavenRunner.createBuildEnvironment(MavenRunner.java:306)
at de.qu.idea.plugin.maven.action.MavenRunner.startEmbeddedMavenExecution(MavenRunner.java:281)
at de.qu.idea.plugin.maven.action.MavenRunner.execute(MavenRunner.java:271)
... 28 more
This plugin is not really usefull or I can't really find the use for it.

It doesn't give you an option to add any dependencies or managing them.
This plugin is incomplete. It's great I can run a maven lifecycle phase with a simple right click in the IDE but that doesn't enrich the environment much.

To be useful it should have a dialog for searching for dependencies in repositories. It should also update your POM and project classpath.

If it were REALLY powerful it would understand the layout of the project as defined in the POM and update your project accordingly.

A good start but really just adds a bit of clutter to the environment. I'd rather use the command line.
Adding dependencies to the module classpath is done by the Maven Reloaded plugin. You might want to check that one out.
Both plugins will be integrated into the new Mevenide2 IDEA plugin (http://mevenide.codehaus.org/m2-site/mevenide2-idea/) which is currently under development and not ready for production use.
Does your plugin add the Maven dependencies into the build path for each module? Is there something I need to do to make that happen?


Enables Maven Goal execution from IDE. It is UI for maven.

Listning of the goals is good.
It gives the developer a handle to getting started.

Build output rerun feature is very usefull.
It looks like the search rerun. (Very good)

A visual graph showing the sequence/hierarchicy of the Phases / Goals would be good.
(So compile is before Install etc, and the maven modules is accumulating the stuff)

Maven is a huge thing.
I think this plugin is a
Maven Build Plugin

I suggest that the plugin specializes in building. And lets other plugin do Maven Pom updating etc.
This plugin rocks!!!

How do I set a breakpoint in some code and run the Maven test target and have it stop at the breakpoint?
Options (like -Dtest=skip) can be entered in the quick command bar below the icons in the Maven-2 Integration tool window or via the appropriate textfield in the settings dialogs.

Plugins defined in the POM are automatically added to the list of plugins of the POM. If they are listed in a profile section they are not automatically added. This is a known issue.

If you have encountered a bug or would like to suggest improvements feel free to do so at:

We've been waiting for this for a long time! Thanks a lot! We just have two comments:
- We missed an option to run a phase by informing Maven-2 option for it specifically. e.g. run package without running tests (-Dmaven.tests.skip=true)
- The plugins specified in the pom file were not retrieved automatically, although my local maven repository is set.
You can set virtual machine or other options via the "Maven command line arguments" input field.
How can I set up maximum-memory?
My project has Out-of-Memory Error When compiling.
Please  sign in  to leave a comment.