blob: 319ebc4ab08b5681b2f39b6e6cb9cf4090bc7129 [file] [log] [blame]
<project default="run">
<target name="init">
<!-- common releng helper scripts -->
<property name="helper" value="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/buildAllHelper.xml" />
<echo message="Set compilerArgs = '-enableJavadoc -encoding ISO-8859-1 -warn:-serial,nls,unused,unchecked,raw,discouraged'"/>
<property name="compilerArg" value="-enableJavadoc -encoding ISO-8859-1 -warn:-serial,nls,unused,unchecked,raw,discouraged" />
<property name="commonScriptsDir" value="${basedir}/../org.eclipse.modeling.common.releng/scripts" />
<!-- TODO: set correct source and target levels here -->
<echo message="Set javacSource and javacTarget = 1.5"/>
<property name="javacSource" value="1.5" />
<property name="javacTarget" value="1.5" />
<path id="bc">
<fileset dir="${java.home}/lib">
<include name="*.jar" />
</fileset>
</path>
<property name="bootclasspath" refid="bc" />
<!-- TODO: if using JDK1.4, comment out these lines -->
<echo message="Set J2SE-1.5 = ${bootclasspath}"/>
<property name="J2SE-1.5" value="${bootclasspath}"/>
<condition property="bundleBootClasspath" value="${J2SE-1.5}"><isset property="J2SE-1.5"/></condition>
<condition property="bundleJavacSource" value="1.5"><isset property="J2SE-1.5"/></condition>
<condition property="bundleJavacTarget" value="1.5"><isset property="J2SE-1.5"/></condition>
<property name="buildingOSGi" value="true" />
<property name="collectingFolder" value="eclipse" />
<property name="archivePrefix" value="eclipse" />
<!-- Reduce the amount of info in the build log -->
<property name="javacVerbose" value="false" />
<property name="buildDirectory" location="${basedir}/../src/eclipse" />
<property file="${basedir}/repoInfo.properties" />
<property name="testBase" location="${buildDirectory}/../testing" />
<available file="${buildDirectory}/label.properties" property="label.properties.exists" />
<ant target="create.label.properties" antfile="${helper}" />
<!-- <property name="forceContextQualifier" value="v${timestamp}" />
<echo file="${buildDirectory}/label.properties" append="true">
forceContextQualifier=${forceContextQualifier}
</echo>
<echo message="forceContextQualifier=${forceContextQualifier}" />
-->
<property file="${buildDirectory}/label.properties" />
<echo message="buildAll.xml properties:"/>
<echo message="basedir = ${basedir}"/>
<!-- load a value for ${subprojectName}, among other variables, from build.cfg -->
<property name="buildConfigFile" value="${basedir}/../build.cfg"/>
<available file="${buildConfigFile}" type="file" property="buildConfigIsAvailable" />
<fail message="Can't load build properties from ${buildConfigFile}" unless="buildConfigIsAvailable"/>
<!-- TODO: set any special build-related properties here by echoing them into ${buildConfigFile}:
<echo file="${buildConfigFile}" append="true">
# extra properties specific to just this build
propertyName=propertyValue
</echo> -->
<property file="${buildConfigFile}" />
<echo message="buildVer = ${buildVer}"/>
<echo message="subprojectName = ${subprojectName}"/>
<!-- <echo message="Base OS: ${baseos}; Base Window System: ${basews}"/> -->
<condition property="isWindows">
<equals arg1="${baseos}.${basews}" arg2="win32.win32" />
</condition>
<condition property="isLinuxGTK">
<equals arg1="${baseos}.${basews}" arg2="linux.gtk" />
</condition>
<condition property="isLinuxMotif">
<equals arg1="${baseos}.${basews}" arg2="linux.motif" />
</condition>
<property name="masterZip" value="${projectName}-${subprojectName}-Master-${buildAlias}.zip" />
<property name="SDKZip" value="${projectName}-${subprojectName}-SDK-${buildAlias}.zip" />
<property name="java15-home" value="/opt/sun-java2-5.0" />
<property name="stagingHome" value="/home/data/httpd/download-staging.priv" />
<property name="projectPath" value="modeling/mdt" />
<!-- user with write perms in staging dir & permission to run /usr/bin/sign -->
<property name="buildServerUser" value="nickb@build.eclipse.org" />
<condition property="sign">
<or>
<!-- want to enable/disable signing for a given build type? add/remove types here -->
<equals arg1="${buildType}" arg2="I" />
<equals arg1="${buildType}" arg2="M" />
<equals arg1="${buildType}" arg2="S" />
<equals arg1="${buildType}" arg2="R" />
</or>
</condition>
<!-- want to enable/disable signing for a given build type? add/remove types here -->
<!-- condition property="sign">
<or>
<equals arg1="${buildType}" arg2="I"/>
<equals arg1="${buildType}" arg2="S"/>
<equals arg1="${buildType}" arg2="R"/>
</or>
</condition -->
</target>
<target name="buildAll">
<macrodef name="echo-timestamp">
<sequential>
<ant target="-timestamp" inheritAll="false" antfile="${helper}" />
</sequential>
</macrodef>
<echo-timestamp />
<!-- build Master Zip, missing jarred features -->
<ant antfile="build.xml" target="main">
<property name="component" value="builder/sdk" />
</ant>
<echo-timestamp />
<ant target="signMasterZip" antfile="${helper}">
<property name="mailStatus" value="nomail" />
</ant>
<!-- Unpack jars to produce SDK zip with mix of folders & jars -->
<ant target="unpackUpdateJarsAndRepack" antfile="${helper}">
<property name="sourceZip" value="${buildDirectory}/${buildLabel}/${masterZip}" />
<property name="targetZip" value="${buildDirectory}/${buildLabel}/${SDKZip}" />
</ant>
<!-- remove rootfiles -->
<ant target="removeRootFilesFromMaster" antfile="${helper}" />
<!-- pack the master zip -->
<ant target="packMasterZip" antfile="${helper}" />
<echo-timestamp />
<!-- build runtime -->
<zip destfile="${buildDirectory}/${buildLabel}/${projectName}-${subprojectName}-runtime-${buildAlias}.zip" update="true" duplicate="preserve">
<zipfileset
src="${buildDirectory}/${buildLabel}/${SDKZip}"
dirmode="775" filemode="664"
excludes="**/org.eclipse.*.example*, **/org.eclipse.*.example*/**,**/org.eclipse.*.sample*, **/org.eclipse.*.sample*/**, **/org.eclipse.*.sdk*, **/org.eclipse.*.sdk*/**, **/org.eclipse.*.doc*, **/org.eclipse.*.doc*/**, **/org.eclipse.*.source*, **/org.eclipse.*.source*/**, **/*src.zip, **/org.eclipse.m2m.qvt.oml.ui*, **/org.eclipse.m2m.qvt.oml.ui*/**">
<include name="**/org.eclipse.m2m.qvt.oml*" />
<include name="**/org.eclipse.m2m.qvt.oml*/**" />
</zipfileset>
<zipfileset
src="${buildDirectory}/${buildLabel}/${SDKZip}"
dirmode="775" filemode="664"
id="rootfiles"
includes="**/eclipse/epl-v10.html, **/eclipse/notice.html" />
</zip>
<!-- build examples -->
<zip destfile="${buildDirectory}/${buildLabel}/${projectName}-${subprojectName}-examples-${buildAlias}.zip" update="true" duplicate="preserve">
<zipfileset
src="${buildDirectory}/${buildLabel}/${SDKZip}" dirmode="775" filemode="664">
<include name="**/org.eclipse.*.example*" />
<include name="**/org.eclipse.*.example*/**" />
<include name="**/org.eclipse.*.example*/**/**" />
<include name="**/org.eclipse.*.sample*" />
<include name="**/org.eclipse.*.sample*/**" />
<include name="**/org.eclipse.*.sample*/**/**" />
</zipfileset>
<zipfileset refid="rootfiles" />
</zip>
<echo-timestamp />
<ant antfile="build.xml" target="main">
<property name="component" value="builder/tests" />
</ant>
<echo-timestamp />
<ant target="generateDigests" antfile="${helper}" />
</target>
<target name="run" depends="init">
<antcall target="buildAll" />
<ant target="test" antfile="${helper}" />
<ant target="publish" antfile="${helper}" />
<ant target="cleanUp" antfile="${helper}" />
</target>
<target name="runTestsOnly" depends="init">
<antcall target="runTestsOnlySetup" />
<ant target="test" antfile="${helper}" />
<ant target="publish" antfile="${helper}" />
<ant target="cleanUp" antfile="${helper}" />
</target>
<!-- make sure everything's in the right place(s) -->
<target name="runTestsOnlySetup">
<delete dir="${buildDirectory}" />
<mkdir dir="${buildDirectory}/${buildLabel}" />
<copy todir="${buildDirectory}/${buildLabel}">
<fileset dir="${buildDirectory}/..">
<include name="**/*.zip" />
</fileset>
</copy>
</target>
<target name="runWithoutTest" depends="init">
<antcall target="buildAll" />
<ant target="publish" antfile="${helper}" />
<ant target="cleanUp" antfile="${helper}" />
</target>
<target name="runAll" depends="init">
<antcall target="buildAll" />
<antcall target="test" />
<antcall target="publish" />
</target>
<target name="build" depends="init">
<antcall target="buildAll" />
<ant target="cleanUp" antfile="${helper}" />
</target>
</project>