Posted by kohsuke
on November 27, 2007 at 1:04 PM PST
I wrote a small IntelliJ plugin that automatically figures out the current Maven module from your active editor and runs the install goal with it.
IntelliJ 7.0 adds a great Maven integration , but IMO it's missing one crucial feature. That is, to build the Maven module that you just changed.
OK, so here's the scenario; you are working on a multi-module project, and you are debugging something. You found a problem in one of the modules, so you edit the file, install the module, and run the test program again. This works nicely from IntelliJ, except the "install the module" portion — for you to install the module, you have to find the right module from the tool window, and click the "install" target. This is tedious and annoying.
This plugin adds a "Install this module" menu item to the Build menu. You should also assign a keyboard short-cut to it(personally, I use F9 to go with F9=build theme.) When you click the menu item, based on the current active editor, it will figure out the Maven module that owns that file, then run the install goal against it.
To install this plugin, just head for your IntelliJ plugin manager and look for "maven build-this-module plugin"