a journey with target platforms
DESCRIPTION
Slides from EclipseCon Europe 2012 session "A journey with Target Platforms". This presentation contains some tips on tricks on how to leverage Eclipse target platforms at development time and build time, based n experiences from JBoss Tools team.TRANSCRIPT
![Page 1: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/1.jpg)
A journey withTarget Platforms
Mickael Istria @mickaelistriaEclipseCon Europe 2012Licensed under CC-BY 3.0
![Page 2: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/2.jpg)
“Which dependencies are available?”
Target Platforms...
![Page 3: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/3.jpg)
Before Target-Platforms
PDE
EGit
MylynJBoss Tools 4.0
Eclipse Core 4.2
GMF Tooling
IDE
Depends onDoes NOT depend on
Depends on ANOTHER VERSION
PDE allows you to add dependency to any bundle from IDE
Default TP
Bundle B
Feature F
Workspace
![Page 4: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/4.jpg)
Default Target-Platforms
PDE
EGit
MylynJBoss Tools 4.0
Eclipse Core 4.2
GMF Tooling
IDE
Depends onDoes NOT depend on
Depends on ANOTHER VERSION
PDE allows you to add dependency to any bundle from IDE
Default TP
Bundle B
Feature F
Workspace
![Page 5: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/5.jpg)
Target-platforms
p2 Repo Ap2 Repo A● Bundle B1 (1.0.0)● Bundle B2 (1.0.0)● Feature F1 (1.0.0)
p2 Repo Bp2 Repo B● Bundle B1 (1.3.0)● Bundle B3 (1.0.0)● Feature F1 (1.3.0)
Local Filesystem● Bundle B3 (1.0.0)● Bundle B4 (5.1.201)
Specify available dependencies in PDE Workspace or Maven Reactor.
Local Filesystem● Feature F1 (1.2.0)● Feature F3 (1.0.0)● Feature F4 (5.1.201)
Local Filesystem● RCP app (“installation”)
● plugins/*
My dependencies set:a .target file
![Page 6: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/6.jpg)
Edit Target Platforms
From Preferences
![Page 7: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/7.jpg)
Edit Target Platforms
With Target Editor
![Page 8: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/8.jpg)
Edit Target Platforms as XML
![Page 9: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/9.jpg)
Include Sources in IDE
But not in Tycho ;)
![Page 10: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/10.jpg)
Planner vs Slicer
Planner tries to get dependencies – and fails when it can't. [~p2 director]Slicer just takes what you want it to take. [~p2 mirror]
![Page 11: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/11.jpg)
Use TP in IDE
OR
![Page 12: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/12.jpg)
Use TP in a Maven build
![Page 13: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/13.jpg)
Separate Tools and Dependencies
PDE
EGit
MylynJBoss Tools 4.0
Eclipse Core 4.2
GMF Tooling
IDE
Bundle B
Feature F
Workspace
JBoss Tools 3.3 repo
Eclipse Indigo repo● Eclipse Core 3.7
EGit repo
Managed TP
![Page 14: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/14.jpg)
Target for compatibility: Example
● JBoss Tools– 1 target for “minimal dependencies” ensures we can
build and run against our minimal requirements
– 1 target for “recommended dependencies” ensures we can build and run against latest versions of deps
● JBoss Developer Studio (install into Eclipse)– 1 target for “minimal”
– 1 target for “recommended”
● JBoss Developer Studio (RCP)– Uses “recommended” for product build
Same one
![Page 15: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/15.jpg)
Develop for an “old” product
PDE
EGit
MylynJBoss Tools 4.0
Eclipse Core 4.2
GMF Tooling
IDE
Managed TP
Bundle A(1.1.0)
Workspace
Without loading all code as projects in your workspace
Bundle C
Older RCP app● Bundle A (1.0.0)● Bundle B● Feature F
IDE only!Does not work with Tycho
![Page 16: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/16.jpg)
Share TP: on SCM
![Page 17: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/17.jpg)
Share TP: “mvn deploy” it
![Page 18: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/18.jpg)
Performances: aggregate
repoA repoB
repoC
repoDrepoE
aggregatedmultiple
Aggregated repo
● Create a new site + a new .target file
● 2 Maven Mojos available– “Flatten” platform (multiple to aggregated)
org.jboss.tools.tycho-plugins:repository-utils:0.0.1-SNAPSHOT:flattern-target
– TP to p2 repoorg.jboss.tools.tycho-plugins:repository-utils:0.0.1-SNAPSHOT:mirror-target-to-repo
![Page 19: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/19.jpg)
Performances: mirrors
remote piiiiiiiiiiiiiiiiiiiiiiiiiiiiiiing Remote repo
remote
+
Mirror defintionIn settings.xml
Local mirror repoping
http://wiki.eclipse.org/Tycho/Target_Platform/Authentication_and_Mirrors#Mirrors
![Page 20: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/20.jpg)
Missing concept: project-specific TP
● PDE only allows 1 TP for the whole workspace– Finer grain would be convenient
– https://bugs.eclipse.org/bugs/show_bug.cgi?id=159072
● Tycho already supports “project-specific” TP.– Could PDE rely on m2e and Tycho to use TP specified in
project pom?
![Page 21: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/21.jpg)
Missing concept: “compound” TP
Compose, use multiple or reference target-platforms– 1 .target for general deps (Eclipse.org, GWT...)
– Each project adds its specific extra deps
– Not supported in PDE nor Tycho● https://bugs.eclipse.org/bugs/show_bug.cgi?id=392652
● https://bugs.eclipse.org/bugs/show_bug.cgi?id=380120
– Maven plugin to merge targets● https://github.com/jbosstools/jbosstools-maven-plugins
![Page 22: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/22.jpg)
Related (?) topics
● Most p2 repo are not sustainable– https://bugs.eclipse.org/bugs/show_bug.cgi?id=331385
– Mirror and manage them locally
● Still no link between Eclipse/p2/Tycho and SpringSource EBR– Would be useful to allow EBR bundles in a TP
– https://issuetracker.springsource.com/browse/EBR-868
![Page 23: A journey with Target Platforms](https://reader036.vdocuments.us/reader036/viewer/2022081404/5591985e1a28abcc668b4724/html5/thumbnails/23.jpg)
Questions?Discussions?
Debates?
Mickael Istria @mickaelistriaEclipseCon Europe 2012Licensed under CC-BY 3.0