BUILDING ECLIPSE PLUG-INS
AND RCP APPLICATIONS
WITH TYCHO
17.03.2014 Tobias Oberlies, SAP AG
Tutorial Outline
Part 1: Introduction 1:00 pm – 1:30 pm
Tycho Overview
Part 2: Hands-on Tutorial 1:30 pm – 4:00 pm
Building an e4 RCP application with Tycho
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Part 1: Introduction
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
What is Tycho?
Tycho is a Maven extension for building
Eclipse artifacts
Eclipse plug-ins/OSGi bundles
Features
p2 repositories
RCP applications/Eclipse distributions
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Technology Background
Plug-in
Development
Environment
(PDE)
Maven
Tycho
Equinox p2
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Maven and Tycho
Maven Tycho
mvn clean install mvn clean install
Packaging types for eclipse-plugin,
standard artifacts eclipse-feature, …
Tests run in build eclipse-test-plugin
Customize build with Most Maven plugins
additional goals also work in Tycho
(FindBugs, code projects
generators, …)
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Maven and Tycho (cont.)
Maven Tycho
Resolve against Resolve against p2
Maven repositories repositories
Dependencies Dependencies
declared in pom.xml declared in
MANIFEST.MF, …
Maven extension for OSGi/Eclipse artifacts
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
PDE and Tycho
Plug-in Development
Environment (PDE) Tycho
MANIFEST.MF, Tycho reads PDE
feature.xml, source files
build.properties, ...
Build path according JDT compiler with
to OSGi manifest OSGi visibility rules
JUnit plug-in tests eclipse-test-plugin
Automated build for PDE projects
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
p2 and Tycho
Equinox p2 Tycho
p2 repositories for p2 repositories for
installation & update resolving build
of plug-ins dependencies
“Publish” artifacts to Builds p2 repositories
p2 repositories with build artifacts
Installer (“director”) tycho-director-plugin
Maven front-end for p2
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Where is Tycho?
Tycho is a Technology incubator project at Eclipse
Sources are at git.eclipse.org
Documentation: wiki.eclipse.org/Tycho
Mailing lists: tycho-user, tycho-dev
Issue tracker: Bugzilla
Contributor guide:
wiki.eclipse.org/Tycho/Contributor_Guide
Tycho 0.20.0 is available from Maven central
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Contributors
Committers
Igor Fedorenko (takari.io)
Jan Sievers (SAP AG)
Tobias Oberlies (SAP AG)
Various contributions
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Users
Eclipse IDE projects
Eclipse tooling, e.g. CDT, EGit, …
Eclipse packages (EPP)
Eclipse platform
“Common Build Infrastructure” (CBI): Services for Tycho
adoption at eclipse.org
OSGi applications: Gyrex, openHAB, …
Commercial users: RedHat, Sigasi, SAP AG, …
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Part 2: Hands-on Tutorial
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Hands-on Exercises
Create and build an Eclipse 4 RCP application
Create a plug-in with a sample Eclipse 4 RCP
application
Add a unit test
Add a feature
Create a p2 repository
Build a distribution with the RCP application
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Hands-On Setup
All material you need for the exercises is available
from the USB sticks
Eclipse distribution for your platform
The „tutorial“ folder
No Wi-Fi required
Do exercises together or at your own pace
The exercise instructions are fully self-contained
Start with tutorial/README.html
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Related Sessions
Tycho BoF Wed 6:00 pm, Grand Peninsular G
Talks
Time to Build and Test Results 3x Faster - How We Did It
Tue 11:15 am, Bayside Room
Integration tests for RCP made easy with SWTBot and
Tycho Tue 3:00 pm, Bayside Room
15000 users, one update site Thu 10:15 am, Gr. Peninsular B
Fork the IDE: Build your own SDK with CBI Thu 11:00 am,
Harbour Room
EclipseCon Hackathon Tue 7:00 pm, Harbour Room
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014
Please give feedback!
1. Sign in to www.eclipsecon.org
2. Select the Tycho tutorial session
3. Evaluate!
Copyright (c) 2014 SAP AG and others. Licensed under EPL v1.0 17.03.2014