Wednesday, October 21, 2009

Section 24.1.  What Is PDE Build?










24.1. What Is PDE Build?


At its heart, PDE Build is an Ant script generator. It takes in a collection of plug-ins and features, their manifests and build.properties files, and generates a set of Ant build scripts. These scripts are run to produce a build. The export operations you have been doing throughout this book use PDE Build under the covers.


PDE Build is quite flexible. It can consume hybrid mixes of plug-ins and features that are pre-built and those that remain to be built. Some may be included in the final output, while others may not. The output of a build can also vary from plug-ins in directories to update sites and Zip archives of JAR'd and signed plug-ins and features.


The build mechanism builds plug-ins and features, or cascades of the transitively included features and plug-ins starting at a root feature. Cross-platform building is also supported.


The main benefit of PDE Build is that it brings all this together into one relatively simple process. Developers express their normal runtime dependencies in manifest files and a mapping from development time structure to runtime structure in the feature and plug-in build.properties files. PDE Build does the rest.


Key to this process is the automatic generation of the build scripts. Using the input manifests and build.properties, PDE generates Ant scripts that copy identified files and compile identified code using a classpath derived by effectively flattening the plug-in dependency graph. The runtime classpath for a plug-in is defined as a complex graph of plug-in dependencies as described in its manifest file. The classes referenced at runtime are also needed at compile-time, so the compile-time classpath is similarly complex. PDE Build uses the Runtime's plug-in resolution and wiring mechanisms to derive the classpath for each plug-in being built.


As we mentioned above, you have already been using PDE Build if you followed along with the feature- or product-exporting examples. When you use these actions, you are under the covers, running PDE Build. The rest of this chapter explores the use of PDE Build in a release engineering setting, where reproducibility and automation are key concerns.












No comments:

Post a Comment