Common Build Infrastructure/Getting Started/FAQ
Contents
- 1 What files do I need to run an Athena build?
- 2 My build complains it can't find java.lang.Object. Seriously, WTF?
- 3 My build fails with a failure in getDependenciesHelper.xml and a Java returned: 13
- 4 What are buildExtra.xml and testExtra.xml for?
- 5 My build fails in the packageTestFramework step. Why?
- 6 ${org.eclipse.test} not found? PackageTestFramework step fails w/ Java exit code 13?
- 7 Do I still need a test.xml in each of my test plugins?
- 8 How do I build source features / plugins?
- 9 What information do I need to provide to get a new job added to Hudson?
- 10 How do I create Team Project Sets as part of the build?
- 11 When I check out org.eclipse.releng.basebuilder, it doesn't compile.
- 12 My build used to work but now headless UI tests are broken!
- 13 The lastSuccess symbolic link disappeared on the file system! How do I access my lastSuccessful build.
- 14 How do I publish my builds from Hudson to download.eclipse.org?
- 15 How do I contribute to Helios?
What files do I need to run an Athena build?
In some folder, traditionally called org.eclipse.myproject/releng or org.eclipse.myproject.releng (but really, it can be anything), you need these files:
maps/*.map -- what to build (where to get sources) : can be CVS, SVN, or HTTP (eg., Orbit jars)
build.properties -- how to build
testing.properties -- what tests to run
build.xml -- boilerplate script for running the build in Eclipse, via commandline, or in Hudson
I also recommend having a .launch file which produces a log of your in-Eclipse build attempts so that when that log scrolls off the Console view, you can see what happened in the file.
And, if you want to make it easier for others to get your source, you can include psfs/*.psf files. Better, use build.steps=map2psf
in your build.properties
to generate .psfs from your map files.
My build complains it can't find java.lang.Object. Seriously, WTF?
First, make sure EVERY plugin you're building has a Bundle-RequiredExecutionEnvironment
defined. If not, PDE will thing you're trying to build Java 1.2 or 1.3 code, and your Java 5 annotations will fail to compile.
Next, in your .releng project's build.properties
file, make sure you've set JAVA_HOME
to a valid path, as well as setting a valid path for every Bundle-RequiredExecutionEnvironment
("BREE") defined in your plugins' MANIFEST.MF files. If all your code is set to BREE 1.4, you only need a JAVA14_HOME; if you have a mix, include all that you use, such as JAVA50_HOME or JAVA60_HOME.
Here are the default values for these server.properties:
JAVA60_HOME=/opt/public/common/ibm-java-jdk-ppc-60 JAVA50_64_HOME=/opt/public/common/ibm-java2-ppc64-50 JAVA50_HOME=/opt/public/common/ibm-java2-ppc-50 JAVA14_HOME=/opt/public/common/ibm-java2-142 JAVA_HOME=${JAVA50_HOME}
JavaSE-1.6=${JAVA60_HOME}/jre/lib/rt.jar:${JAVA60_HOME}/jre/lib/annotation.jar:${JAVA60_HOME}/jre/lib/beans.jar:${JAVA60_HOME}/jre/lib/ibmorbapi.jar:${JAVA60_HOME}/jre/lib/java.util.jar:${JAVA60_HOME}/jre/lib/jlm.jar:${JAVA60_HOME}/jre/lib/logging.jar:${JAVA60_HOME}/jre/lib/resources.jar:${JAVA60_HOME}/jre/lib/rt.jar:${JAVA60_HOME}/jre/lib/security.jar:${JAVA60_HOME}/jre/lib/sql.jar:${JAVA60_HOME}/jre/lib/vm.jar:${JAVA60_HOME}/jre/lib/xmldsigfw.jar:${JAVA60_HOME}/jre/lib/xml.jar:${JAVA60_HOME}/jre/lib/jsse.jar:${JAVA60_HOME}/lib/dt.jar:${JAVA60_HOME}/../Classes/dt.jar:${JAVA60_HOME}/../Classes/classes.jar:${JAVA60_HOME}/../Classes/jsse.jar J2SE-1.5=${JAVA50_HOME}/jre/lib/rt.jar:${JAVA50_HOME}/jre/lib/vm.jar:${JAVA50_HOME}/jre/lib/core.jar:${JAVA50_HOME}/jre/lib/xml.jar:${JAVA50_HOME}/jre/lib/graphics.jar:${JAVA50_HOME}/jre/lib/server.jar:${JAVA50_HOME}/jre/lib/ibmorbapi.jar:${JAVA50_HOME}/jre/lib/security.jar:${JAVA50_HOME}/jre/lib/classes.jar:${JAVA50_HOME}/jre/lib/jsse.jar:${JAVA50_HOME}/../Classes/dt.jar:${JAVA50_HOME}/../Classes/classes.jar:${JAVA50_HOME}/../Classes/jsse.jar J2SE-1.4=${JAVA14_HOME}/lib/rt.jar:${JAVA14_HOME}/jre/lib/rt.jar:${JAVA14_HOME}/jre/lib/core.jar:${JAVA14_HOME}/jre/lib/xml.jar:${JAVA14_HOME}/jre/lib/graphics.jar:${JAVA14_HOME}/jre/lib/server.jar:${JAVA14_HOME}/jre/lib/ibmorbapi.jar:${JAVA14_HOME}/jre/lib/security.jar:${JAVA14_HOME}/jre/lib/classes.jar:${JAVA14_HOME}/jre/lib/jsse.jar:${JAVA14_HOME}/../Classes/dt.jar:${JAVA14_HOME}/../Classes/classes.jar:${JAVA14_HOME}/../Classes/jsse.jar
See also the PDE/Build documentation on controlling the classpath and source/target levels.
Finally, note that if you're running on a 64-bit OS with a 64-bit Eclipse, you need a 64-bit JVM.
My build fails with a failure in getDependenciesHelper.xml and a Java returned: 13
One of the most likely causes for this is a dependency that was impartially downloaded. You should clear our your tmp downloads directory and try again.
What are buildExtra.xml and testExtra.xml for?
These are optional.
If you have custom runtime requirements which cannot be configured using dependencyURLs or repositoryURLs in your build.properties, you can define additional fetching/unpacking steps here, for building or testing respectively.
If you have custom packaging steps (ie., you ship more than the default set of zips) you can also add packaging steps here.
My build fails in the packageTestFramework step. Why?
See answer for ${org.eclipse.test} not found.
${org.eclipse.test} not found? PackageTestFramework step fails w/ Java exit code 13?
1. Include "org.eclipse.test" and "org.eclipse.ant.optional.junit" plugins in your all-in-one tests feature (or to each test feature). This controls what plugins PDE will build.
<plugin id="org.eclipse.test" download-size="0" install-size="0" version="0.0.0"/> <plugin id="org.eclipse.ant.optional.junit" download-size="0" install-size="0" version="0.0.0" fragment="true"/>
2. Add these plugins to your map file (or create a new map file). This controls where PDE will find the Eclipse Test Framework (ETF) sources.
plugin@org.eclipse.test=v20080313,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse, fragment@org.eclipse.ant.optional.junit=v20070202,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,
Do I still need a test.xml in each of my test plugins?
No. In fact, having one there may cause some of your tests to fail. Omit this file and one will be generated for you from this template.
How do I build source features / plugins?
Three touchpoints are required:
1. In your .releng project's build.properties, set:
individualSourceBundles=true
2. In your runtime feature, define templates for features/plugins to be generated:
sourceTemplateFeature/ sourceTemplatePlugin/
3. In your SDK or "all-in-one" feature, define how to generate the feature / plugin:
generate.feature@org.eclipse.gef.source=org.eclipse.gef
See also PDE Build > Generating Source Features and Plug-ins.
What information do I need to provide to get a new job added to Hudson?
To get added to Hudson, see Build In Hudson.
How do I create Team Project Sets as part of the build?
Add the map2psf
target to your build.properties file. This will create a psf
directory in your releng project, that contains the PSFs.
When I check out org.eclipse.releng.basebuilder, it doesn't compile.
See Common Build Infrastructure/Getting Started/FAQ/Basebuilder.
My build used to work but now headless UI tests are broken!
Add the following line to testing.properties in your releng project:
extraVMargs=-Dorg.eclipse.swt.browser.XULRunnerPath=/shared/common/mozilla-xulrunner181-1.8.1.4-30.ppc
See also bug 295394.
The lastSuccess symbolic link disappeared on the file system! How do I access my lastSuccessful build.
See bug 302170.
Previous tip :
If you need to access this using the promotion script, then you need to create a promotion script similar to the following:
#!/bin/bash # where you will unzip build BUILD_LOC="" # where you will have your promotion logs PROMO_LOGS_DIR="" # where is your releng job, ie /opt/users/hudsonbuild/.hudson/jobs/cbi-emf-eef-0.7-nightly/workspace/build/org.eclipse.eef.releng RELENG_DIR="" # this script log logFile="" # Ant installation ANT="/opt/public/common/apache-ant-1.7.1/bin/ant" rm -f $logFile echo "[`date +%Y/%m/%d\ %H:%M`]: getting last successful build" >> $logFile mkdir -p $BUILD_LOC rm -f $BUILD_LOC/build.zip rm -rf $BUILD_LOC/build cd $BUILD_LOC wget --no-check-certificate "https://build.eclipse.org/hudson/job/cbi-emf-eef-0.7-nightly/lastSuccessfulBuild/artifact/build/*zip*/build.zip" -o $logFile if [ ! -f build.zip ]; then echo "ERROR:build.zip (from Hudson) not found" >> $logFile; exit -2; fi unzip build.zip >> $logFile echo "[`date +%Y/%m/%d\ %H:%M`]: publishing nightly build ..." >> $logFile mkdir -p $PROMO_LOGS_DIR $ANT -f $RELENG_DIR/promote.xml -Dpromote.properties=$RELENG_DIR/promote-N.properties 2>/dev/null 1> $PROMO_LOGS_DIR/cbi-emf-eef-promo-N.txt
This uses the REST API provided by Hudson to access to the necessary files from the last successful build.
You must also modify your promote-X.properties file to use the unzipped build file that resides in the BUILD_LOC folder instead of the lastSuccessful URL.
How do I publish my builds from Hudson to download.eclipse.org?
See Common_Build_Infrastructure/Publishing.
How do I contribute to Helios?
There is currently no automated way to contribute to Helios.
See Helios/Contributing to Helios Build for the manual method and bug 287013 for the work-in-progress for generating a .build file.