Building B2J from CVS
Author: Antony Miguel, Last Updated 18th July 2006
If you found this tutorial useful or lacking in any way or if you think there are certain areas which could be better explained or more fully explained please Let Me Know.
Overview
- This document describes how to build B2J from source and how to create deployable plugins for B2J and create a distributable copy of the B2J reference runtime.
- It is assumed the reader has some familiarity with Eclipse and basic familiarity with the Java perspective.
Getting the code
-
To get the B2J source code you should first switch to the CVS Exploring perspective.
Add a new CVS repsository with the following details:
- Anonymous username and password
- Host: dev.eclipse.org
- Repository Path: /cvsroot/stp
- HEAD
- org.eclipse.stp.b2j
- org.eclipse.stp.b2j.core
- org.eclipse.stp.b2j.ui
Exporting B2J to Deployable Plugins
-
After switching to the Java perspective, Eclipse should automatically compile the plugins and
you should see no errors.
When the plugins are compiled without errors, you can export them as deployable plugins.
Right click on the org.eclipse.stp.b2j.core plugin and select 'Export...'. Select
'Deployable Plug-ins
and Fragments'. A subsequent page should appear with a variety of options. Ensure that only the plugin
org.eclipse.stp.b2j.core is selected and ensure that 'Package plug-ins as individual JAR files' is NOT
checked (this may be under an Options tab in Eclipse 3.2 onwards). When you are ready select an output folder or an Eclipse install to place the plugins in and
click 'Finish'.
The plugin org.eclipse.stp.b2j.core should be deployed into the folder or JAR file you specified as a
plugin folder rather than a plugin JAR file.
When you have exported the core plugin select the remaining B2J plugin(s) (currenty just org.eclipse.stp.b2j.ui) and follow the process again,
this time with 'Package plug-ins as individual JAR files' checked.
When you have completed this step you should have a set of deployable B2J plugins that you can copy
into the 'plugins' directory of any Eclipse install. Please note that Eclipse will only pick up
the plugins upon start or restart.
If the deployment has worked correctly the org.eclipse.stp.b2j.core plugin will be a folder and the
remaining plugins will be JAR files.
Creating a Runtime Only Distribution
-
The B2J core plugin consists of the B2J BPEL to Java translator and the B2J reference engine. Should
you require it, it is possible to deploy a significantly smaller version of the B2J core plugin containing
only the B2J reference engine.
If you wish to deploy a smaller version of the B2J core plugin in order to place on hosts which will only
run the B2J engine, you should first follow all the steps described above to deploy the B2J core plugin fully.
Once you have a deployed org.eclipse.stp.b2j.core plugin, look in your original Eclipse workspace under
the org.eclipse.stp.b2j.core plugin folder. You should see a file called 'build.xml'. Right-click on this
file and select 'Run As...' -> 'Ant Build...'. A window will pop up where you can select which type of JAR
you wish to generate. Deselect the 'b2j_full' target and select the 'b2j_runtimeOnly' target. Then click Run.
The Ant build will run and display output in the Eclipse console. If the build is successful the file 'b2j.jar'
will be generated in your plugin directory (refresh the plugin folder to see it). You should then copy
this b2j.jar file from your Eclipse workspace into the deployed org.eclipse.stp.b2j.core plugin (overwriting the
existing larger b2j.jar file).
Once you have completed this step the deployed org.eclipse.stp.b2j.core plugin folder can be placed on any host
machines and can be used to run the B2J distributed engine daemon.
