Upload
mickael-istria
View
3.150
Download
1
Embed Size (px)
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.
Citation preview
A journey withTarget Platforms
Mickael Istria @mickaelistriaEclipseCon Europe 2012Licensed under CC-BY 3.0
“Which dependencies are available?”
Target Platforms...
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
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
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
Edit Target Platforms
From Preferences
Edit Target Platforms
With Target Editor
Edit Target Platforms as XML
Include Sources in IDE
But not in Tycho ;)
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]
Use TP in IDE
OR
Use TP in a Maven build
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
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
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
Share TP: on SCM
Share TP: “mvn deploy” it
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
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
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?
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
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
Questions?Discussions?
Debates?
Mickael Istria @mickaelistriaEclipseCon Europe 2012Licensed under CC-BY 3.0