Eclipse Integration

Anything to do with Eclipse and Maven Integration.

Including, but not limited to:

  • Maven user's perspective: setting up an Eclipse Project derived from Maven's pom.xml
  • Maven developer's perspective: debugging Maven in Eclipse
  • Eclipse developer 's perspective: creating Eclipse artifacts (plugins, fragments, features, products, update sites, etc) via Maven

And any discussions needed to work out the design of how to get all this done and work with existing communities to pull this all together

see also: mevenide2-netbeans, maven-idea-plugin, Idea integration, ... 

Maven user

These plugins provide varying levels of support Maven Integration into Eclipse Workbench

  maven eclipse plugin Maven Integration for Eclipse (m2eclipse) q4e
Eclipse project   http://www.eclipse.org/m2e/ http://www.eclipse.org/iam/
Eclipse Update Site   http://m2eclipse.sonatype.org/update/ http://q4e.googlecode.com/svn/trunk/updatesite/
Project info      
releases 12/2005 - 2.0
02/2006 - 2.1
04/2006 - 2.2
01/2007 - 2.3
07/2007 - 2.4
05/2006 - 0.0.9
01/2007 - 0.0.10
09/2007 - 0.0.11
10/2007 - 0.0.12
03/2008 - 0.9.0, 0.9.1
04/2008 - 0.9.2, 0.9.3
05/2008 - 0.9.4
07/2008 - 0.9.5 details
08/2007 - 0.2.0
11/2007 - 0.3.0
01/2008 - 0.4.0
03/2008 - 0.5.0 details
04/2008 - 0.6.0 details
05/2008 - 0.6.1
06/2008 - 0.7.0 details
Open Source, License Apache V2 EPL 1.0 EPL 1.0
Number of committers (active)
stats 10 (7) stats
Mailing lists Maven lists (no dedicated ones) users, developers, commits users, developers, commits
issue tracking Jira MECLIPSE Jira MNGECLIPSE Google issues
wiki
Confluence Google wiki
Maven version any any 2.1-SNAPSHOT why
hosting Apache Codehaus, Sonatype Google
Required Java version 1.4+ 1.5+ 1.5+
Supported Eclipse version n/a 3.2, 3.3, 3.4 3.3, 3.4
Features      
Running Maven from the IDE n/a
Quick navigation from build log to Surefire reports n/a details
Chose Maven version to run goals n/a why
allow to select/search goals to run n/a
Cancel Maven builds n/a "stop" from Console view
Filter Maven output (info,debug,error,downloads,...) n/a "Debug Output" setting
Automatic Eclipse classpath synchronized with Maven POM n/a details
Resolving dependencies from Eclipse Workspace
details details
Resolving dependencies from Eclipse Workspace for externally launched Maven
details why
Support resource filtering details details
Automatic downloading of project dependencies when POM changed
details
Automatic downloading of dependency sources
details
Manual downloading sources for any jars
details
Attaching custom sources and javadocs to Maven dependencies details
Dependency graph n/a details details
Dependency analysis UI (find excluded, omitted, duplicated,... dependencies) n/a [1] details details
Dependency management UI (force version, exclude dependency) n/a details
New Maven 2 project wizard using archetypes CLI details
Extensible archetype list sources (for new project wizard) CLI
New Maven Module wizard n/a
Import local Maven 2 projects CLI [2] details details
Import Maven 2 projects from VCS (CVS, SVN, etc)
details
Import Maven 2 projects from Maven artifacts
details
Search and view artifact POMs from remote repositories n/a
Form-based editor for entire Maven POM schema n/a details
Hyperlinking and content assistance in form-based POM editor n/a details
Completion in POM XML editor  
Configurable templates in POM XML editor  
Ctrl-click navigation in POM XML editor  
Navigation to pom, project, issue tracker, scm and ci sites from artifacts   details
Browse content of remote repositories offline
details
Quick search dependencies from remote Maven repos n/a details
Quick search dependencies on Local Maven repo n/a details
Quick Add dependency to POM n/a details
Quick Fix in Java editor for missing dependencies n/a details
Search and view classes from the artifacts in remote repositories n/a
Basic integration with Subclipse (checkout from SVN Repositories) n/a details
Basic integration with Subversive (checkout from SVN Repositories) n/a details
Basic integration with Maven SCM (checkout from CVS, SVN, Git, Mercurial and others) n/a details
Basic integration with Mylyn n/a details
Basic integration with WTP CLI [2] details details
Basic integration with AJDT
details
Debug Maven core and plugins
details details
Debug tests launched from Maven
details details
Debug Maven plugins from Eclipse Workspace
details details

[1] maven-dependency-plugin provides number of goals that can be used for extensive dependency analysis
[2] maven-eclipse-plugin allow to generate eclipse project metadata, so project can be imported using import existing project wizard

Maven developer

Debug Maven using Standalone Maven install

First of all you need to get corresponding Maven projects into the Eclipse workspace.

To debug Maven standalone Maven CLI you can set the following environment variable:

MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

Then start Maven as usual and attach remote debugger to Maven process on port 8000 using Eclipse's "Remote Java Application" configuration.

Alternatively you could create the following "Java Application" launch configuration and launch it directly from Eclipse:

Main class org.codehaus.classworlds.Launcher
classpath %M2_HOME%\boot\classworlds-1.1.jar
VM arguments -Dclassworlds.conf=%M2_HOME%\bin\m2.conf
-Dmaven.home=%M2_HOME%
Program arguments <maven cli arguments>

Run and Debug Maven 2.1 from Eclipse Workspace with m2eclipse

You can run and debug Maven right from the Eclipse workspace with m2eclipse using the following instructions.

Debug Maven plugins using m2eclipse

With m2eclipse you can debug Maven core and Maven plugins while running goals using m2eclipse's "Maven Build" external tools launch configuration (or from Run As / Maven * shortcut from the popup menus). Simply put a break point in the corresponding classes and switch to the Debugger perspective.

You can also configure Maven surefire plugin to not fork new JVM to run tests and then you can even debug test classes launched using "Run As / Maven test" shortcut:

<plugin>
  <artifactId>maven-surefire-plugin</artifactId>
  <configuration>
    <forkMode>never</forkMode>
  </configuration>
</plugin>

Debug Maven using Q4E

Q4E launches Maven in process, not in a new jvm for c. For debugging you'll need a second jvm running in debug mode.

The easiest way to debug both Q4E, Maven and everything run by both of them is to launch a new Eclipse workspace in Debug mode.
Go to Run - Debug and create a new Eclipse Application
In the plugins tab make sure you select all Q4E plugins and click add required plugins
A new Eclipse is launched in debug mode and you could run any Maven goal through the Run - Run Menu, new Maven 2 configuration. Breakpoints in the original Eclipse will be used. Surefire should be configured not to fork the tests in this case.

If you just want to debug tests run by Maven you could configure Surefire plugin to fork with this jvm parameters

-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

When launching a goal that runs the tests the execution will stop just before and you can go to Run - Debug - New Remote Application attaching the remote debugger to port 8000.

Eclipse developer

Building Eclipse Plugins with Maven 2: http://www.eclipse.org/articles/article.php?file=Article-Eclipse-and-Maven2/index.html describes plugins from http://svn.codehaus.org/m2eclipse/maven-pst/.

Tycho project https://svn.sonatype.org/m2eclipse/tycho/trunk also see m2eclipse project build.

These plugins provide varying levels of support for building Eclipse artifacts with Maven

Other (or to be categorized)

Labels

 
(None)