Planning for M2 Integration for IDEA

General

This document describes the main features to be implemented for the 1.0 release of Maven 2.x Integration for IDEA, as well as thoughts regarding the implementation details for them.

Main features

To add the Maven integration, we would ideally want the following features:

  1. Repository Browser: A tool window that presents a list of available repositories for browsing. The list of repositories should be determined by inspecting both the user's ~/settings.xml file, as well as any repositories specified in the current project(s). The browser should support browsing both the user's local repository, and any available remote repositories as well. Remote browsing must be coded defensively against timeouts, network problems, etc and fail gracefully. Plugin repositories might also be an interesting feature - display a list of available plugins based on currently registered plugin groups (both in the current project and in the settings.xml file). All browsers should support searching, although it is not clear right now how it can be implemented (is there an index maintained in repositories that can be searched?)
  2. Synchronization of IML/IPR/IWS with changes in pom.xml: The plugin must be aware of changes that the developer makes in pom.xml and refresh things if needed.
  3. Visual POM editor: The visual POM editor should allow editing the POM file via a graphical user interface, preferably integrated into standard IDEA dialogs and windows, in appropriate places. For example, general project information (such as licensing, developers list, etc) can be placed in each individual module's settings page (since each module might have different settings).
  4. New project/module wizards: We should provide a custom "New project" wizard which creates a project using the standard Maven conventions (such as "src/main/java" instead of "src", "src/test/java", etc). The wizard should also create a POM file as well, allow the user to select dependencies, specify group ID and artifact ID, etc. We could do this by simply creating a POM file, and then execute the "idea:idea" mojo. There should be both a new project and a new module wizards. The new module wizard should update its containing POM's "<modules>" element, of course.
  5. New POM action: Provide an action that generates a POM file from an existing IDEA project. It should work for multi-module projects as well.
  6. Projects and Modules: Rather than reinvent the wheel, we should probably bridge between IDEA's notion of projects and modules and Maven's conventions (which is quite similar). The easiest way to do this is simply linked each IDEA module to a POM file. This would represent the Maven project inside IDEA in the best way IMO.
  7. Custom Mojo execution: The plugin should provide a facility to execute arbitrary phases/mojos and view their output in a custom console (probably in a toolwindow.) It would also be useful to be able to bind certain key combinations to specific phases or mojos for quick invocations.
  8. Dependencies download: Opening a project should download its dependencies (must be optional). This should also be user-triggerable, on demand. Snapshots updating should also be triggerable.

Each listed feature could possibly be a different module in the project (inside the big mevenide2 project).

Implementation

We should let IDEA do what it does best - be an IDE - but replace certain parts with the respective Maven phases/mojos. An example of that would be a custom compiler (IDEA 5.x has a compiler API) which activates the 'compile' phase (or maybe 'process-classes'?) instead of IDEA's standard javac calls.

IDE events

There are bound to be certain IDE events that we would want to be able to respond to. For example, removing a module should remove the corresponding "<module>" element from the parent project's POM file, if present.

Labels

 
(None)