⚠️ This page is outdated, use https://github.com/eclipse-m2e/m2e-core/blob/master/CONTRIBUTING.md instead.

Development Environment Setup

Download and unpack Eclipse latest SDK build from http://download.eclipse.org/eclipse/downloads/. The instructions below assume fresh/clean Eclipse SDK installation.

Use the instructions at http://help.eclipse.org/topic/org.eclipse.platform.doc.user/tasks/tasks-124.htm to install “Maven integration for Eclipse” and “Git integration for Eclipse” from the standard update sites of the Eclipse SDK. You can also find and install the most recent release of these plugins in the following P2 repository URLs, which can be added using the Eclipse Install UI as explained in http://help.eclipse.org/topic/org.eclipse.platform.doc.user/tasks/tasks-127.htm:

Some modules of the m2e core code make use of logback classic. When you later proceed to import projects, you will get errors in some (e.g. org.eclipse.m2e.logback.appender and org.eclipse.m2e.logback.configuration) complaining that you are missing the ch.qos.logback.classic library in your Eclipse. The easiest way to install the “Logback Classic Module” is to again use the instructions at http://help.eclipse.org/topic/org.eclipse.platform.doc.user/tasks/tasks-124.htm to install the “m2e - slf4j over logback logging” optional plugin. This provides a maven console in your host workspace. Alternatively if you do not want that feature, you need to at least inestall the “Logback Classic Module” plugin from the Orbit repository, so that it is available in your host Eclipse.

You should now have all plugins you need in your Eclipse to proceed with building the source code.

The code is split across two repositories:

The latter is configured as a git submodule of the former. Either clone the first repository including submodules, or just clone both repositories separately. Either way, before proceeding to import anything into you workspace, make sure you are on the matching branches of the m2e-core repository and the m2e-core-tests repository (whether that was cloned separately or as a submodule). For example if you are on the master branch of m2e-core you should be on the master branch of m2e-core-tests as well. Otherwise you may get errors when oou import from the latter, where the test projects will not be able to resolve the snapshot version of m2e core they are testing against.

Once you are on the correct branch, perform a project import in this order:

  1. First import as Maven projects m2e-maven-runtime and all projects within it. These projects bundle the Maven runtime as Eclipse plugins.
  2. Next import as Maven projects everything under m2e-core but make sure you exclude anything under m2e-core-tests. Expect m2e-core-tests projects to show up for import if you cloned the latter as a submodule, which makes it manifest as a nested folder. Furthermore, make sure you only import Maven projects and not any Eclipse projects: You will find many of the latter type nested deeply within m2e-core projects and they are all actually test-data resources not meant to live within your development (host) workspaces.
    • NOTE: at this stage, m2eclipse should prompt you to install several m2e connectors for Tycho and Modello. As you follow onscreen instructions, allow M2Eclipse to install additional software and restart Eclipse when requested.
    • Before importing further projects, you will need to go to the source tab of the Java Build Path properties of project org.eclipse.m2e.tests.common and toggle the “Contains test sources” setting to ‘No’.
    • Update the maven project configuration for all projects and do a clean build. Give Eclipse some time to update project configuration after restart.
  3. Finally, you can import as Maven projects the test projects m2e-core-tests. NOTE: Once again you will need to be careful to only import Maven projects. Do not import Eclipse projects. The latter will be nested deeply within m2e-core-tests projects and are actually test-data resources not meant to live within your development (host) workspaces.

You may need to Update Maven (forcing update of snapshot releases) and do Project/Clean…/Clean_all_projects to clear all compilation errors.

Running M2Eclipse Automated Regression Tests from Eclipse

Add the following memory configuration parameters to JVM startup options


Use JUnit Plug-in Tests launch configuration type to run/debug M2Eclipse automated regressions tests from Eclipse.

Caveat. Two tests are expected to fail when run from Eclipse

  1. ProjectRegistryManagerTest#testEnvironmentVariablesConsidered requires TEMP environment variable to be set and is expected to failed when run from Eclipse.

  2. MarkerTest#test is rather sloppy and requires elaborate launch configuration setup to limit set of m2e extensions enabled during the test.

Both tests are expected to pass on command line (see instructions below).

Building M2Eclipse on the CLI

Building m2e on command line is a two step process, both performed from root of m2e-core checkout directory

First, you need to install m2e maven runtime to local maven repository

mvn clean install -f m2e-maven-runtime/pom.xml`

Then, package M2Eclipse update site:

mvn clean package

The repository is created under org.eclipse.m2e.site/target/repository directory.

Running M2Eclipse Automated Regression Tests on the CLI

To run m2e automated regression tests, execute the following command from m2e-core-tests checkout directory

mvn clean integration-test -Puts,its -fae -Dm2e-core.url=file://<full-path-to-m2e-repository>

Submitting Patches

M2Eclipse Core Sources at Eclipse.org

M2Eclipse only accepts changes contributed via Gerrit. Here is the wiki that explains how to use it http://wiki.eclipse.org/Gerrit . Good luck.

According to eclipse legal poster, all contributors must have signed Eclipse CLA and their bugzilla email and git commit author must match (otherwise Eclipse git server refuses contribution).

Note that M2Eclipse developers do NOT watch Gerrit submissions directly. All contributions must be referenced from corresponding bugzilla records.

M2Eclipse Core Tests at Github

In most cases m2e core patches will require corresponding regression tests. Changes to m2e core tests repository must be submitted as github pull requests and must be linked to bugzilla record, along with corresponding Gerrit change set.