| <?xml version="1.0"?> |
| <!-- |
| ############################################################################### |
| # 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" /> |
| |
| <tstamp> |
| <format property="buildDate" pattern="yyyyMMddHHmmss" /> |
| </tstamp> |
| |
| <property name="buildQualifier" value="" /> |
| <property name="majorVersion" value="1.3.1" /> |
| <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"> |
| <echoproperties /> |
| <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> |
| <p2.mirror destination="file:${repoBaseLocation}/mirrored" description="STEM dependencies"> |
| |
| <!-- |
| org.eclipse.draw2d_3.7.2.v20110927-2020-4617w3122212803131.jar |
| org.eclipse.emf_2.7.2.v20120130-0943.jar |
| org.eclipse.zest_1.3.0.v20110425-2050-67A18yF6F18CBD5A7N54242.jar |
| org.eclipse.birt_3.7.2.v20120213-BDF9E9bGTzuHh03p2c0AWvmC3Ltk.jar |
| --> |
| |
| |
| <source> |
| <!--<repository location="http://download.eclipse.org/modeling/emf/emf/updates/2.7.x/"/> |
| <repository location="http://download.eclipse.org/tools/gef/updates/releases" /> |
| <repository location="http://download.eclipse.org/birt/update-site/2.6/" /> |
| <repository location="http://download.eclipse.org/eclipse/updates/3.7/" />--> |
| |
| <repository location="http://download.eclipse.org/releases/indigo/" /> |
| <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20120119162704/repository/" /> |
| </source> |
| |
| <iu id="org.eclipse.draw2d.feature.group" version="3.7.2.v20110927-2020-4617w3122212803131" /> |
| <iu id="org.eclipse.zest.feature.group" version="1.3.0.v20110425-2050-67A18yF6F18CBD5A7N54242" /> |
| <!--<iu id="org.eclipse.gmf.feature.group" version="1.5.0.v20110607-1200-7d9Q7HFYnmMEynz0X0qrbsDiK281" />--> |
| <iu id="org.eclipse.emf.feature.group" version="2.7.2.v20120130-0943" /> |
| <iu id="org.eclipse.birt.feature.group" version="3.7.2.v20120213-BDF9E9bGTzuHh03p2c0AWvmC3Ltk" /> |
| <iu id="org.apache.commons.math" version="2.1.0.v201105210652" /> |
| <iu id="org.apache.commons.collections" version="3.2.0.v201005080500" /> |
| <iu id="org.apache.commons.io" version="2.0.1.v201105210651" /> |
| |
| <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/3.7/" /> |
| </source> |
| <iu id="org.eclipse.equinox.executable.feature.group" version="3.5.0.v20110530-7P7NFUFFLWUl76mart" /> |
| <iu id="org.eclipse.platform.feature.group" version="3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK" /> |
| <iu id="org.eclipse.rcp.feature.group" version="3.7.1.r37x_v20110729-9DB5FmNFnFLSFCtLxnRfMqt15A4A" /> |
| <slicingOptions includeFeatures="true" followStrict="true"/> |
| </p2.mirror>--> |
| </target> |
| |
| |
| <target name="eclipse.sane" unless="eclipse.running"> |
| <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 -XX:MaxPermSize=512M" /> |
| <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> |