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 "WTP Build Process and Procedures"

Line 6: Line 6:
  
 
== [[WTP_Build_Mechanics | Build Mechanics]] ==  
 
== [[WTP_Build_Mechanics | Build Mechanics]] ==  
 +
 +
 +
== [[WTP Release 1.5 Patches | How to create an official patch]] ==
  
  
Line 197: Line 200:
 
###Then near the bottom the "all" target must be updated to run the test target (unless the new one was just included in an existing one).
 
###Then near the bottom the "all" target must be updated to run the test target (unless the new one was just included in an existing one).
  
== How to create an official patch ==
 
 
See [[WTP Release 1.5 Patches]].
 
  
 
== Background and Further Reading References ==
 
== Background and Further Reading References ==

Revision as of 15:51, 17 January 2007

Build Types

Build Schedule

Build Mechanics

How to create an official patch

A Quick Guide to Installing a WTP Build for Testing or as Development Target

WTP developers install WTP builds that are available at committers or downloads areas frequently for testing or using these as plugin development targets. Since each build has its own set of prerequisites, the installation process involves downloading WTP and its prereqs such as emf, gef, jem and eclipse sdk. To simplify this process I have created a scripts that uses the install scripst from the actual releng builder that was used to create a particular build. To use it create simple eclipse project or just copy these scripts into a folder and run "ant -f install.xml get". The script should do all the work for you.

To use these scripts you should have apache ant (v1.6 or better), a JDK (v1.4.2 ro higher), and CVS installed on your machine. They should be on your path.


First file you should create is the build.properties. You modify this file to change the build you want to install or where you want files to be installed etc. You should review these properties before each install:


baseos=win32
basews=win32
basearch=x86

#-------------------------------------------------
# Build Stream are one of R0.7, R1.0, R1.5, R2.0
#-------------------------------------------------
wtp.buildStream=R1.5

#-------------------------------------------------
# Build area is one downloads or committers
#-------------------------------------------------
wtp.buildArea=committers

#-------------------------------------------------
# label of the Build to install
# e.g. M-1.5.1-200607141912
#
# cvstag is a derived label that you must provide
# in order to automtaically access the correct
# maps and wtp builder
# it is "v"+"buildType"+"buildTimeStamp"
# e.g. vM200607141912
#-------------------------------------------------
wtp.buildLabel=M-1.5.1-200607141912
wtp.cvsTag=vM200607141912

#-------------------------------------------------
# This is the home dir for build tasks
#   i.e. downloads folder etc.
#-------------------------------------------------
build.home=C\:/dev/build-home

#-------------------------------------------------
# This is where the deriver will be installed
#   i.e. downloads folder etc.
#-------------------------------------------------
targetDir=${build.home}/drivers

#-------------------------------------------------
# This is the folder under build.home where the
# scripts will look for previosly doenloaded files
#   i.e. downloads folder etc.
#-------------------------------------------------
build.local.repository=downloads


Second file you should create is the ant script for installation, install.xml. You do not need to modify anything in this this file, just change the properties we described before:


<?xml version="1.0"?>
<!-- ====================================================================== 
    Properties that must be passed to this script can be found in 
    build.properties
                                                               
     ====================================================================== -->
<project name="wtp-installer" default="get">



	<property file="build.properties" />
	<property file="./tmp/releng/maps/dependencies.properties" />
	<property name="dependencyTargets" value="./tmp/releng.wtpbuilder/scripts/dependency/build.xml" />
	<property name="local.cache.dir" value="${build.home}/${build.local.repository}" />
	<property name="base.install.dir" value="${targetDir}/${wtp.buildLabel}" />

	<!-- We form these properties dynamically to download the latest build -->
	<property name="wtp.url" value="http://download.eclipse.org/webtools/${wtp.buildArea}/drops/${wtp.buildStream}/${wtp.buildLabel}" />
	<property name="wtp.releng.url" value="http://download.eclipse.org/webtools/downloads/drivers" />
	<property name="wtp.file" value="wtp-sdk-${wtp.buildLabel}.zip" />
	<property name="wtp.name" value="WTP sdk ${wtp.buildLabel}" />
	<property name="wtp.description" value="WTP sdk ${wtp.buildLabel}" />

	<target name="get" depends="releng">
		<delete dir="${base.install.dir}" failonerror="false" />
		<mkdir dir="./tmp" />
		<antcall target="releng" />
		<antcall target="getAndInstall">
			<param name="groupId" value="emf" />
		</antcall>
		<antcall target="getAndInstall">
			<param name="groupId" value="gef" />
		</antcall>
		<antcall target="getAndInstall">
			<param name="groupId" value="jem" />
		</antcall>
		<antcall target="getAndInstall">
			<param name="groupId" value="eclipse" />
		</antcall>
		<antcall target="getAndInstall">
			<param name="groupId" value="wtp" />
		</antcall>

	</target>


	<target name="getAndInstall">
		<ant antfile="${dependencyTargets}" target="checkDependency">
			<property name="groupId" value="${groupId}" />
		</ant>
		<ant antfile="${dependencyTargets}" target="installDependency">
			<property name="groupId" value="${groupId}" />
			<property name="install.destination" value="${base.install.dir}" />
		</ant>
	</target>


	<target name="releng">

		<available file="./tmp/releng/maps/dependencies.properties" property="map.exists" />
		<available file="./tmp/releng.wtpbuilder/scripts/dependency/build.xml" property="releng.exists" />
		<antcall target="checkout-maps" />
		<antcall target="getwtpbuilder" />
	</target>

	<target name="checkout-maps" unless="map.exists">

		<cvs quiet="true" cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools" package="releng/maps/build.cfg" dest="./tmp" tag="${wtp.cvsTag}" />
		<cvs quiet="true" cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools" package="releng/maps/dependencies.properties" dest="./tmp" tag="${wtp.cvsTag}" />

	</target>

	<target name="getwtpbuilder" unless="releng.exists">
		<property file="./tmp/releng/maps/build.cfg" />
		<delete dir="./tmp/releng.wtpbuilder" failonerror="false" />
		<echo message="Version tag for releng.wtpbuilder is: ${wtpBuilderVersion}" />
		<cvs quiet="true" cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools" package="releng.wtpbuilder/scripts/dependency" dest="./tmp" tag="${wtpBuilderVersion}" />

	</target>


</project>


If you are behind a proxy you may need to make a few changes to the install.xml script above. First, you will need to add your proxy settings to each of the cvs tasks. The proxy information is of the form:

pserver;proxy=<host>;proxyport=<port>;proxyuser=<user>;proxypassword=<password>:anonymous@dev.eclipse.org:/home/webtools

So you can adjust the "cvsRoot" attribute of the cvs tags accordingly.

The other thing you may need to do is add a setproxy task to the get recipe. Let's say that your proxy is called "proxy" and its port is 82, then you could add:

<setproxy proxyhost="proxy" proxyport="82"/>

to the "get" target above. See http://ant.apache.org/manual/OptionalTasks/setproxy.html for setproxy options.

How to get a JUnit test project into our builds

  1. NORMAL (nearly) PROJECT CREATION
    1. put in cvs
      directory should be created first, creating a folder in the 'tests' directory of the component.
      then using eclipse wizard to 'share', but don't use default name (that'd create a top level project)
      but instead use the 'browse' function to put in the folder created.
    2. add to appropriate .map file (using the project name, and full cvs name).
      it must be added "by hand" to a map file before it can be released with release tool.
    3. add the project to a features xml file.
      For test plugins, the test plugin should NOT be packed (there are some ant tasks that use file functions).
      And, this means to omit the unpack attribute.
    4. send note to webmaster to have project and its location added to the modules file in CVS
  2. PROJECT test.xml file
    1. copy a test.xml file from another project,
      and edit the 2 or 3 things that are project specific
      1. near the top the plugin name
      2. near the bottom the one, main classname that runs all the tests
      3. the ant target to run (in the element that contains the tests classname) is either
        1. target="core-test" (if there is no UI required), or
        2. target="ui-test" (if there is UI required).
    2. add the test.xml file (using check box in properties editor)
      to the build.properties file so it'll be included in the "bin" build.
  3. WTP test.xml file
    1. there's a test.xml file in wtpBuilder that needs updating. Check two spots.
      1. one is that the target needs to be defined in top part of file or else the plugin included in another existing target, if there is a "family" of tests).
      2. Then near the bottom the "all" target must be updated to run the test target (unless the new one was just included in an existing one).


Background and Further Reading References

We in WTP following the basic process and recommendations for versioning as the base Eclipse platform. Plugin Versioning

Very helpful guide to builds and automatic testing. Build and Test Automation for plug-ins and features

Good step-by-step on how to do updates. How To Keep Up To Date

We base our builds on the Eclipse platform's "basebuilder". Platform-releng

With our WTP specific needs addressed in the WTP project called releng.wtpbuilder. While slightly out of date, see the [attachment] to [bug 108259]

Our basic server configuration and cruise control triggers is handled by the WTP project called releng.builder (see especially the tools/cruise directory in that project).

And ... never forget Eclipse Help ... search for things related to update manager, PDE, features, site.xml, etc.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.