Maven 2 Integration

Compatible with  IntelliJ IDEA
48 610
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 we know,idea also has similar function.but when we have a monster many dependency jars in my idea's so difficult to find which dependency we are 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(
at de.qu.idea.plugin.maven.action.ActionUtils.runSelectedGoals(
at de.qu.idea.plugin.maven.action.PomTreeMouseActionListener.processLeftMouseButtonClick(
at de.qu.idea.plugin.maven.action.PomTreeMouseActionListener.mousePressed(
at java.awt.AWTEventMulticaster.mousePressed(
at java.awt.Component.processMouseEvent(
at javax.swing.JComponent.processMouseEvent(
at com.intellij.util.ui.Tree.processMouseEvent(
at java.awt.Component.processEvent(
at java.awt.Container.processEvent(
at java.awt.Component.dispatchEventImpl(
at java.awt.Container.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.LightweightDispatcher.retargetMouseEvent(
at java.awt.LightweightDispatcher.processMouseEvent(
at java.awt.LightweightDispatcher.dispatchEvent(
at java.awt.Container.dispatchEventImpl(
at java.awt.Window.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.EventQueue.dispatchEvent(
at com.intellij.ide.IdeEventQueue.c(
at com.intellij.ide.IdeEventQueue.b(
at com.intellij.ide.IdeEventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.awt.EventDispatchThread.pumpEventsForFilter(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(
Caused by: java.lang.NullPointerException
at com.intellij.execution.impl.ConsoleViewImpl.clear(
at de.qu.idea.plugin.maven.action.MavenRunner.createConsoleView(
at de.qu.idea.plugin.maven.action.MavenRunner.createBuildEnvironment(
at de.qu.idea.plugin.maven.action.MavenRunner.startEmbeddedMavenExecution(
at de.qu.idea.plugin.maven.action.MavenRunner.execute(
... 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 ( 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.