Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "STP/Build/BuildOnMyMachine"

< STP‎ | Build
Line 2: Line 2:
  
 
|-valign="top"  
 
|-valign="top"  
|style="width:50%;"|
+
|style="width:100%;"|
 
<h1>Step One: Construct the Platform</h1>
 
<h1>Step One: Construct the Platform</h1>
 
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.
 
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.
Line 35: Line 35:
 
|}
 
|}
  
Download all of the required pieces of the platform and expand them onto your disk. The location 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.
+
Download all of the required pieces of the platform and expand them onto your disk. The location where you unzip them, with the <tt>/eclipse</tt> 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 <span style="color: red;"><tt>${platform}</tt></span>, it means your ''platform directory''.  
 
|}
 
|}
 +
 +
{| border="0" cellspacing="15" valign="top" style="width:100%;"
 +
 +
|-valign="top"
 +
|style="width:100%;"|
 +
<h1>Step Two: Check Out Your Project</h1>
 +
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 [[STP/IM_Component|Intermediate Model]] - it has dependencies on the [[STP/BPMN_Component|BPMN Modeler]] and [[STP/SCA_Component|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 [[STP/SCA_Component|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.
 +
 +
<tt>svn co http://dev.eclipse.org/svnroot/stp/org.eclipse.stp.sca-tools/org.eclipse.stp.sca/trunk sca-tools</tt>
 +
 +
That check-out command will put the trunk into a directory called <tt>sca-tools</tt> in the current directory.
 +
 +
Next, we will run the build using <tt>ant</tt>. 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 <tt>ant</tt> scripts, e.g. Antoine has constructed a [http://dev.eclipse.org/svnroot/stp/org.eclipse.stp.bpmn-modeler/org.eclipse.stp.bpmn/trunk/build/build Ruby wrapper] for building the [[STP/BPMN_Component|BPMN Modeler]].
 +
 +
<span style="color: red">You will need <tt>ant</tt> 1.7.1</span>. Macros created in the <tt>buckminster.xml</tt> script make essential use of the <tt>makeurl</tt> 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 <tt>ant</tt>. To check beforehand, just type <tt>ant -version</tt>.
 +
 +
<tt>cd sca-tools/build/buckminster</tt>
 +
 +
<tt>ant -Dbase.directory=`pwd`/myBuild -Dproject.source=`pwd`/../.. -Dpde.target.platform.path=${platform} build build.site</tt>
 +
 +
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 <tt>-D</tt>s on that <tt>ant</tt> incantation.
 +
 +
<tt><b>-Dbase.directory=`pwd`/myBuild</b></tt> instructs the build to do all its work in a new <tt>myBuild</tt> directory in the current directory. This <span style="color: red;"><b>must be an absolute path</b></span>, or the build will fail.
 +
 +
<tt><b>-Dproject.source=`pwd`/../..</b></tt> tells the build where you have checked out the source code - in this case its a couple of directories back up the tree, the <tt>sca-tools</tt> directory that we used in the <tt>svn co</tt> 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.
 +
 +
<tt><b>-Dpde.target.platform.path=${platform}</b></tt> 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 <tt>${platform}</tt> usage in this property definition should be replaced by ''your actual platform directory''.

Revision as of 19:07, 9 December 2008

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: 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 http://dev.eclipse.org/svnroot/stp/org.eclipse.stp.sca-tools/org.eclipse.stp.sca/trunk sca-tools

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

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 -Dbase.directory=`pwd`/myBuild -Dproject.source=`pwd`/../.. -Dpde.target.platform.path=${platform} build build.site

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.

-Dbase.directory=`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.

-Dpde.target.platform.path=${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.

Back to the top