Checking out code
To build Eclipse plugin you can checkout projects into Eclipse Workspace from anonymous svn repository at http://svn.sonatype.org/m2eclipse/trunk. You can either do that from the command line and then import them as "Existing projects in Workspace", or with Subcliupse using "File / Import... / SVN / Checkout Projects from SVN" wizard or "Checkout..." action from "SVN repositories" view.
Configuring Target Platform
In order to build and run m2eclipse with Eclipse PDE you need to configure Target Platform that should include required dependencies. There are instructions for assembling target platform:
You can copy all plugins and features into single place and then select that from Window / Preferences... / Plug-in Development / Target Platform, using "Browse..." button.

Alternatively, you can create new "Target Definition" using File / New... / Other... / Plug-in Development / Target Definition wizard and add each required feature from a separate folder. Target definition is stored in your workspace and you can set it as Target Platform right from the editor or select it using "Browse..." button at the bottom of Target Platform preferences dialog and then use "Load Target" button to activate it.
Target definition (.target file) based on above instructions for Eclipse 3.3 may look something like this (folder names would be different in your environment):
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.2"?>
<target name="m2e e33">
<location path="C:\eclipse\eclipse-3.3.2\eclipse"/>
<content useAllPlugins="true">
<plugins>
</plugins>
<features>
</features>
<extraLocations>
<location path="C:\eclipse\eclipse.subclipse.1.4\eclipse"/>
<location path="C:\eclipse\eclipse.wtp.sdk.2.0.2\eclipse"/>
<location path="C:\eclipse\eclipse.gef.sdk.3.3.2\eclipse"/>
<location path="C:\eclipse\eclipse.mylyn.2.3.2\eclipse"/>
<location path="C:\eclipse\eclipse.ajdt.1.6.0\eclipse"/>
<location path="C:\eclipse\eclipse.zest\eclipse"/>
<location path="C:\eclipse\eclipse.emf.sdk.2.3.2\eclipse"/>
</extraLocations>
</content>
</target>
Importing projects using PSFs
 | This is advanced configuration and it is not needed if you configured Target Platform as described above |
All projects and most of the required 3rd party dependencies (except WTP and AJDT) can be imported using the following Eclipse Team Project Sets (PSF) that you can invoke from "File / Import... / Team / Team Project Set" menu. Those PSF are using Subclipse team provider.
- if prompred for password for :pserver:dev.eclipse.org:/cvsroot/tools use anonymous/<empty password>
- if prompred for password for http://subclipse.tigris.org/ use guest/<empty password>
Here is some more details about m2eclipse projects:
- Required dependencies (required)
org.maven.ide.components.maven-embedder - Maven core packaged as OSGi bundle
org.maven.ide.components.archetype-common - Maven Archetype packaged as OSGi bundle
org.maven.ide.components.maven-scm - Maven SCM packaged as OSGi bundle
org.maven.ide.components.nexus-indexer - Nexus Indexer packaged as OSGi bundle
org.maven.ide.components.maven-model-edit - Maven model for editing. Dependends on WTP SSE framework
- Core projects (required)
org.maven.ide.eclipse - core plugin
org.maven.ide.eclipse.central - Nexus index for Maven Central repository
org.maven.ide.eclipse.scm - integration for Maven SCM
org.maven.ide.eclipse.tests - tests
- Mylyn integration (optional, depends on Mylyn)
org.maven.ide.eclipse.mylyn - Mylyn integration
- Subclipse integration (optional, depends on Subclipse)
org.maven.ide.eclipse.subclipse - Subclipse integration
- Features and update site (optional)
org.maven.ide.eclipse.feature - core feature
org.maven.ide.eclipse.central.feature - feature for Central index
org.maven.ide.eclipse.scm.feature - feature for Maven SCM
org.maven.ide.eclipse.mylyn.feature - feature for Mylyn integration
org.maven.ide.eclipse.subclipse.feature - feature for Subclipse integration
org.maven.ide.eclipse.update - update site
- Maven build (optional)
org.maven.ide.eclipse.parent
- POM Editor
org.maven.ide.components.dependency-tree
org.maven.ide.eclipse.editor
org.eclipse.draw2d
org.eclipse.zest.core
org.eclipse.zest.layouts
org.maven.ide.eclipse.editor - depends on WTP SSE framework
org.maven.ide.eclipse.editor.xml - depends on WTP SSE framework
org.maven.ide.eclipse.editor.xml.tests
- AJDT and WTP integrations
org.maven.ide.eclipse.ajdt - depends on AJDT 1.5.x
org.maven.ide.eclipse.wtp - depends on WTP 2.0.2
Running m2eclipse in self-hosted mode
Self-hosted mode allow to try and debug plugins without installing them. To use that mode you can open org.maven.ide.eclipse/plugin.xml with PDE's Plug-in manifest editor and then click "Launch an Eclipse application" link on the Overview page.
You can also got use main menu "Run / Run configurations..." and then create new launch configuration using "Eclipse Application" cofiguration type. There you can also select JRE used to run Eclipse and what plugins should be included at runtime (use "all workspace and enabled target plug-ins, or select them individually and use "Validate Plug-ins" action to verify if selected configuration is correct).
Running tests
To run all tests from the IDE, select open org.maven.ide.eclipse.tests project and invoke "Run As... / JUnit Plug-in test" action from the popup menu. You can use "Debug As... / JUnit Plug-in test" to run tests with debugger.
You can also invoke the same action on individual tests in this project.
Building update site using Maven
 | Tycho version 0.2 or above is required to build m2eclipse distribution! |
To build complete update site using Maven, you need all projects checked out locally. Then switch to org.maven.ide.eclipse.parent folder and run
That will build all nested modules, including org.maven.ide.eclipse.update project and if everything succeed, the update site can be found at org.maven.ide.eclipse.update/target/site/
Generating P2 metadata for update site
The following command from Eclipse 3.4 folder will generate P2 metadata for m2eclipse update site built by Maven:
eclipsec.exe
-nosplash
-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator
-metadataRepositoryName "Maven Integration for Eclipse Update Site"
-artifactRepositoryName "Maven Integration for Eclipse Artifacts"
-updateSite C:\dev\m2eclipse-site\update
-site file:C:/dev/m2eclipse-site/update/site.xml
-noDefaultIUs -vmargs -Xmx256m
 | The -updateSite and -site parameters should be pointing to the local folder folder containing update site files build with Maven. Also note that on Windows path specified in the -updateSite parameter should be using backward slashes and URL specified in -site parameter should be using regular slashes. |
 | This step is required after building update site until support for this implemented for the Maven update site build |
Updating external dependencies
To update external dependencies you need to enable "update-dependencies" profile when running Maven build for the entire project or individual org.maven.ide.components.* projects:
mvn -Pupdate-dependencies clean package
This will update external jars and also regenerate plugin's MANIFESt-MF files.
 | If jar names had been changed, you may have to run "Update the classpath settings" action from the Overview page in plugin.xml editor! |