blob: 692e1a1abfd68331eea3ad12abed8b351e88c775 [file] [log] [blame]
<?xml version="1.0"?>
<!--************************************************************************
* Copyright (c) 2006-2007, Cloudsmith Inc and Eclipse Foundation Inc.
* The code, documentation and other materials contained herein have been
* licensed under the Eclipse Public License - v 1.0 by the copyright holder
* listed above, as the Initial Contributor under such license. The text of
* such license is available at www.eclipse.org.
************************************************************************-->
<project name="project">
<property file="local.properties" />
<!--Default properties intended to be overridden by entries in the
above property file.
-->
<property name="downloads" value="http://download.eclipse.org"/>
<property name="buckminster.version" value="1.0.0.v20070308" />
<property name="buckminster.external.zip" value="${downloads}/technology/buckminster/3.3/products/buckminster.europa_${buckminster.version}.zip"/>
<property name="site.contrib.dir" location="${basedir}"/>
<property name="top.project" value="org.eclipse.europa"/>
<property name="site.template" location="${site.contrib.dir}/site.xml"/>
<property name="output" location="${user.home}/europa/output" />
<property name="generated.folder" location="${output}/generated" />
<property name="buildtools" location="${output}/buildtools" />
<property name="mirror.site.location" location="${output}/${top.project}.mirror"/>
<property name="mirror.site.url" value="http://www.foo.fee/fum"/>
<!--Local properties
-->
<property name="buckminster.parent.dir" location="${buildtools}/buckminster/${buckminster.version}" />
<property name="buckminster.zip" location="${buckminster.parent.dir}/buckminster.zip" />
<property name="buckminster.home" location="${buckminster.parent.dir}/buckminster" />
<macrodef name="buckminster">
<attribute name="command" default="--scriptfile" />
<element name="globargs" optional="true" />
<element name="args" optional="true" />
<sequential>
<java fork="true"
jvm="${jvm.location}/bin/java"
jar="${buckminster.home}/startup.jar"
dir="${buckminster.home}"
failonerror="true">
<!-- <jvmarg value="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y"/> -->
<jvmarg value="-Xmx512m"/>
<arg value="--displaystacktrace"/>
<arg value="--loglevel"/>
<arg value="debug"/>
<globargs />
<arg value="@{command}" />
<args />
</java>
</sequential>
</macrodef>
<available file="${buckminster.zip}" property="buckminster.zip.exists" />
<target description="Fetch the preconfigured Buckminster product" name="get.buckminster" unless="buckminster.zip.exists">
<mkdir dir="${buckminster.parent.dir}" />
<get src="${buckminster.external.zip}" dest="${buckminster.zip}" />
<unzip src="${buckminster.zip}" dest="${buckminster.parent.dir}" />
</target>
<target name="generate.bm.artifacts" description="Generate the Buckminster artifacts from Site contributions" depends="get.buckminster">
<path id="site.contrib.files.path">
<fileset dir="${site.contrib.dir}" includes="*.sc" />
</path>
<pathconvert property="site.contrib.files" pathsep=" " refid="site.contrib.files.path" />
<buckminster command="generate">
<args>
<arg value="--outputdir" />
<arg value="${generated.folder}" />
<arg value="--templatesite" />
<arg value="${site.template}" />
<arg value="--project" />
<arg value="${top.project}" />
<arg line="${site.contrib.files}" />
</args>
</buckminster>
</target>
<target name="resolve.cquery" description="Run the component query" depends="generate.bm.artifacts">
<buckminster command="resolve">
<globargs>
<jvmarg value="-Ddownloads=${downloads}"/>
<jvmarg value="-Dmirror.site.location=${mirror.site.location}"/>
<jvmarg value="-Dmirror.site.url=${mirror.site.url}"/>
</globargs>
<args>
<arg value="--continueonerror"/>
<arg value="${generated.folder}/${top.project}.cquery" />
</args>
</buckminster>
</target>
<target name="clean" description="Clean the generated artifacts and site">
<delete dir="${output}/generated" />
</target>
<target name="really.clean" depends="clean" description="Clean out the barebone installation">
<delete dir="${output}/buildtools" />
</target>
</project>