469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

15
1 © 2009 by Motorola Inc; made available under the EPL v1.0 | March 24th, 2009 Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study Christian Kurzke Gladyston Franca Gustavo de Paula

description

EclipseCon 2009 presentation

Transcript of 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Page 1: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

1

© 2009 by Motorola Inc; made available under the EPL v1.0 | March 24th, 2009

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study

Christian Kurzke

Gladyston Franca

Gustavo de Paula

Page 2: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

2

JavaME Tools High Level ArchitectureLogical View

• 2 Eclipse products SDK Studio

• There are 8 sub-systems Each sub-system is

organized as an Eclipse feature

• Approximately 60 plug-ins for all features

80% are shared between both products

• 3 of the sub-systems have non plug-in data

Emulator Demos Documentation

Page 3: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

3

Eclipse Base JavaME Tools History…

• Sep. 2007 Release 1.0 based on Europa (Installer)• Dec. 2007 Release 1.1 (Update)• Feb. 2008 Release 1.2 (Update)• Apr. 2008 Release 1.3 (Installer / Update)• Oct. 2008 Release 2.0 based on Ganymede

(Installer)• Dec. 2008 Release 2.1 (update)

Page 4: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

4

Europa Build Solution – Build Levels

Installer Studio

Standalone

devicedocs

toolsdocs

demos

emulator

services

tools

util

Features & pluginsProductInstaller & Upd site. Non-eclipse

emulator

devicedocs

toolsdocs

demos

Level 3Level 2Level 1 Level 4

Update Site

Page 5: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

5

Main Issues in Europa Based Solution

• Hard to setup update site Two products, but the almost the same content

• Complex user experience on the update process User complains during update releases

Page 6: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

6

“Standard” Ganymede Product Build System

Sourcecode

Repository Product InstallerPDE Build

+

Metadata

configurati

on

P2 director Install

jammer

binary/

features/

plugins/

Content.xml

Artifacts.xml

• PDE Build• P2 Metadata generator• P2 Director• Install Jammer

Page 7: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

7

Build Issues in our Scenario

Sourcecode

Repository Product InstallerPDE Build

+

Metadata

configurati

on

P2 director Install

jammer

• Content.x

ml is not

ready to be

used• How to

handle

non-plugin

data

• RCP cannot

be

executed• There were

no update

repositorie

s

Page 8: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

8

From Europa to Ganymede in 5 steps

1. Setup the default ganymede build environment

2. Organize your features

3. Install handlers

4. Non-plugin data

5. Setup your own repository

Page 9: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

9

Step 1: Setup build environment

• A lot of documentation already available• Create build files to execute main tasks

PDE build P2 Metadata generator P2 director Install jammer

• Add a pre and post build tasks

Page 10: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

10

Step 2: Organize your features

• Use the concept of wrapping feature Single IU is installed Includes all other dependencies

• Improved user experience

Studio Umbrella

Platform

Product

Studio

Feature

JDT MTJ

Emulator Tooldocs Util

Page 11: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

11

Step 3: Install handlers

• MoJa Europa install handler only unzipped and change permissions of some files

This can be handled by P2 native touchpoint actions

• Package non-plugin data as p2 binary files

Step 4: Non-plugin data

• Create the concept of a “binary project”

• Binary pre-build process

• Change P2 metadata generator to generate metadata or our “binary projects”

Page 12: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

12

Step 5: setup your repository

• Added a post build tool Change the content.xml

Add category to it Set as visible only the IU that we want to be visible

Add repositories do RCPs Add a pre-defined config.ini file

Page 13: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

13

Ganymede Build Solution

MoJa Non-plugindata

MoJa Non-plugin dataFeatures / Binaries

MoJa Features / Plugins

MoJa RepositoryMoJa Wrapping

CodeMoJa Wrapping

Repository

P2-enabledMoJa

Installer

MOJA Binary

BuildPDE Build

MOJA Customized

Metadata Generator

PDE Build

+

Metadata

Generation

P2 Director

Install Jammer

MoJa UmbrellaRepository

MoJaRepository

MOJA

Content

Editor

MOJA Content

Editor

Page 14: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

14

Conclusions

• P2 solved the problems that we had with our Europa update solution, but…

• It brings new problems

• The effort worth since we learned a lot about P2... P2 is the future and it is better to the end user

• Find a way to contribute back our changes to avoid forking the code

Page 15: 469-Porting the build system of a commercial RCP Application from Europa to Ganymede A Case Study

Porting the build system of a commercial RCP Application from Europa to Ganymede: A Case Study| © 2008 by Motorola Inc.; made available under the EPL v1.0

15

Thanks!