(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
Building Eclipse plugins and RCP applications with Tycho, Nexus & HudsonIgor Fedorenko, SonatypePascal Rapicault, SonatypeJan Sievers, SAP
Contents of this sessionPart I: Introduction to Maven TychoWhat is Tycho?What can it do?How does it relate to Maven, p2, PDE?Who is using it?Real-life Build DemoQ&APart II: Hands-on exercises. Learn how to buildPlugins/OSGi bundlesTestsFeaturesp2 repositoriesRCP applications/products
What is Tycho?A way to build, test, release and publishEclipse/OSGi artifacts with mavenIt can buildEclipse Plugins/OSGi bundlesExecute tests within the OSGi runtimeFeaturesp2 repositoriesRCP applications a.k.a. Products
Who is working on tycho?Tycho started a couple of years ago from the need to have the ability to build eclipse plugins using MavenThe initial work has been started by Tom HuybrechtsSonatype joined the forces shortly after thatNowadays, the main contributors are SAP, Sonatype and Intalio
Who is using it?Tycho is used in production by IntalioSAPSonatypeOpen source projects of different size and complexityEGitEclipse Memory AnalyzerRT JettyEquinox p2TigerstripeJBoss Tools
How does it relate to maven?Tycho is a set of maven 3 plugins which hooks into the build lifecycle at a low levelAs such, it opens up eclipse/OSGi builds to the rich Maven ecosystem of plugins for code generators, quality analysis tools, code coverage, etc. How is it different from other maven plugins?It introduces support for resolving dependencies against p2 repositoriesIt resolves dependencies based on MANIFEST.MF/feature.xml etc. and tries to reuse other PDE metadata like build.properties („MANIFEST-first“ as opposed to „POM-first“)
How does it relate to p2?Tycho produces p2 repositories as part of a buildTycho downloads the dependencies of the entities being built from p2 repositories. By default, Tycho does not resolve its dependencies from Maven repositories because the Maven dependency and repository models can not accommodate the expression of OSGi dependencies like Import-PackageTycho embeds parts of p2 in order to perform the dependency resolution and a few other key operations like publishing
How does it relate to PDE?Tycho reuses some of the files that are being used by PDE Build such as MANIFEST.MF, build.properties, feature.xml, site.xml, .product where it makes senseThis allows to reuse PDE UI infrastructure like classpath management, launching capabilities, editors for OSGi manifest, features, product files, target platforms etc.Tycho being a headless build mechanism, it "competes" with PDE build only in the sense that it provides an alternative way to do a headless build of plugins and other eclipse artifacts
Where is Tycho?Tycho is an open source project run by SonatypeIt has recently been given to the Eclipse Foundation and is currently incubatingWe are in the process of contributing the code to Eclipse Foundation but it‘s not done yet. Getting Tycho and its dependencies through Eclipse legal process is a lot of workProject homepage http://eclipse.org/tychoCurrently the codebase is still on githubUsers and development mailing lists:tycho-users@lists.sonatype.comBugs filed at https://issues.sonatype.org/browse/TYCHO
Build Demo
Questions?
Coffee break
Part II: Hands-On Exercises
Setting up the environmentUnzip theinternet.zipWindowsTo C:clipsecon2011Linux and Mac OSXTo /var/tmp/eclipsecon2011Setup your Maven local repositoryWindows(from home folder) ren .m2 .m2-backupcd .m2copy c:clipsecon2011ettings.xmlLinux and Mac OSXmv ~/.m2 ~/.m2-backup; mkdir ~/.m2cp /var/tmp/eclipsecon2011/settings.xml ~/.m2
Setting up the environment (cont’ed)Make sure JAVA_HOME is set; JAVA_HOME/bin is on PATHStart NexusWindowsC:clipsecon2011exusinswindows-x86-32exus.batLinux x86/var/tmp/eclipsecon2011/nexus/bin/jsw/linux-x86-32/nexus startLinux x86_64/var/tmp/eclipsecon2011/nexus/bin/jsw/linux-x86-64/nexus startMac OSX/var/tmp/eclipsecon2011/nexus/bin/jsw/macosx-universal-64/nexus start
Setting up the environment (cont’ed)Make sure Nexus has started successfullyIn sonatype-work/nexus/logs/nexus.log...com.sonatype.nexus.pgp.DefaultPGPKeyManager - Creating PGP Key Collection for the first time.org.mortbay.log - Started SelectChannelConnector@0.0.0.0:8081...Access Nexus Web GUI
http://localhost:8081/nexus
Administrator credentials: admin/admin123
Developer credentials: eclipsecon/eclipseconSetting up the environment (cont’ed)Unzip Eclipse IDE to eclipsecon2011Windows ideclipsecon2011.tycho.tutorial.ide-win32.win32.x86.zipLinux x86ide/eclipsecon2011.tycho.tutorial.ide-linux.gtk.x86.zipLinux x86_64ide/eclipsecon2011.tycho.tutorial.ide-linux.gtk.x86_64.zipMax OSXide/eclipsecon2011.tycho.tutorial.ide-win32.win32.x86.zipStart Eclipse IDE by runningeclipsecon2011/eclipse/eclipse
settings.xmlhttp://www.sonatype.com/books/mvnref-book/reference/appendix-settings.html<servers>id: This is the id of the server (not of the user to login as) that matches the <repository/>, <pluginRepository> and <mirror/> element's id.username/password: credentials to access matching repositories, plugin repositories and mirrors.<mirrors>id, name: The unique identifier of this mirror. The id is used to differentiate between mirror elements.url: The base URL of this mirror. The build system will use prepend this URL to connect to a repository rather than the default serverURL.mirrorOfThe id of the server that this is a mirror of. For example, to point to a mirror of the Maven central server (http://repo1.maven.org/maven2), set this element to central. This must not match the mirror id.<repositories>blocks accidental access to Maven Central repository
Building an RCP app in 5 step-by-step exercisesBuild a simple RCP pluginBuild and execute a simple testAdd a featureAdd a repositoryAdd a productEach step has a folder with stub content as a starting pointREADME.txt gives detailed step-by-step instructionsThe folder for an exercise is at the same time starting point for the current exercise and solution of the previous one
Exercise 1: Create and build a hello world RCP plugin using tychoDetailed instructions in Exercise_01_Create_RCP_Bundle/README.txt
Exercise 2: Add a test fragment with a simple JUnit testDetailed instructions in Exercise_02_Add_Test_Fragment/README.txt
Exercise 3: Add a featureDetailed instructions in Exercise_03_Add_Feature/README.txt
Exercise 4: Add a p2 repositoryDetailed instructions in Exercise_04_Add_P2_Repository/README.txt
Exercise 5: Add a productDetailed instructions in Exercise_05_Add_Product /README.txt

More Related Content

What's hot

Do's and Do not's about p2
Do's and Do not's about p2Do's and Do not's about p2
Do's and Do not's about p2
Pascal Rapicault
 
Using The EGit Eclipse Plugin With Git Hub
Using The EGit Eclipse Plugin With Git HubUsing The EGit Eclipse Plugin With Git Hub
Using The EGit Eclipse Plugin With Git Hub
guest4bce3214
 
Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development
Pei-Hsuan Hsieh
 
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages HeavenIBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
Paul Withers
 
Unit Test Android Without Going Bald
Unit Test Android Without Going BaldUnit Test Android Without Going Bald
Unit Test Android Without Going Bald
David Carver
 
Tips & Tricks for Maven Tycho
Tips & Tricks for Maven TychoTips & Tricks for Maven Tycho
Tips & Tricks for Maven Tycho
Gunnar Wagenknecht
 
OSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsOSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating Jenkins
NETWAYS
 
Labri 2021-invited-talk
Labri 2021-invited-talkLabri 2021-invited-talk
Labri 2021-invited-talk
vschiavoni
 
[OSS Upstream Training] 9 kirigami contribution_simulation
[OSS Upstream Training] 9 kirigami contribution_simulation[OSS Upstream Training] 9 kirigami contribution_simulation
[OSS Upstream Training] 9 kirigami contribution_simulation
Vietnam Open Infrastructure User Group
 
Testing fácil con Docker: Gestiona dependencias y unifica entornos
Testing fácil con Docker: Gestiona dependencias y unifica entornosTesting fácil con Docker: Gestiona dependencias y unifica entornos
Testing fácil con Docker: Gestiona dependencias y unifica entornos
Micael Gallego
 
Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014
Maarten Balliauw
 
10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware
William Hart
 
OpenTok_API_Tutorials.pdf
OpenTok_API_Tutorials.pdfOpenTok_API_Tutorials.pdf
OpenTok_API_Tutorials.pdf
Gestio Organització Comunicació S.A.
 
Understanding NuGet implementation for Enterprises
Understanding NuGet implementation for EnterprisesUnderstanding NuGet implementation for Enterprises
Understanding NuGet implementation for Enterprises
J S Jodha
 
OOoEclipse talks now C++
OOoEclipse talks now C++OOoEclipse talks now C++
OOoEclipse talks now C++
Alexandro Colorado
 
Dr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin developmentDr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin development
Ulrich Krause
 
Maven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafeMaven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafe
Holasz Kati
 
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDENantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
Florent BENOIT
 
Making Applications Work Together In Eclipse
Making Applications Work Together In EclipseMaking Applications Work Together In Eclipse
Making Applications Work Together In Eclipse
Kaniska Mandal
 
Testing cloud and kubernetes applications - ElasTest
Testing cloud and kubernetes applications - ElasTestTesting cloud and kubernetes applications - ElasTest
Testing cloud and kubernetes applications - ElasTest
Micael Gallego
 

What's hot (20)

Do's and Do not's about p2
Do's and Do not's about p2Do's and Do not's about p2
Do's and Do not's about p2
 
Using The EGit Eclipse Plugin With Git Hub
Using The EGit Eclipse Plugin With Git HubUsing The EGit Eclipse Plugin With Git Hub
Using The EGit Eclipse Plugin With Git Hub
 
Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development
 
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages HeavenIBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
 
Unit Test Android Without Going Bald
Unit Test Android Without Going BaldUnit Test Android Without Going Bald
Unit Test Android Without Going Bald
 
Tips & Tricks for Maven Tycho
Tips & Tricks for Maven TychoTips & Tricks for Maven Tycho
Tips & Tricks for Maven Tycho
 
OSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsOSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating Jenkins
 
Labri 2021-invited-talk
Labri 2021-invited-talkLabri 2021-invited-talk
Labri 2021-invited-talk
 
[OSS Upstream Training] 9 kirigami contribution_simulation
[OSS Upstream Training] 9 kirigami contribution_simulation[OSS Upstream Training] 9 kirigami contribution_simulation
[OSS Upstream Training] 9 kirigami contribution_simulation
 
Testing fácil con Docker: Gestiona dependencias y unifica entornos
Testing fácil con Docker: Gestiona dependencias y unifica entornosTesting fácil con Docker: Gestiona dependencias y unifica entornos
Testing fácil con Docker: Gestiona dependencias y unifica entornos
 
Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014Using NuGet the way you should - TechDays NL 2014
Using NuGet the way you should - TechDays NL 2014
 
10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware
 
OpenTok_API_Tutorials.pdf
OpenTok_API_Tutorials.pdfOpenTok_API_Tutorials.pdf
OpenTok_API_Tutorials.pdf
 
Understanding NuGet implementation for Enterprises
Understanding NuGet implementation for EnterprisesUnderstanding NuGet implementation for Enterprises
Understanding NuGet implementation for Enterprises
 
OOoEclipse talks now C++
OOoEclipse talks now C++OOoEclipse talks now C++
OOoEclipse talks now C++
 
Dr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin developmentDr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin development
 
Maven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafeMaven Presentation - SureFire vs FailSafe
Maven Presentation - SureFire vs FailSafe
 
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDENantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
 
Making Applications Work Together In Eclipse
Making Applications Work Together In EclipseMaking Applications Work Together In Eclipse
Making Applications Work Together In Eclipse
 
Testing cloud and kubernetes applications - ElasTest
Testing cloud and kubernetes applications - ElasTestTesting cloud and kubernetes applications - ElasTest
Testing cloud and kubernetes applications - ElasTest
 

Viewers also liked

Black and White Dog Photography by Jesse Freidin
Black and White Dog Photography by Jesse FreidinBlack and White Dog Photography by Jesse Freidin
Black and White Dog Photography by Jesse Freidin
jfreidin
 
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
jsievers
 
Agenda #7
Agenda #7Agenda #7
Alltax Portfolio
Alltax PortfolioAlltax Portfolio
Alltax Portfolio
ALLTAX
 
Alltax booklet
Alltax bookletAlltax booklet
Alltax booklet
ALLTAX
 
Presentes temáticos
Presentes temáticosPresentes temáticos
Presentes temáticos
p_queipo
 

Viewers also liked (6)

Black and White Dog Photography by Jesse Freidin
Black and White Dog Photography by Jesse FreidinBlack and White Dog Photography by Jesse Freidin
Black and White Dog Photography by Jesse Freidin
 
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
 
Agenda #7
Agenda #7Agenda #7
Agenda #7
 
Alltax Portfolio
Alltax PortfolioAlltax Portfolio
Alltax Portfolio
 
Alltax booklet
Alltax bookletAlltax booklet
Alltax booklet
 
Presentes temáticos
Presentes temáticosPresentes temáticos
Presentes temáticos
 

Similar to Building Eclipse Plugins with Tycho

Building Eclipse Plugins and RCP applications with Tycho
Building Eclipse Plugins and RCP applications with TychoBuilding Eclipse Plugins and RCP applications with Tycho
Building Eclipse Plugins and RCP applications with Tycho
jsievers
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview
Lars Vogel
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
Mikkel Flindt Heisterberg
 
Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)
Mikkel Flindt Heisterberg
 
Plug yourself in and your app will never be the same (2 hr editon)
Plug yourself in and your app will never be the same (2 hr editon)Plug yourself in and your app will never be the same (2 hr editon)
Plug yourself in and your app will never be the same (2 hr editon)
Mikkel Flindt Heisterberg
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
Pascal Rapicault
 
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDKHow to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
Dominik Renzel
 
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Florent BENOIT
 
Flask
FlaskFlask
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
Sandeep Chawla
 
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and CodenvyeXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXo Platform
 
LVPHP.org
LVPHP.orgLVPHP.org
LVPHP.org
Joshua Copeland
 
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDKHow to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
Dominik Renzel
 
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
Florent BENOIT
 
Odo improving the developer experience on OpenShift - hack &amp; sangria
Odo   improving the developer experience on OpenShift - hack &amp; sangriaOdo   improving the developer experience on OpenShift - hack &amp; sangria
Odo improving the developer experience on OpenShift - hack &amp; sangria
Jorge Morales
 
Sleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your ProductSleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your Product
Subramanyam C
 
Code in the cloud with eclipse che and docker / snowcamp.io 2017
Code in the cloud with eclipse che and docker /  snowcamp.io 2017Code in the cloud with eclipse che and docker /  snowcamp.io 2017
Code in the cloud with eclipse che and docker / snowcamp.io 2017
Florent BENOIT
 
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDevTriple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Werner Keil
 
Extending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesExtending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with Kubernetes
Nicola Ferraro
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 

Similar to Building Eclipse Plugins with Tycho (20)

Building Eclipse Plugins and RCP applications with Tycho
Building Eclipse Plugins and RCP applications with TychoBuilding Eclipse Plugins and RCP applications with Tycho
Building Eclipse Plugins and RCP applications with Tycho
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 
Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)Plug yourself in and your app will never be the same (2 hour edition)
Plug yourself in and your app will never be the same (2 hour edition)
 
Plug yourself in and your app will never be the same (2 hr editon)
Plug yourself in and your app will never be the same (2 hr editon)Plug yourself in and your app will never be the same (2 hr editon)
Plug yourself in and your app will never be the same (2 hr editon)
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDKHow to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
 
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
 
Flask
FlaskFlask
Flask
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and CodenvyeXoer on the grill: eXo Add-ons factory using Docker and Codenvy
eXoer on the grill: eXo Add-ons factory using Docker and Codenvy
 
LVPHP.org
LVPHP.orgLVPHP.org
LVPHP.org
 
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDKHow to Build & Develop Responsive Open Learning Environments with the ROLE SDK
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
 
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
 
Odo improving the developer experience on OpenShift - hack &amp; sangria
Odo   improving the developer experience on OpenShift - hack &amp; sangriaOdo   improving the developer experience on OpenShift - hack &amp; sangria
Odo improving the developer experience on OpenShift - hack &amp; sangria
 
Sleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your ProductSleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your Product
 
Code in the cloud with eclipse che and docker / snowcamp.io 2017
Code in the cloud with eclipse che and docker /  snowcamp.io 2017Code in the cloud with eclipse che and docker /  snowcamp.io 2017
Code in the cloud with eclipse che and docker / snowcamp.io 2017
 
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDevTriple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
 
Extending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesExtending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with Kubernetes
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using Docker
 

Building Eclipse Plugins with Tycho

  • 1. Building Eclipse plugins and RCP applications with Tycho, Nexus & HudsonIgor Fedorenko, SonatypePascal Rapicault, SonatypeJan Sievers, SAP
  • 2. Contents of this sessionPart I: Introduction to Maven TychoWhat is Tycho?What can it do?How does it relate to Maven, p2, PDE?Who is using it?Real-life Build DemoQ&APart II: Hands-on exercises. Learn how to buildPlugins/OSGi bundlesTestsFeaturesp2 repositoriesRCP applications/products
  • 3. What is Tycho?A way to build, test, release and publishEclipse/OSGi artifacts with mavenIt can buildEclipse Plugins/OSGi bundlesExecute tests within the OSGi runtimeFeaturesp2 repositoriesRCP applications a.k.a. Products
  • 4. Who is working on tycho?Tycho started a couple of years ago from the need to have the ability to build eclipse plugins using MavenThe initial work has been started by Tom HuybrechtsSonatype joined the forces shortly after thatNowadays, the main contributors are SAP, Sonatype and Intalio
  • 5. Who is using it?Tycho is used in production by IntalioSAPSonatypeOpen source projects of different size and complexityEGitEclipse Memory AnalyzerRT JettyEquinox p2TigerstripeJBoss Tools
  • 6. How does it relate to maven?Tycho is a set of maven 3 plugins which hooks into the build lifecycle at a low levelAs such, it opens up eclipse/OSGi builds to the rich Maven ecosystem of plugins for code generators, quality analysis tools, code coverage, etc. How is it different from other maven plugins?It introduces support for resolving dependencies against p2 repositoriesIt resolves dependencies based on MANIFEST.MF/feature.xml etc. and tries to reuse other PDE metadata like build.properties („MANIFEST-first“ as opposed to „POM-first“)
  • 7. How does it relate to p2?Tycho produces p2 repositories as part of a buildTycho downloads the dependencies of the entities being built from p2 repositories. By default, Tycho does not resolve its dependencies from Maven repositories because the Maven dependency and repository models can not accommodate the expression of OSGi dependencies like Import-PackageTycho embeds parts of p2 in order to perform the dependency resolution and a few other key operations like publishing
  • 8. How does it relate to PDE?Tycho reuses some of the files that are being used by PDE Build such as MANIFEST.MF, build.properties, feature.xml, site.xml, .product where it makes senseThis allows to reuse PDE UI infrastructure like classpath management, launching capabilities, editors for OSGi manifest, features, product files, target platforms etc.Tycho being a headless build mechanism, it "competes" with PDE build only in the sense that it provides an alternative way to do a headless build of plugins and other eclipse artifacts
  • 9. Where is Tycho?Tycho is an open source project run by SonatypeIt has recently been given to the Eclipse Foundation and is currently incubatingWe are in the process of contributing the code to Eclipse Foundation but it‘s not done yet. Getting Tycho and its dependencies through Eclipse legal process is a lot of workProject homepage http://eclipse.org/tychoCurrently the codebase is still on githubUsers and development mailing lists:tycho-users@lists.sonatype.comBugs filed at https://issues.sonatype.org/browse/TYCHO
  • 13. Part II: Hands-On Exercises
  • 14. Setting up the environmentUnzip theinternet.zipWindowsTo C:clipsecon2011Linux and Mac OSXTo /var/tmp/eclipsecon2011Setup your Maven local repositoryWindows(from home folder) ren .m2 .m2-backupcd .m2copy c:clipsecon2011ettings.xmlLinux and Mac OSXmv ~/.m2 ~/.m2-backup; mkdir ~/.m2cp /var/tmp/eclipsecon2011/settings.xml ~/.m2
  • 15. Setting up the environment (cont’ed)Make sure JAVA_HOME is set; JAVA_HOME/bin is on PATHStart NexusWindowsC:clipsecon2011exusinswindows-x86-32exus.batLinux x86/var/tmp/eclipsecon2011/nexus/bin/jsw/linux-x86-32/nexus startLinux x86_64/var/tmp/eclipsecon2011/nexus/bin/jsw/linux-x86-64/nexus startMac OSX/var/tmp/eclipsecon2011/nexus/bin/jsw/macosx-universal-64/nexus start
  • 16. Setting up the environment (cont’ed)Make sure Nexus has started successfullyIn sonatype-work/nexus/logs/nexus.log...com.sonatype.nexus.pgp.DefaultPGPKeyManager - Creating PGP Key Collection for the first time.org.mortbay.log - Started SelectChannelConnector@0.0.0.0:8081...Access Nexus Web GUI
  • 19. Developer credentials: eclipsecon/eclipseconSetting up the environment (cont’ed)Unzip Eclipse IDE to eclipsecon2011Windows ideclipsecon2011.tycho.tutorial.ide-win32.win32.x86.zipLinux x86ide/eclipsecon2011.tycho.tutorial.ide-linux.gtk.x86.zipLinux x86_64ide/eclipsecon2011.tycho.tutorial.ide-linux.gtk.x86_64.zipMax OSXide/eclipsecon2011.tycho.tutorial.ide-win32.win32.x86.zipStart Eclipse IDE by runningeclipsecon2011/eclipse/eclipse
  • 20. settings.xmlhttp://www.sonatype.com/books/mvnref-book/reference/appendix-settings.html<servers>id: This is the id of the server (not of the user to login as) that matches the <repository/>, <pluginRepository> and <mirror/> element's id.username/password: credentials to access matching repositories, plugin repositories and mirrors.<mirrors>id, name: The unique identifier of this mirror. The id is used to differentiate between mirror elements.url: The base URL of this mirror. The build system will use prepend this URL to connect to a repository rather than the default serverURL.mirrorOfThe id of the server that this is a mirror of. For example, to point to a mirror of the Maven central server (http://repo1.maven.org/maven2), set this element to central. This must not match the mirror id.<repositories>blocks accidental access to Maven Central repository
  • 21. Building an RCP app in 5 step-by-step exercisesBuild a simple RCP pluginBuild and execute a simple testAdd a featureAdd a repositoryAdd a productEach step has a folder with stub content as a starting pointREADME.txt gives detailed step-by-step instructionsThe folder for an exercise is at the same time starting point for the current exercise and solution of the previous one
  • 22. Exercise 1: Create and build a hello world RCP plugin using tychoDetailed instructions in Exercise_01_Create_RCP_Bundle/README.txt
  • 23. Exercise 2: Add a test fragment with a simple JUnit testDetailed instructions in Exercise_02_Add_Test_Fragment/README.txt
  • 24. Exercise 3: Add a featureDetailed instructions in Exercise_03_Add_Feature/README.txt
  • 25. Exercise 4: Add a p2 repositoryDetailed instructions in Exercise_04_Add_P2_Repository/README.txt
  • 26. Exercise 5: Add a productDetailed instructions in Exercise_05_Add_Product /README.txt
  • 27. Thanks for attending this session!
  • 28. Backup SlidesJBoss Tools buildTycho builds on hudson.eclipse.orgVEX build on eclipse.org