blob: 0f5c7c19ce4e1c2e73aee4c1293bc4849c3fe00d [file] [log] [blame]
<!--
###############################################################################
# Copyright (c) 2012 IBM Corporation and others.
# 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:
# IBM Corporation - initial API and implementation
###############################################################################
-->
<project name="STEM PDE Builder" default="build" basedir=".">
<property name="relengHome" value="${basedir}" />
<property file="${basedir}/build.properties" />
<property name="buildHome" value="${basedir}/build" />
<property name="repoBaseLocation" value="${basedir}/inputRepos" />
<property name="transformedRepoLocation" value="${basedir}/transformedRepos" />
<property name="buildFeature" value="true" />
<property name="buildProduct" value="true" />
<property name="runTests" value="false" />
<property name="data.version" value="3.0.0.201410041849" />
<tstamp>
<format property="buildDate" pattern="yyyyMMddHHmmss" />
</tstamp>
<property name="buildQualifier" value="" />
<property name="majorVersion" value="4.0.0" />
<property name="buildTypeFull" value="nightly" />
<property name="publishBuild" value="false" />
<property name="cleanupFirst" value="false" />
<property name="publishDir" value="${basedir}" />
<!--<property name="eclipse.home" location="/Developer/eclipse-installs/eclipse3710-bare" />-->
<!--<property name="eclipse.deltapack.home" location="/Users/mattadav/Downloads/delta"/>-->
<property name="mapDirectoryFile" value="${basedir}/maps/directories.properties" />
<property file="${mapDirectoryFile}" />
<!--<property name="skipData" value="true" />-->
<target name="clean.build.home" if="is.build.feature">
<delete dir="${buildHome}" />
</target>
<target name="init" depends="set.build.label,clean.build.home">
<mkdir dir="${buildHome}" />
<mkdir dir="${buildHome}/maps" />
<copy file="${basedir}/maps/stem.map" todir="${buildHome}/maps" />
</target>
<target name="build.feature" depends="fetch.eclipse.components" if="is.build.feature">
<echo>Building Features for ${buildLabelSuffix}</echo>
<ant antfile="${basedir}/buildFeature.xml" inheritAll="true" />
<ant antfile="${basedir}/buildModelGenFeature.xml" inheritAll="true" />
</target>
<target name="build.product" depends="fetch.eclipse.deltapack,prepare.lang.packs" if="is.build.product">
<echo>Building Product for ${buildLabelSuffix}</echo>
<property name="archiveNamePrefix" value="STEM-${buildLabelSuffix}" />
<ant antfile="${basedir}/buildProduct.xml" inheritAll="true" />
</target>
<target name="run.tests" if="is.run.tests">
<echo>Running Test Suite for ${buildLabelSuffix}</echo>
<ant antfile="${basedir}/runTests.xml" inheritAll="true" />
</target>
<target name="build.all.eclipse" depends="init,build.feature,build.product,run.tests">
<echo>Done building ${buildLabelSuffix}</echo>
</target>
<!--,build.feature,build.product-->
<target name="build.all" if="eclipse.running">
<antcall target="build.all.eclipse" />
</target>
<path id="eclipse.class.path">
<fileset dir="${eclipse.home}/plugins">
<include name="org.eclipse.equinox.launcher_*.jar" />
</fileset>
</path>
<target name="prepare.lang.packs">
<mkdir dir="${buildHome}/languages/plugins" />
<mkdir dir="${buildHome}/languages/plugins" />
<unzip dest="${buildHome}/languages">
<globmapper from="eclipse/*" to="*" />
<fileset dir="${relengHome}/resources/babel">
<include name="**/*.zip" />
</fileset>
</unzip>
</target>
<target name="fetch.eclipse.components">
<echo>Synchronizing Eclipse dependencies</echo>
<!--
<iu id="org.apache.batik.dom" version="1.7.0.v201011041433" />
<iu id="org.apache.batik.svggen" version="1.7.0.v201011041433" />
<iu id="org.apache.batik.ext.awt" version="1.7.0.v201011041433" />
<iu id="org.apache.batik.util" version="1.7.0.v201011041433" />
<iu id="org.apache.batik.util.gui" version="1.7.0.v200903091627" />
-->
<p2.mirror destination="file:${repoBaseLocation}/mirrored" description="STEM dependencies">
<source>
<repository location="http://download.eclipse.org/stem/update-site/data/" />
<repository location="http://download.eclipse.org/releases/oxygen/" />
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20170919201930/repository" />
<repository location="http://download.itemis.com/updates/" />
</source>
<iu id="org.eclipse.draw2d.feature.group" version="3.10.100.201606061308" />
<iu id="org.eclipse.gef.feature.group" version="3.11.0.201606061308" />
<iu id="org.eclipse.zest.feature.group" version="1.7.0.201606061308" />
<iu id="org.eclipse.emf.feature.group" version="2.13.0.v20170609-0928" />
<iu id="org.eclipse.birt.feature.group" version="4.7.0.v201706222054" />
<iu id="org.apache.commons.collections" version="3.2.2.v201511171945" />
<iu id="org.apache.commons.io" version="2.2.0.v201405211200" />
<iu id="org.apache.commons.lang" version="2.6.0.v201404270220" />
<iu id="com.google.guava" version="15.0.0.v201403281430" />
<iu id="com.google.inject" version="3.0.0.v201312141243" />
<iu id="org.apache.batik.css" version="1.7.0.v201011041433" />
<iu id="org.apache.batik.dom" version="1.7.1.v201505191845" />
<iu id="org.apache.batik.svggen" version="1.7.0.v201011041433" />
<iu id="org.apache.batik.ext.awt" version="1.7.0.v201011041433" />
<iu id="org.apache.batik.util" version="1.7.0.v201011041433" />
<iu id="org.apache.batik.util.gui" version="1.7.0.v200903091627" />
<iu id="org.apache.batik.xml" version="1.7.0.v201011041433" />
<iu id="org.eclipse.stem.data.feature.feature.group" version="${data.version}" />
<iu id="org.eclipse.xtext.sdk.feature.group" version="2.12.0.v20170519-1412" />
<iu id="org.eclipse.xtend.sdk.feature.group" version="2.12.0.v20170519-1412" />
<iu id="org.eclipse.xpand.feature.group" version="2.2.0.v201605260315" />
<iu id="org.eclipse.jdt.launching.macosx" version="3.4.0.v20160923-0911" />
<iu id="org.eclipse.jdt.launching.ui.macosx" version="1.2.0.v20160923-0911" />
<iu id="org.eclipse.emf.mwe2.runtime.sdk.feature.group" version="2.9.1.201705291011" />
<iu id="org.eclipse.emf.mwe2.language.sdk.feature.group" version="2.9.1.201705291011" />
<slicingOptions includeFeatures="true" followStrict="true" />
</p2.mirror>
</target>
<target name="fetch.eclipse.deltapack" if="is.build.product" unless="eclipse.deltapack.available">
<echo>Synchronizing Eclipse deltapack dependencies</echo>
<p2.mirror destination="file:${repoBaseLocation}/mirrored" description="Eclipse Deltapack dependencies">
<source>
<repository location="http://download.eclipse.org/eclipse/updates/4.7/" />
</source>
<iu id="org.eclipse.equinox.executable.feature.group" version="3.7.2.v20171108-1834" />
<iu id="org.eclipse.platform.feature.group" version="4.7.2.v20171130-0510" />
<iu id="org.eclipse.rcp.feature.group" version="4.7.2.v20171130-0510" />
<iu id="org.eclipse.swt" version="3.106.2.v20171129-0543" />
<slicingOptions includeFeatures="true" followStrict="true" />
</p2.mirror>
</target>
<target name="eclipse.sane" unless="eclipse.running">
<echo>eclipse.home is ${eclipse.home}</echo>
<available property="eclipse.home.valid" type="dir" file="${eclipse.home}/plugins" />
<fail unless="eclipse.home.valid" message="eclipse.home is not a valid path. Please verify eclipse.home is a valid path." />
<available ignoresystemclasses="true" property="eclipse.launcher.available" classname="org.eclipse.core.launcher.Main" classpathref="eclipse.class.path" />
<fail unless="eclipse.launcher.available" message="Eclipse launcher not available. Please verify eclipse.home is a valid path." />
<condition property="eclipse.deltapack.available">
<or>
<available type="file" file="feature.xml">
<filepath>
<dirset dir="${eclipse.home}/features">
<include name="**/org.eclipse.equinox.executable*/**" />
</dirset>
</filepath>
</available>
<and>
<available type="dir" file="${eclipse.deltapack.home}/features" />
<available type="file" file="feature.xml">
<filepath>
<dirset dir="${eclipse.deltapack.home}/features">
<include name="**/org.eclipse.equinox.executable*/**" />
</dirset>
</filepath>
</available>
</and>
</or>
</condition>
<!--<fail unless="eclipse.deltapack.available"
message="Eclipse Deltapack not available. Please install into eclipse.home or set eclipse.deltapack.home property." />
-->
</target>
<target name="launch.eclipse" depends="eclipse.sane">
<java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="true">
<syspropertyset id="source.path.properties">
<propertyref builtin="all" />
</syspropertyset>
<!-- -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:8000,suspend=n -->
<jvmarg line="-XX:+UseParNewGC -Xms256M -Xmx768M" />
<classpath refid="eclipse.class.path" />
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-logger" />
<arg value="org.apache.tools.ant.DefaultLogger" />
<arg value="-buildfile" />
<arg value="${relengHome}/build.xml" />
<arg value="build.all" />
</java>
</target>
<target name="build" depends="launch.eclipse,build.all">
</target>
<target name="set.build.label" depends="set.build.label.nightly,set.build.label.integration,set.build.label.stable,set.build.label.release">
<property name="forceContextQualifier" value="${buildQualifierPrefix}${buildDate}" />
</target>
<target name="set.build.label.nightly" if="is.nightly.build">
<echo>Nightly Build</echo>
<property name="buildQualifierPrefix" value="N" />
<property name="buildLabelSuffix" value="${majorVersion}.${buildQualifierPrefix}${buildDate}" />
</target>
<target name="set.build.label.integration" if="is.integration.build">
<echo>Integration Build</echo>
<property name="buildQualifierPrefix" value="I" />
<property name="buildLabelSuffix" value="${majorVersion}.${buildQualifierPrefix}${buildDate}" />
</target>
<target name="set.build.label.stable" if="is.stable.build">
<echo>Stable Build</echo>
<property name="buildQualifierPrefix" value="M" />
<property name="buildLabelSuffix" value="${majorVersion}${buildQualifier}" />
</target>
<target name="set.build.label.release" if="is.release.build">
<echo>Release Build</echo>
<property name="buildLabelSuffix" value="${majorVersion}" />
</target>
<condition property="is.nightly.build">
<equals arg1="${buildTypeFull}" arg2="nightly" />
</condition>
<condition property="is.integration.build">
<equals arg1="${buildTypeFull}" arg2="integration" />
</condition>
<condition property="is.stable.build">
<equals arg1="${buildTypeFull}" arg2="stable" />
</condition>
<condition property="is.release.build">
<equals arg1="${buildTypeFull}" arg2="release" />
</condition>
<condition property="is.publish.build">
<istrue value="${publishBuild}" />
</condition>
<condition property="is.build.feature">
<istrue value="${buildFeature}" />
</condition>
<condition property="is.build.product">
<istrue value="${buildProduct}" />
</condition>
<condition property="is.run.tests">
<istrue value="${runTests}" />
</condition>
<condition property="is.skip.data">
<istrue value="${skipData}" />
</condition>
</project>