Building a p2 update site using BuckminsterPresentation Transcript
Buckminster Building it all with Buckminster and p2 Eclipse Con, March 2009 Henrik Lindberg, Cloudsmith Inc
Overview of Buckminster
Show how easy it is to use Buckminster to materialize and build an Eclipse RCP application in the IDE, and Headless.
AT A GLANCE
Materializes components to a location (e.g. workspace)
Produces new artifacts inside or outside of the workspace (i.e. ‘build’)
When working on A, components B and C are also needed, and they need D, and E, and …
Buckminster materializes all pre-requisite components
Can take action into account – dependency followed only when needed.
A B C D E F G H
WHERE DOES BUCKMINSTER GET COMPONENTS? RMAP B F G A H C D E
WHERE DOES BUCKMINSTER MATERIALIZE COMPONENTS? using p2 in 3.5 – UM in earlier B F G A H C D E workspace “ eclipse” target pl. file system
Give me A. HOW DO YOU TELL BUCKMINSTER WHAT YOU WANT? Component QUERY
AT BUCKY BURGER Give me A. ok
BUCKY DELICATESSEN source or binary? mutable or not? for here or for to go? we are out of binaries – do you want the source instead ? Give me A, hold the mayo! override that broken provolone 2.0 ? 日本語 , or English ?
Give me A. TO SUMMARIZE … B F G A H C D E
COMPONENT – WHAT IS IT?
A “Component Reader” gets existing meta data from component and translates it “on the fly” to a Component Specification (CSPEC)
If meta data does not exist – author the CSPEC
No roundtrip engineering!
Everything is maintained in the original format (which is needed for other purposes).
requires contains provides includes actions, build requires actions, source binary meta data source documentation
META DATA UNDERSTOOD BY BUCKMINSTER The meta data translation can be decorated/extended with the use of a Component Specification Extension (CSPEX) B A C D E
ORGANIZING THE MAPS PB-MAP RMAP B F G A H C D E RMAP RMAP
ROUTING B F G A H C D E
DEPENDENCIES AND VERSIONS
Describes; if a component is needed which version (or range of versions) is acceptable
Uses “OmniVersion” – a pattern based version descriptor (contributed to p2).
1.0 [1.0.0,2.0.0) A B C D E F G H
A “universal” canonical format
Backwards compatible with Buckminster < 3.5 – the version-type simply selects a preconfigured version format.
OSGi is the default, all other formats must be specified with a predefined or stated format/pattern.
Learn more at http://wiki.eclipse.org/Equinox/p2/Omni_Version
Attributes are static or computed (the result of actions)
A compile B lib headers
ATTRIBUTES & ACTIONS
Action attributes produce artifacts
A compile B lib headers <<private>> makeLib
BUILT IN ACTIONS
Buckminster includes a set of actions immediately available for bundles, features and products.
builds all binaries
builds all source features/bundles
(steps available as separate actions too)
Build update site
compiled, signed, pack-200 processed, and packaged as a p2 update site!
Build complete product
complete build to p2 update site
LOOK MA, NO HEAD !
Makes interactive and headless builds the same !
Runs exactly the same builders the same way
No need to maintain an extra set of build actions
Build me A product BUCKMINSTER IN ONE SLIDE Thank you! B F G A H C D E
Demo Build the “RCP mailapp” with support for p2 self management Tutorial projects ( org.eclipse.buckminster.tutorial.*) are found in Buckminster SVN repository: http://dev.eclipse.org/svnroot/tools/org.eclipse.buckminster/trunk
Demo Projects Overview projects: org.eclipse.buckminster.tutorial... The “mailapp” example RCP app - but .product broken out Contains .product – refers only to this feature. Feature includes mailapp, and rcpp2.feature and everything required. Contains everything needed to make mailapp p2 self managed. A feature containing queries and definitions for Common Build Infrastructure CBI. .product mailapp product.feature rcpp2.feature releng