Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[recommenders-dev] [gsoc] Getting Tycho to work for you

Hi GSoC students,

a few of you have encountered this issue already, so here's our plan of
how to get you a working Tycho build, which follows the conventions we
ourselves use at Eclipse Code Recommenders.

The basic idea is that all your projects' POMs (Maven's project
description) inherit from our POMs. That way, you use the same settings
that we do (and make it thus easy to later merge your code with the
mainline).

Let's discuss this in terms of a concrete example: SnipMatch.

Each type of build artifact (plugin, test-plugin, or feature) gets its
own project and hence POM file. These POMs declare our corresponding
POMs as parent. See [1], [2], and [3] of how this looks like. Ideally,
you don't need more configuration than that.

To make it possible to build your project with a single "mvn clean
install", you then create another aggregator POM (see [4] for an
example) which simply lists all your projects which you want to build in
one go.

Note that this aggregator POM is *not* a parent of your other projects.
(This differs from the way things work in the Code Recommenders, where
the aggregator is the parent.)

If you need another project type (e.g., an update site) simply follow
this pattern: create a new project, let a minimal POM inherit from the
our parent (e.g., the one in dist/pom.xml), and add the project to your
own aggregator's <modules> section.

There is just one important prerequisite: You first need to checkout and
build the main Eclipse Code Recommenders project once. This installs the
necessary parent POMs and related artifacts into your local Maven
repository (~/.m2/repository).

  git clone
http://git.eclipse.org/gitroot/recommenders/org.eclipse.recommenders.git
  mvn clean install -f org.eclipse.recommenders/pom.xml

This only needs to be done once. Thereafter, you can just build your own
project by running "mvn clean install" from its aggregator.

Hope that helps.

Andreas

[1]
<https://github.com/JohannesDorn/SnipMatch/blob/master/plugins/org.eclipse.recommenders.snipmatch.rcp/pom.xml>
[2]
<https://github.com/JohannesDorn/SnipMatch/blob/master/tests/org.eclipse.recommenders.tests.snipmatch.rcp/pom.xml>
[3]
<https://github.com/JohannesDorn/SnipMatch/blob/master/features/org.eclipse.recommenders.feature.snipmatch.rcp/pom.xml>
[4] <https://github.com/JohannesDorn/SnipMatch/blob/master/pom.xml>

-- 
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940


Back to the top