blob: 510f1b4ef869c54dcc9ec453d2e5d7651aa1e851 [file] [log] [blame]
<!--
Copyright (c) 2010 BSI Business Systems Integration AG.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
BSI Business Systems Integration AG - initial API and implementation
-->
<project name="scout.releng" default="build">
<property environment="env" />
<property file="build.properties" />
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${buildFileDir}/lib/ant-contrib-1.0b3.jar" />
</classpath>
</taskdef>
<tstamp>
<format property="buildTimestamp" pattern="yyyyMMdd-HHmm" />
<format property="featureTimestamp" pattern="yyyyMMddHHmm" />
</tstamp>
<!-- condition properties -->
<condition property="major" value="${versionMajor}">
<isset property="versionMajor" />
</condition>
<property name="major" value="" />
<condition property="minor" value=".${versionMinor}">
<and>
<isset property="versionMajor" />
<isset property="versionMinor" />
</and>
</condition>
<property name="minor" value="" />
<condition property="micro" value=".${versionMicro}">
<and>
<isset property="versionMinor" />
<isset property="versionMicro" />
</and>
</condition>
<property name="micro" value="" />
<property name="scoutVersion" value="${major}${minor}${micro}" />
<condition property="conditionSkipClean">
<istrue value="${skipClean}" />
</condition>
<condition property="conditionCheckStaged">
<and>
<available file="${scoutDownloadLocation}/${stagingAreaFolder}/doStage" />
<isfalse value="${skipUpload}" />
<isfalse value="${testBuild}" />
</and>
</condition>
<target name="build">
<!-- prepare junit test report folders -->
<delete dir="${testReportsDir}" failonerror="false" />
<mkdir dir="${testReportsDir}"/>
<!-- run compatibility pre-builds against the defined platform version -->
<delete dir="${preBuildDir}" failonerror="false" />
<mkdir dir="${preBuildDir}" />
<antcall target="preBuildVersion">
<param name="eclipsePlatformVersion" value="3.5" />
<param name="compatFragmentVersion" value="v35" />
</antcall>
<antcall target="preBuildVersion">
<param name="eclipsePlatformVersion" value="3.6" />
<param name="compatFragmentVersion" value="v36v37v41" />
</antcall>
<antcall target="preBuildVersion">
<param name="eclipsePlatformVersion" value="3.8" />
<param name="compatFragmentVersion" value="v38v42" />
</antcall>
<!-- run test builds -->
<antcall target="precheck" />
<for list="3.5,3.6,3.7,3.8,4.1,4.2" param="version">
<sequential>
<propertycopy name="skipValidateBuildVersion" from="@{version}_skipValidateBuild" />
<if><equals arg1="${skipValidateBuildVersion}" arg2="true" /><then></then>
<else>
<antcall target="buildVersion">
<param name="eclipsePlatformVersion" value="@{version}" />
</antcall>
</else>
</if>
</sequential>
</for>
<!-- run final build -->
<property name="doFinalBuild" value="true" />
<antcall target="buildVersion">
<param name="eclipsePlatformVersion" value="${finalBuildVersion}" />
</antcall>
<!-- remove pre-built features again (no longer needed) -->
<delete dir="${preBuildDir}" failonerror="false" />
</target>
<!-- expects property "eclipsePlatformVersion" -->
<target name="preBuildVersion" depends="clean">
<!-- extract properties based on current version built -->
<propertycopy name="eclipseFileName" from="${eclipsePlatformVersion}_eclipseFileName" />
<propertycopy name="eclipseDownloadUrl" from="${eclipsePlatformVersion}_eclipseDownloadUrl" />
<propertycopy name="eclipseRapDownloadUrl" from="${eclipsePlatformVersion}_eclipseRapDownloadUrl" />
<propertycopy name="eclipseRapFileName" from="${eclipsePlatformVersion}_eclipseRapFileName" />
<propertycopy name="eclipseDeltapackName" from="${eclipsePlatformVersion}_eclipseDeltapackName" />
<propertycopy name="eclipseDeltapackUrl" from="${eclipsePlatformVersion}_eclipseDeltapackUrl" />
<propertycopy name="pdeBuildPluginVersion" from="${eclipsePlatformVersion}_pdeBuildPluginVersion" />
<propertycopy name="equinoxLauncherPluginVersion" from="${eclipsePlatformVersion}_equinoxLauncherPluginVersion" />
<propertycopy name="orbitDownloadPluginList" from="${eclipsePlatformVersion}_orbitDownloadPluginList" />
<propertycopy name="orbitDropUrl" from="${eclipsePlatformVersion}_orbitDropUrl" />
<propertycopy name="eclipseTestFrameworkName" from="${eclipsePlatformVersion}_eclipseTestFrameworkName" />
<propertycopy name="eclipseTestFrameworkUrl" from="${eclipsePlatformVersion}_eclipseTestFrameworkUrl" />
<propertycopy name="eclipseTestFrameworkSubFolder" from="${eclipsePlatformVersion}_eclipseTestFrameworkSubFolder" />
<antcall target="setupEclipse">
<param name="workingDir" value="${relengRootDir}/working" />
<param name="buildDataDir" value="${relengRootDir}/working/buildData" />
</antcall>
<ant antfile="${buildFileDir}/step020_buildFeatures.xml" target="preBuild">
<property name="workingDir" value="${relengRootDir}/working" />
<property name="buildDataDir" value="${relengRootDir}/working/buildData" />
</ant>
</target>
<!-- expects property "eclipsePlatformVersion" -->
<target name="buildVersion" depends="clean">
<echo message="BUILD USING ECLIPSE VERSION ${eclipsePlatformVersion}" />
<property name="workingDirRap" value="${relengRootDir}/workingRap" />
<property name="workingDirNonRap" value="${relengRootDir}/working" />
<!-- extract properties based on current version built -->
<propertycopy name="eclipseFileName" from="${eclipsePlatformVersion}_eclipseFileName" />
<propertycopy name="eclipseDownloadUrl" from="${eclipsePlatformVersion}_eclipseDownloadUrl" />
<propertycopy name="eclipseRapDownloadUrl" from="${eclipsePlatformVersion}_eclipseRapDownloadUrl" />
<propertycopy name="eclipseRapFileName" from="${eclipsePlatformVersion}_eclipseRapFileName" />
<propertycopy name="eclipseDeltapackName" from="${eclipsePlatformVersion}_eclipseDeltapackName" />
<propertycopy name="eclipseDeltapackUrl" from="${eclipsePlatformVersion}_eclipseDeltapackUrl" />
<propertycopy name="pdeBuildPluginVersion" from="${eclipsePlatformVersion}_pdeBuildPluginVersion" />
<propertycopy name="equinoxLauncherPluginVersion" from="${eclipsePlatformVersion}_equinoxLauncherPluginVersion" />
<propertycopy name="orbitDownloadPluginList" from="${eclipsePlatformVersion}_orbitDownloadPluginList" />
<propertycopy name="orbitDropUrl" from="${eclipsePlatformVersion}_orbitDropUrl" />
<propertycopy name="eclipseTestFrameworkName" from="${eclipsePlatformVersion}_eclipseTestFrameworkName" />
<propertycopy name="eclipseTestFrameworkUrl" from="${eclipsePlatformVersion}_eclipseTestFrameworkUrl" />
<propertycopy name="eclipseTestFrameworkSubFolder" from="${eclipsePlatformVersion}_eclipseTestFrameworkSubFolder" />
<!-- build RT, SDK, RAP SDK based on Classic Eclipse in own working dir -->
<antcall target="setupEclipse">
<param name="workingDir" value="${workingDirNonRap}" />
<param name="buildDataDir" value="${workingDirNonRap}/buildData" />
</antcall>
<ant antfile="${buildFileDir}/step020_buildFeatures.xml" target="build">
<property name="workingDir" value="${workingDirNonRap}"/>
<property name="buildDataDir" value="${workingDirNonRap}/buildData" />
</ant>
<!-- build RAP RT based on RAP Eclipse in own working dir (only eclipse >= 3.6) -->
<if><equals arg1="${eclipsePlatformVersion}" arg2="3.5" /><then></then>
<else>
<!-- eclipse RAP runtime requires at least eclipse 3.6: dont build scout rap against eclipse 3.5 -->
<antcall target="setupEclipse">
<param name="workingDir" value="${workingDirRap}" />
<param name="buildDataDir" value="${workingDirRap}/buildData" />
</antcall>
<property name="nonRapBuildDataDir" value="${workingDirNonRap}/buildData" />
<ant antfile="${buildFileDir}/step020_buildFeatures.xml" target="buildRap">
<property name="workingDir" value="${workingDirRap}"/>
<property name="buildDataDir" value="${workingDirRap}/buildData" />
</ant>
</else>
</if>
<!-- do final build -->
<antcall target="finalBuild">
<param name="workingDir" value="${workingDirNonRap}" />
<param name="buildDataDir" value="${workingDirNonRap}/buildData" />
</antcall>
</target>
<target name="finalBuild" if="doFinalBuild">
<ant antfile="${buildFileDir}/step010_downloadRepository.xml" target="build" />
<ant antfile="${buildFileDir}/step030_archiveAll.xml" target="build" />
<ant antfile="${buildFileDir}/step050_pack200Normalize.xml" target="build" />
<ant antfile="${buildFileDir}/step060_sign.xml" target="build" />
<ant antfile="${buildFileDir}/step100_zipUnpack.xml" target="build" />
<ant antfile="${buildFileDir}/step110_zipCreate.xml" target="build" />
<ant antfile="${buildFileDir}/step200_p2Pack200.xml" target="build" />
<ant antfile="${buildFileDir}/step210_p2mergeRepository.xml" target="build" />
<ant antfile="${buildFileDir}/step220_p2metadata.xml" target="build" />
<ant antfile="${buildFileDir}/step230_p2categorize.xml" target="build" />
<ant antfile="${buildFileDir}/upload.xml" target="build" />
<antcall target="clean"/>
</target>
<target name="clean" unless="conditionSkipClean">
<echo message="clean working dirs" />
<delete failonerror="false" dir="${relengRootDir}/working" />
<delete failonerror="false" dir="${relengRootDir}/workingRap" />
</target>
<target name="precheck" depends="checkStaged">
</target>
<target name="checkStaged" if="conditionCheckStaged">
<fail message="already staged. Ensure the staged build is applied to the repository!" />
</target>
<target name="setupEclipse" unless="skipInstallEclipse">
<mkdir dir="${workingDir}" />
<ant antfile="${buildFileDir}/setupEclipse.xml" target="setupEclipse" />
</target>
</project>