<%@ egf:patternCall | |
patternId="platform:/plugin/org.eclipse.egf.portfolio.eclipse.build/egf/Build.fcore#LogicalName=org.eclipse.egf.portfolio.eclipse.build.XmlHeader" | |
%> | |
<project name="project" default="all"> | |
<!--Property file containing overrides for the default properties --> | |
<property environment="env" /> | |
<property file="build.properties" /> | |
<property name="relengDir" value="${basedir}"/> | |
<!-- if we are not running in Hudson, we some up with a reasonable default --> | |
<condition property="build.root" value="${env.WORKSPACE}" else="${relengDir}/../workspace"> | |
<isset property="env.WORKSPACE" /> | |
</condition> | |
<!--Default properties intended to be overridden by entries in the above property file. --> | |
<property name="tools" location="${build.root}/tools" /> | |
<property name="result" location="${build.root}/result" /> | |
<property name="workspace" location="${result}/workspace" /> | |
<property name="publish" location="${result}/publish" /> | |
<property name="buckminster.output.root" location="${result}/output" /> | |
<property name="buckminster.temp.root" location="${result}/temp" /> | |
<property name="eclipse.staging.area" location="${result}/signing" /> | |
<!-- This macro executes the default application of an eclipse installation that resides | |
in the folder ${buildtools}/@app | |
--> | |
<macrodef name="eclipse.launch"> | |
<attribute name="app" /> | |
<element name="args" optional="true" /> | |
<sequential> | |
<!-- We assume that the eclipse installation is beneath ${buildtools} --> | |
<property name="@{app}.deploy.dir" value="${tools}/@{app}" /> | |
<!-- Find the Eclipse launcher and assing its location to the @{app}.launcher property --> | |
<pathconvert property="@{app}.launcher"> | |
<first count="1"> | |
<sort> | |
<fileset dir="${@{app}.deploy.dir}/plugins" includes="**/org.eclipse.equinox.launcher_*.jar" /> | |
<reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators"> | |
<date /> | |
</reverse> | |
</sort> | |
</first> | |
</pathconvert> | |
<!-- Launch the eclipse application --> | |
<java fork="true" jar="${@{app}.launcher}" dir="${@{app}.deploy.dir}" failonerror="true"> | |
<args /> | |
</java> | |
</sequential> | |
</macrodef> | |
<macrodef name="buckminster"> | |
<attribute name="command" /> | |
<attribute name="workspace" default="${workspace}" /> | |
<element name="globargs" optional="true" /> | |
<element name="cmdargs" optional="true" /> | |
<sequential> | |
<eclipse.launch app="buckminster"> | |
<args> | |
<jvmarg value="-Dbugfix.288796=true"/> | |
<%@ egf:patternCall | |
patternId="platform:/plugin/org.eclipse.egf.portfolio.eclipse.build/egf/Build.fcore#LogicalName=org.eclipse.egf.portfolio.eclipse.build.buckminster.call.build.xml.Xmx" | |
%> | |
<arg value="-data" /> | |
<arg value="@{workspace}" /> | |
<arg value="--loglevel" /> | |
<arg value="${buckminster.loglevel}" /> | |
<arg value="--displaystacktrace" /> | |
<globargs /> | |
<arg value="@{command}" /> | |
<arg value="-P" /> | |
<arg value="${properties.tmp}" /> | |
<cmdargs /> | |
</args> | |
</eclipse.launch> | |
</sequential> | |
</macrodef> | |
<macrodef name="egf"> | |
<attribute name="workspace" default="${workspace}" /> | |
<element name="activities" /> | |
<element name="globargs" optional="true" /> | |
<element name="cmdargs" optional="true" /> | |
<sequential> | |
<eclipse.launch app="egf"> | |
<args> | |
<%@ egf:patternCall | |
patternId="platform:/plugin/org.eclipse.egf.portfolio.eclipse.build/egf/Build.fcore#LogicalName=org.eclipse.egf.portfolio.eclipse.build.buckminster.call.build.xml.Xmx" | |
%> | |
<arg value="-consoleLog" /> | |
<arg value="-data" /> | |
<arg value="@{workspace}" /> | |
<globargs /> | |
<arg value="-activities" /> | |
<activities /> | |
<cmdargs /> | |
</args> | |
</eclipse.launch> | |
</sequential> | |
</macrodef> | |
<macrodef name="anteclipse"> | |
<attribute name="workspace" default="${workspace}" /> | |
<attribute name="buildfile" default="${build.root}/${relengDir}/build.xml" /> | |
<attribute name="target" /> | |
<element name="globargs" optional="true" /> | |
<sequential> | |
<eclipse.launch app="egf"> | |
<args> | |
<%@ egf:patternCall | |
patternId="platform:/plugin/org.eclipse.egf.portfolio.eclipse.build/egf/Build.fcore#LogicalName=org.eclipse.egf.portfolio.eclipse.build.buckminster.call.build.xml.Xmx" | |
%> | |
<arg value="-application" /> | |
<arg value="org.eclipse.ant.core.antRunner" /> | |
<arg value="-consoleLog" /> | |
<arg value="-data" /> | |
<arg value="@{workspace}" /> | |
<globargs /> | |
<arg value="-buildfile" /> | |
<arg value="@{buildfile}" /> | |
<arg value="@{target}" /> | |
</args> | |
</eclipse.launch> | |
</sequential> | |
</macrodef> | |
<target name="init.checks"> | |
<available file="${tools}/director/director" property="director.exists" /> | |
<available file="${tools}/buckminster/buckminster" property="buckminster.exists" /> | |
<available file="${tools}/egf/eclipse.ini" property="egf.exists" /> | |
<available file="${workspace}" type="dir" property="workspace.exists" /> | |
</target> | |
<target name="get.director" unless="director.exists"> | |
<echo message="Fetching headless director application" /> | |
<tempfile destdir="${java.io.tmpdir}" prefix="director-" suffix=".zip" property="director.zip" deleteonexit="true" /> | |
<get src="${director.url}" dest="${director.zip}" /> | |
<mkdir dir="${tools}" /> | |
<unzip src="${director.zip}" dest="${tools}" /> | |
<delete file="${director.zip}" /> | |
</target> | |
<target name="install.buckminster" unless="buckminster.exists" depends="get.director"> | |
<echo message="Configuring headless buckminster with needed features" /> | |
<echo message="Headless site: ${bm.headless.site}" /> | |
<echo message="External site: ${bm.external.site}" /> | |
<eclipse.launch app="director"> | |
<args> | |
<jvmarg value="-Declipse.p2.mirrors=false" /> | |
<arg value="-r" /> | |
<arg value="${bm.headless.site}" /> | |
<arg value="-r" /> | |
<arg value="${bm.external.site}" /> | |
<arg value="-r" /> | |
<arg value="${polarion.site}" /> | |
<arg value="-d" /> | |
<arg value="${tools}/buckminster" /> | |
<arg value="-p" /> | |
<arg value="Buckminster" /> | |
<arg value="-i" /> | |
<arg value="org.eclipse.buckminster.cmdline.product" /> | |
<arg value="-i" /> | |
<arg value="org.eclipse.buckminster.core.headless.feature.feature.group" /> | |
<arg value="-i" /> | |
<arg value="org.eclipse.buckminster.pde.headless.feature.feature.group" /> | |
<arg value="-i" /> | |
<arg value="org.eclipse.buckminster.cvs.headless.feature.feature.group" /> | |
<arg value="-i" /> | |
<arg value="org.eclipse.buckminster.subversive.headless.feature.feature.group" /> | |
<arg value="-i" /> | |
<arg value="org.eclipse.buckminster.emma.headless.feature.feature.group" /> | |
</args> | |
</eclipse.launch> | |
</target> | |
<target name="install.egf" unless="egf.exists" depends="get.director"> | |
<echo message="Configuring EGF with needed features" /> | |
<echo message="EGF site: ${egf.site}" /> | |
<eclipse.launch app="director"> | |
<args> | |
<jvmarg value="-Declipse.p2.mirrors=false" /> | |
<arg value="-r" /> | |
<arg value="${egf.site}" /> | |
<arg value="-r" /> | |
<arg value="${egf.site2}" /> | |
<arg value="-d" /> | |
<arg value="${tools}/egf" /> | |
<arg value="-p" /> | |
<arg value="EGF" /> | |
<arg value="-i" /> | |
<arg value="org.eclipse.egf.application.product" /> | |
<arg value="-i" /> | |
<arg value="org.eclipse.egf.feature.group" /> | |
<arg value="-i" /> | |
<arg value="org.eclipse.egf.portfolio.feature.group" /> | |
<arg value="-i" /> | |
<arg value="org.eclipse.egf.portfolio.emf.feature.group" /> | |
</args> | |
</eclipse.launch> | |
</target> | |
<target name="clean.result"> | |
<delete dir="${result}" failonerror="true" quiet="true" /> | |
</target> | |
<target name="clean.workspace"> | |
<delete dir="${workspace}" failonerror="true" quiet="true" /> | |
</target> | |
<target name="init.workspace" unless="workspace.exists"> | |
<mkdir dir="${workspace}" /> | |
</target> | |
<target name="init.build.properties"> | |
<!-- Echo relevant properties to a temporary file so that Buckminster can read them --> | |
<tempfile destdir="${java.io.tmpdir}" prefix="build-" suffix=".properties" deleteonexit="true" property="properties.tmp" /> | |
<echoproperties destfile="${properties.tmp}"> | |
<!-- We don't want these. basedir in particular will cause problems if passed explicitly --> | |
<propertyset negate="true"> | |
<propertyref name="basedir" /> | |
<propertyref name="eclipse.home" /> | |
<propertyref name="properties.tmp" /> | |
<propertyref name="line.separator" /> | |
<propertyref name="path.separator" /> | |
<propertyref prefix="ant." /> | |
<propertyref prefix="file." /> | |
<propertyref prefix="java." /> | |
<propertyref prefix="sun." /> | |
<propertyref prefix="user." /> | |
</propertyset> | |
</echoproperties> | |
</target> | |
<target name="init" depends="init.checks,init.workspace,init.build.properties" /> | |
<target name="all" depends="<%=new GenerationHelper().generateJobStepsString(job, ',')%>" /> | |