Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Tycho Tutorial EclipseCon 2013
1. BUILDING ECLIPSE PLUG-INS
AND RCP APPLICATIONS
WITH TYCHO
25.03.2013 Tobias Oberlies & Jan Sievers, SAP AG
2. Tutorial Outline
Part 1: Introduction 9:00 am – 9:30 am
Tycho Overview
Part 2: Hands-on Tutorial 9:30 am – 12:00 pm
Building an e4 RCP application with Tycho
Copyright (c) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
4. 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) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
5. Related Technologies
Plug-in
Development
Environment
(PDE)
Maven
Tycho
Equinox p2
Copyright (c) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
6. 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) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
7. Maven and Tycho (cont.)
Maven Tycho
Dependencies Dependencies
declared in pom.xml declared in
MANIFEST.MF, …
Maven extension for OSGi/Eclipse artifacts
Copyright (c) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
8. 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
Headless build for PDE projects
Copyright (c) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
9. p2 and Tycho
Equinox p2 Tycho
p2 repositories for p2 repositories for
installation & update resolving build
of bundles dependencies
“Publish” artifacts to Builds p2 repositories
p2 repositories with build artifacts
Installer (“director”) tycho-director-plugin
Maven front-end for p2
Copyright (c) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
10. Where is Tycho?
Tycho is a Technology incubator project at Eclipse
Sources are at git.eclipse.org (and mirrored to github)
Documentation: wiki.eclipse.org/Tycho
Mailing lists: tycho-user, tycho-dev
Issue tracker: Bugzilla
Contributor guide:
wiki.eclipse.org/Tycho/Contributor_Guide
Tycho 0.17.0 is available from Maven central
Copyright (c) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
11. Contributors & Users
Committers
Jan Sievers (SAP AG)
Tobias Oberlies (SAP AG)
Igor Fedorenko (Sonatype Inc.)
Various contributions
Users
Eclipse platform and many other Eclipse projects
“Common Build Infrastructure” (CBI): Services for Tycho
adoption at eclipse.org
Commercial users: JBoss tools, Sigasi, SAP AG, …
Copyright (c) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
12. Part 2: Hands-on Tutorial
Copyright (c) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
13. 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) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
14. Hands-On Setup
Everything you need for the exercises is provided
on the USB stick we handed out
The exercise instructions are fully self-contained
Start with tutorial/README.html
Copyright (c) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
15. Related Sessions
Tycho BoF Mon 8:00 pm, Seaport Ballroom B
Presentations from Tycho users
Real World: Tycho Tue 5:00 pm, Cityview Ballroom 2
From Custom Maven Builds to Tycho
Wed 10:30 am, Back Bay
Automating the consumption of Eclipse for internal
use Thu 1:30 pm, Harborview Ballroom 2
Comparison of build technologies
Bundle Building Wed 1:30 pm, Beacon Hill 1
Copyright (c) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
16. Please give feedback!
1. Sign In: www.eclipsecon.org
2. Select Session Evaluate
3. Vote
Copyright (c) 2013 SAP AG and others. Licensed under EPL v1.0 25.03.2013
Hinweis der Redaktion
Packaging types -> declarative build „what to build“ not „how to build“ Use Tycho -> get lots of other tools from the Maven ecosystem for free
POM = project object model, main configuration file for a Maven build
Eclipse Platform -> probably the most complicated build you can imagine -> CBI project has ported it to Tycho