Skip to main content
Jump to: navigation, search

Difference between revisions of "STP Build Using Buckminster"

(Can I use those stuff to prepare a STP workspace for me?)
(Redirecting to STP/Build Component)
 
Line 1: Line 1:
= Introduce =
+
#REDIRECT [[STP/Build_Component]]
The purpose of this document is to supply some information on the new STP build system based on Buckminster. If you only want to use it to build STP plugins, then it needn't any backgrounds of Buckminster at all, otherwise, say extend the build system to add your new plugins to STP build system, then an understanding of Buckminster will be good.
+
 
+
= Use Build System =
+
This section will introduce on how to use the new build system to build STP quickly, here I will show commands based on Linux, building on Window is similar except some different arguments, I will give more detail at the end of this section.
+
 
+
== Prerequisite ==
+
=== Target Platform ===
+
You need setup a target platform first before you building STP, the target platform is just an Eclipse SDK installation plus all the prerequisite plugins needed by STP, e.g. you need install plugins below to '''/shared/eclipse_java/eclipse''' directory:
+
* eclipse-SDK-3.3.1.1-linux-gtk.tar.gz
+
* wtp-sdk-R-2.0.1-20070926042742.zip
+
* GEF-SDK-3.3.1.zip
+
* GMF-sdk-2.0.1.zip
+
* emf-sdo-xsd-SDK-2.3.1.zip
+
* emf-query-SDK-1.1.zip
+
* emf-validation-SDK-1.1.1.zip
+
* emf-transaction-SDK-1.1.1.zip
+
* mdt-ocl-SDK-1.1.1.zip
+
* m2t-jet-SDK-incubation-0.8.1.zip
+
* orbit-R200709171314.zip(Since STP and Orbit under developing, you can get latest Orbit package from http://download.eclipse.org/tools/orbit/committers/ in case can't find some components during build)
+
* jsr_jars-0.7.0
+
 
+
Since STP is under developing, so all the plugins list here will be changed, you can refer STP download page to get the latest information: http://download.eclipse.org/stp/downloads/
+
 
+
To run unit test, you need install Eclipse test framework plugin too:
+
* eclipse-test-framework-3.3.1.1.zip
+
 
+
Again, please make sure you install all those to '''/shared/eclipse_java/eclipse''' directory.
+
 
+
=== JDK Installation ===
+
Install a JDK 1.5 on your build machine, make sure you can access javac and java from command line.
+
 
+
=== Apache Ant ===
+
Install a Apache Ant 1.7.0 on your build machine, make sure you can access ant from command line.
+
 
+
== Build STP ==
+
<pre>
+
1. check out build system from svn
+
$svn co http://dev.eclipse.org/svnroot/stp/trunk/build/buckminster buckminster
+
 
+
2. build STP
+
$cd buckminster
+
$ant                                              #this will show a help message to you
+
$ant -Dbase.directory=/local/temp/download build  #kick off resolving and building for STP
+
</pre>
+
waiting for about 5 minutes, after finishing, you can find build results from
+
'''/local/temp/download/working/build/buckminster/workspace''', it depend
+
on your base.directory setting.
+
 
+
== Test STP ==
+
Not finish, coming soon :)
+
 
+
== Create STP Update Site ==
+
This is straightforward, run command below
+
<pre>
+
$ant -Dbase.directory=/local/temp/download stp.build.site
+
</pre>
+
after finishing, you can find STP update site from '''/local/temp/download/working/build/buckminster/stp.site/org.eclipse.stp.build.root/site''', it depend on your base.directory setting.
+
 
+
== Build on Windows ==
+
1. Prepare a target platform for Windows
+
 
+
2. You need tell the build system where to find the target platform, you need edit the stp.rmap file, in the searchPath for europa, change the url to point to your target platform, e.g. c:\eclipse
+
 
+
3. Run command below
+
<pre>
+
c:\>cd buckminster
+
c:\>ant -Dbase.directory=c:\local\temp\download -Dpde.target.platform.path=c:\eclipse
+
              -Dpde.target.arch=x86 -Dpde.target.os=windows -Dpde.target.ws=win32 build
+
</pre>
+
 
+
Just a quick reminder for the arch, os and ws constants:
+
<pre>
+
    pde.target.arch = x86 | ppc | x86_64 | PA_RISC
+
    pde.target.os = linux | solaris | aix | hpux | macosx
+
    pde.target.ws = win32 | gtk | motif | carbon
+
</pre>
+
So if you are building on linux for example, the (arch, os, ws) triplet would be something like (x86, linux, gtk), or if you are building on MacBook Pro, it will be (x86, macosx, carbon).
+
 
+
= CruiseControl Setup =
+
Setting up CruiseControl for STP build using Buckminster is straightforward, basic steps list below:
+
 
+
1. Guarantee you can build STP follow steps list above(suppose your working copy at /local/stp/trunk)
+
 
+
2. Download Cruisecontrol from http://cruisecontrol.sourceforge.net/ , binary version 2.7.1 is preferred
+
 
+
3. Copy the ready Cruisecontrol config file for STP from /local/stp/trunk/build/buckminster/cruise-config.xml to your Cruisecontrol installation directory
+
 
+
4. Edit properties in cruise-config.xml to config your arguments
+
 
+
3. Start CruiseControl like:
+
<pre>
+
$cd cruisecontrol-bin-2.7.1
+
$./cruisecontrol.sh -configfile ./cruise-config.xml
+
</pre>
+
4. See results at: http://localhost:8080/cruisecontrol/buildresults/stp
+
 
+
5. Monitor build process at: http://localhost:8080/dashboard/dashboard
+
 
+
= Extend Build System =
+
== Get Familiar with Buckminster ==
+
1. Buckminster project: http://www.eclipse.org/buckminster/index.php
+
 
+
2. A good start tutorial: http://wiki.eclipse.org/Hello_XML_World_Example_%28Buckminster%29
+
 
+
3. Useful documents: http://wiki.eclipse.org/index.php/Buckminster
+
 
+
== How to Add New Plugin ==
+
Suppose you have a new plugin to add to STP build system, you should do things below:
+
 
+
1. You should guarantee it works fine inside Eclipse
+
 
+
2. You must add it to a feature, the build system does support add a plugin, but it's not a good practise
+
 
+
3. Edit buckminster.cspc file which defined in <buckminster>/org.eclipse.stp.build.root to add your feature, please read the comments in buckminter.cspec carefully, you need add that feature in three places, i.e. dependencies, bundle.jars and soa.development.category, the latter two are for update site, if you only want to build then add feature dependencies is enough
+
 
+
4. kick off building
+
 
+
5. Edit stp.rmap as needed if Buckminster can't resolve your new plugin
+
 
+
= FAQ =
+
== Can I use other directory instead of /shared/eclipse_java/eclipse? ==
+
 
+
Yes, you can, but you need edit stp.rmap to point to your new target platform location and when you kick off building using -Dpde.target.platform.path=<your new location>
+
 
+
== Can I get more debug information when error occurs? ==
+
 
+
When kick off building add properties -Dbuckminster.log.level=DEBUG
+
 
+
== Can you tell me the organization of this build system? ==
+
 
+
The important components for the new build system are
+
<pre>
+
* build.properties                  # define all kinds of properties
+
* build.xml                          # the Ant build file
+
* org.eclipse.stp.build.root        # the virtual component for STP build
+
* buckminster.cspec                  # Buckminster cspec file
+
* stp.cquery                        # the entry point for Buckminster
+
* stp.rmap                          # the resource map for STP
+
</pre>
+
 
+
== Can I use those stuff to prepare a STP workspace for me? ==
+
 
+
Yes, you can, you need prepare a Eclipse SDK which you used to develop STP and install Buckminster from [http://www.eclipse.org/buckminster/downloads.html Buckminster Downloads], then you go "File -> Open a Component Query", input http://dev.eclipse.org/svnroot/stp/trunk/build/buckminster/stp.cquery, and you can materialize STP now
+

Latest revision as of 18:20, 24 March 2009

Back to the top