From Eclipsepedia

< STP‎ | Build
Jump to: navigation, search


Step One: Construct the Platform

We use the word platform to indicate all of the dependencies of the project, gathered together and unzipped into the same directory. This is really just an Eclipse installation, just like the one that you will most likely have on your local disk. So, there's a good chance that the Eclipse installation you already have will do the trick, but if you want to use the exact versions that STP builds against, here are the details.

3.5 Stream Platform

3.4.x Stream Platform

Download all of the required pieces of the platform and expand them onto your disk. The location where you unzip them, with the /eclipse directory appended, will be your platform directory. The platform bills of materials above should give you everything you need to build any of the STP sub-projects and components. You can get away with less if you only want to build one of the STP sub-projects.

For the rest of this page, when you see ${platform}, it means your platform directory.

Step Two: Install Buckminster Builder

Unlike the platform, which may change, the Buckminster builder need only be constructed once, unless there are bugs or incompatibilities. TBD

Step Three: Check Out Your Project

Check out the project that you are going to build. Most of the components and sub-projects in STP are independent, but there are some that have dependencies on others. The one to watch out for is the Intermediate Model - it has dependencies on the BPMN Modeler and SCA Tools, to pick up the models that are used in both of those sub-projects.

Here's an example. I'm going to check out the SCA Tools sub-project and build it. This example uses command-line SVN tools, but you can also of course use integrated tools like Tortoise to do your check-out.

svn co sca-tools

That check-out command will put the trunk into a directory called sca-tools in the current directory.

Step Four: Build Your Project

Next, we will run the build using ant. This is the most low-level way of running the build - individual projects can simplify the build run by making other scripts that drive the ant scripts, e.g. Antoine has constructed a Ruby wrapper for building the BPMN Modeler.

You will need ant 1.7.1. Macros created in the buckminster.xml script make essential use of the makeurl task, and this task was introduced in 1.7.1. If you receive an error message noting that this task is missing, you will know that you are running the wrong version of ant. To check beforehand, just type ant -version.

cd sca-tools/build/buckminster

ant`pwd`/myBuild -Dproject.source=`pwd`/../..${platform} build

That's it. If all goes to plan, then the end result of the build will be an archived update site on your local machine. The log from the build will tell you the location of the zip file that has resulted. There's a couple of things I should explain, specifically the -Ds on that ant incantation.`pwd`/myBuild instructs the build to do all its work in a new myBuild directory in the current directory. This must be an absolute path, or the build will fail.

-Dproject.source=`pwd`/../.. tells the build where you have checked out the source code - in this case its a couple of directories back up the tree, the sca-tools directory that we used in the svn co in Step One. That's how the build will find your source code. If you get this wrong, the build will carry on and try to check the code out of subversion instead. This can be considerably slower than just fetching from disk.${platform} tells the build where if can find the right Eclipse installation, with all of the plugins that the project needs to build. You made that installation in Step One, where we hinted to you that the ${platform} usage in this property definition should be replaced by your actual platform directory.

Items of Note

  • You will need to be online to run the build the first time, as it will download materials from the Buckminster and Cloudsmith update sites.
  • Subsequent builds will re-use the downloaded materials unless you do a full clean. To do a clean without hosing your downloads, use the incantation ant`pwd`/myBuild clean.workspace.
  • For some reason as yet unknown, this build doesn't work right on Macs. I think it's something to do with the way the JVM is laid out. See bug 258201.