In a shell (e.g. from msysgit or Cygwin), execute git clone https://git.eclipse.org/r/p/tycho/org.eclipse.tycho.git

In Eclipse, use File > Import > Existing Maven Projects, select the root directory of the sources, and import all projects. Install the proposed project configurators and restart Eclipse.

Configure the target platform: Open the file tycho-bundles-target/tycho.target and click on Set as Target Platform in the upper right corner of the target definition editor.

The result should be an eclipse workspace without build errors. m2eclipse may take some time to download required libraries from Maven central.

If you get an "Error Updating Maven Configuration" for the projects org.eclipse.tycho.surefire.junit, org.eclipse.tycho.surefire.junit4, and org.eclipse.tycho.surefire.osgibooter, select just these three projects, select Maven > Update project... from the context menu and confirm the dialog.

Building Tycho

Tycho can be built from source by executing mvn clean install in the root directory.

In order to execute the Tycho integration tests, you can use the scripts in the root of the sources:

Edit bootstrap.cmd in the root directory and adapt the variables TYCHO_TEST_TARGET_PLATFORM -> point to Eclipse SDK 3.7.0 plus delta pack, TYCHO_M2_HOME -> point to maven 3 home directory

Advanced Topics

Executing integration tests in Eclipse

It is possible to start most integration tests directly from Eclipse. Note however that you will still need to build Tycho through a mvn install first whenever you have made changes to the Tycho code, e.g. using the bootstrap.cmd as described above. (Background: The integration tests trigger builds of test projects -- and these builds take Tycho from it's normal location, i.e. the local Maven repository.)

Tips:

The integration test builds use the settings stored in tycho-its/settings.xml (they don't use the default Maven settings.xml). If you have special requirements, e.g. for proxy settings, you can edit this file. Alternatively, you can point to a different settings.xml with the system property tycho.testSettings.

Writing integration tests

The hardest part for writing Tycho integration tests is the naming. While names are mostly important for readability, there were also cases where the ID "feature" was used multiple times and hence a test used the build result of a different integration test.

Therefore, here are a few tips for writing good integration tests:

Test project name: Although most existing test have a bug number in the name, this is not the recommended naming scheme. Since integration test can take some time to execute, it may be a good idea to test related things in one test. So name the test projects in a way that they can be found, and that related tests are sorted next to each other, e.g. in the form <feature>.<aspect>.

Package: Should be org.eclipse.tycho.test.<feature>

Test project groupIds: Should be tycho-its-project.<project.name> (plus a segment for the reactor in case of multi-reactor tests). The groupId is particularly important if the test project is installed to the local Maven repository. (Avoid install; use verify if possible.)

Test project artifactIds: Should be the same as the ID of the feature/bundle; need to start with something unique, e.g. the first letters of each segment of the project name.

Building Tycho against a locally built version of p2

Tycho makes heavy use of p2 functionality. Therefore it may be useful to try out patches in p2 before the next version of p2 has been released. With the following steps it is possible to build Tycho against a locally built version of p2.

Then the locally built Tycho SNAPSHOT includes the patched p2 version.

Note: Tycho always allows references to previously built artifacts, even if they are not part of the target platform. Therefore you may want to clear the list of locally built artifacts (in the local Maven repository in .meta/p2-local-metadata.properties) after local changes a described above.