| <project default="run"> |
| <target name="init"> |
| |
| <!-- common releng helper scripts --> |
| <property name="helper" value="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/buildAllHelper.xml" /> |
| |
| <property name="warningsToCheck" value="assertIdentifier,charConcat,constructorName,deprecation,discouraged,finally,forbidden,intfAnnotation,intfNonInherited,maskedCatchBlocks,noEffectAssign,pkgDefaultMethod,staticReceiver,suppress,typeHiding,unusedLabel,unusedLocal,unusedPrivate,uselessTypeCheck,varargsCast,warningToken,nls" /> |
| <echo message="Set compilerArgs = '-enableJavadoc -encoding ISO-8859-1 -warn:${warningsToCheck}'"/> |
| <property name="compilerArg" value="-enableJavadoc -encoding ISO-8859-1 -warn:${warningsToCheck}" /> |
| |
| <property name="commonScriptsDir" value="${basedir}/../org.eclipse.modeling.common.releng/scripts" /> |
| |
| <!-- TODO: set correct source and target levels here --> |
| <echo message="Set javacSource and javacTarget = 1.5"/> |
| <property name="javacSource" value="1.5" /> |
| <property name="javacTarget" value="1.5" /> |
| |
| <path id="bc"> |
| <fileset dir="${java.home}/lib"> |
| <include name="*.jar" /> |
| </fileset> |
| </path> |
| <property name="bootclasspath" refid="bc" /> |
| |
| <!-- TODO: if using JDK1.4, comment out these lines --> |
| <echo message="Set J2SE-1.5 = ${bootclasspath}"/> |
| <property name="J2SE-1.5" value="${bootclasspath}"/> |
| <condition property="bundleBootClasspath" value="${J2SE-1.5}"><isset property="J2SE-1.5"/></condition> |
| <condition property="bundleJavacSource" value="1.5"><isset property="J2SE-1.5"/></condition> |
| <condition property="bundleJavacTarget" value="1.5"><isset property="J2SE-1.5"/></condition> |
| |
| <property name="buildingOSGi" value="true" /> |
| <property name="collectingFolder" value="eclipse" /> |
| <property name="archivePrefix" value="eclipse" /> |
| |
| <!-- Reduce the amount of info in the build log --> |
| <property name="javacVerbose" value="false" /> |
| |
| <property name="buildDirectory" location="${basedir}/../src/eclipse" /> |
| <property file="${basedir}/repoInfo.properties" /> |
| <property name="testBase" location="${buildDirectory}/../testing" /> |
| <available file="${buildDirectory}/label.properties" property="label.properties.exists" /> |
| <ant target="create.label.properties" antfile="${helper}" /> |
| |
| <property name="forceContextQualifier" value="v${timestamp}" /> |
| <echo file="${buildDirectory}/label.properties" append="true"> |
| forceContextQualifier=${forceContextQualifier} |
| </echo> |
| <echo message="forceContextQualifier=${forceContextQualifier}" /> |
| <property file="${buildDirectory}/label.properties" /> |
| |
| <echo message="buildAll.xml properties:"/> |
| <echo message="basedir = ${basedir}"/> |
| |
| <!-- load a value for ${subprojectName} --> |
| <property name="buildConfigFile" value="${basedir}/../build.cfg"/> |
| <available file="${buildConfigFile}" type="file" property="buildConfigIsAvailable" /> |
| <fail message="Can't load build properties from ${buildConfigFile}" unless="buildConfigIsAvailable"/> |
| <property file="${buildConfigFile}" /> |
| |
| <echo message="buildVer = ${buildVer}"/> |
| <echo message="subprojectName = ${subprojectName}"/> |
| |
| <!-- <echo message="Base OS: ${baseos}; Base Window System: ${basews}"/> --> |
| <condition property="isWindows"> |
| <equals arg1="${baseos}.${basews}" arg2="win32.win32" /> |
| </condition> |
| <condition property="isLinuxGTK"> |
| <equals arg1="${baseos}.${basews}" arg2="linux.gtk" /> |
| </condition> |
| <condition property="isLinuxMotif"> |
| <equals arg1="${baseos}.${basews}" arg2="linux.motif" /> |
| </condition> |
| |
| <property name="masterZip" value="${projectName}-${subprojectName}-Master-incubation-${buildAlias}.zip" /> |
| <property name="allZip" value="${projectName}-${subprojectName}-ALL-incubation-${buildAlias}.zip" /> |
| <property name="SDKZip" value="${projectName}-${subprojectName}-SDK-incubation-${buildAlias}.zip" /> |
| |
| <property name="java15-home" value="/opt/sun-java2-5.0" /> |
| <property name="stagingHome" value="/home/data/httpd/download-staging.priv" /> |
| <property name="projectPath" value="modeling/mdt" /> |
| <!-- user with write perms in staging dir & permission to run /usr/bin/sign --> |
| <property name="buildServerUser" value="nickb@build.eclipse.org" /> |
| <property name="sign" value="true" /> |
| |
| |
| </target> |
| |
| <target name="buildAll"> |
| <macrodef name="echo-timestamp"> |
| <sequential> |
| <ant target="-timestamp" inheritAll="false" antfile="${helper}" /> |
| </sequential> |
| </macrodef> |
| <echo-timestamp /> |
| |
| <!-- build Master Zip, missing jarred features --> |
| <ant antfile="build.xml" target="main"> |
| <property name="component" value="builder/sdk" /> |
| </ant> |
| |
| <echo-timestamp /> |
| <ant target="signMasterZip" antfile="${helper}"> |
| <property name="mailStatus" value="nomail" /> |
| </ant> |
| |
| <!-- Unpack jars to produce SDK zip with mix of folders & jars --> |
| <ant target="unpackUpdateJarsAndRepack" antfile="${helper}"> |
| <property name="sourceZip" value="${buildDirectory}/${buildLabel}/${masterZip}" /> |
| <property name="targetZip" value="${buildDirectory}/${buildLabel}/${allZip}" /> |
| </ant> |
| |
| <!-- remove rootfiles --> |
| <ant target="removeRootFilesFromMaster" antfile="${helper}" /> |
| |
| <!-- pack the master zip --> |
| <ant target="packMasterZip" antfile="${helper}" /> |
| |
| <echo-timestamp /> |
| |
| <!-- duplicate Master as SDK --> |
| <zip destfile="${buildDirectory}/${buildLabel}/${SDKZip}" update="true" duplicate="preserve"> |
| <zipfileset |
| src="${buildDirectory}/${buildLabel}/${allZip}" |
| dirmode="775" filemode="664" |
| id="SDKZipFiles" |
| excludes="**/*.pack.gz, **/pack.properties, **/features/*.jar" /> |
| </zip> |
| |
| <!-- build runtime --> |
| <zip destfile="${buildDirectory}/${buildLabel}/${projectName}-${subprojectName}-runtime-incubation-${buildAlias}.zip" update="true" duplicate="preserve"> |
| <zipfileset |
| src="${buildDirectory}/${buildLabel}/${SDKZip}" |
| dirmode="775" filemode="664" |
| excludes=" |
| **/org.eclipse.*.example*, |
| **/org.eclipse.*.example*/**, |
| **/org.eclipse.*.sdk*, |
| **/org.eclipse.*.sdk*/**, |
| **/org.eclipse.*.doc*, |
| **/org.eclipse.*.doc*/*, |
| **/org.eclipse.*.source*, |
| **/org.eclipse.*.source*/**"> |
| |
| <include name="**/org.eclipse.uml2tools*" /> |
| <include name="**/org.eclipse.uml2tools*/**" /> |
| <include name="**/org.eclipse.uml2tools*/**/**" /> |
| <include name="**/org.eclipse.uml2.diagram*" /> |
| <include name="**/org.eclipse.uml2.diagram*/**" /> |
| <include name="**/org.eclipse.uml2.diagram*/**/**" /> |
| |
| <exclude name="**/org.eclipse.uml2.diagram.codegen*" /> |
| <exclude name="**/org.eclipse.uml2.diagram.def*" /> |
| <exclude name="**/org.eclipse.uml2tools.def*" /> |
| <exclude name="**/org.eclipse.uml2tools.def*/**" /> |
| </zipfileset> |
| <zipfileset |
| src="${buildDirectory}/${buildLabel}/${SDKZip}" |
| dirmode="775" filemode="664" |
| id="rootfiles" |
| includes="**/eclipse/epl-v10.html, **/eclipse/notice.html" /> |
| </zip> |
| |
| <!-- build examples --> |
| <zip destfile="${buildDirectory}/${buildLabel}/${projectName}-${subprojectName}-examples-incubation-${buildAlias}.zip" update="true" duplicate="preserve"> |
| <zipfileset |
| src="${buildDirectory}/${buildLabel}/${allZip}" dirmode="775" filemode="664"> |
| <include name="**/org.eclipse.*.example*" /> |
| <include name="**/org.eclipse.*.example*/**" /> |
| <include name="**/org.eclipse.*.example*/**/**" /> |
| </zipfileset> |
| <zipfileset refid="rootfiles" /> |
| </zip> |
| |
| <!-- remove .master features from Master zip as they're not required on the update site --> |
| <zip destfile="${buildDirectory}/${buildLabel}/${masterZip}.tmp" update="true"> |
| <zipfileset src="${buildDirectory}/${buildLabel}/${masterZip}" |
| dirmode="775" filemode="664" |
| excludes="**/*.master_*, **/*.master_*/**" /> |
| </zip> |
| <move |
| file="${buildDirectory}/${buildLabel}/${masterZip}.tmp" |
| tofile="${buildDirectory}/${buildLabel}/${masterZip}" |
| overwrite="true" /> |
| |
| <echo-timestamp /> |
| <!-- ${allZip} is no longer needed, and we don't publish it --> |
| <delete file="${buildDirectory}/${buildLabel}/${allZip}" |
| failonerror="true" |
| quiet="true" /> |
| |
| <echo-timestamp /> |
| |
| <ant antfile="build.xml" target="main"> |
| <property name="component" value="builder/tests" /> |
| </ant> |
| <ant target="generateDigests" antfile="${helper}" /> |
| </target> |
| |
| <target name="run" depends="init"> |
| <antcall target="buildAll" /> |
| <ant target="test" antfile="${helper}" /> |
| <ant target="publish" antfile="${helper}" /> |
| <ant target="cleanUp" antfile="${helper}" /> |
| </target> |
| |
| <target name="runTestsOnly" depends="init"> |
| <antcall target="runTestsOnlySetup" /> |
| <ant target="test" antfile="${helper}" /> |
| <ant target="publish" antfile="${helper}" /> |
| <ant target="cleanUp" antfile="${helper}" /> |
| </target> |
| |
| <!-- make sure everything's in the right place(s) --> |
| <target name="runTestsOnlySetup"> |
| <delete dir="${buildDirectory}" /> |
| <mkdir dir="${buildDirectory}/${buildLabel}" /> |
| <copy todir="${buildDirectory}/${buildLabel}"> |
| <fileset dir="${buildDirectory}/.."> |
| <include name="**/*.zip" /> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="runWithoutTest" depends="init"> |
| <antcall target="buildAll" /> |
| <ant target="publish" antfile="${helper}" /> |
| <ant target="cleanUp" antfile="${helper}" /> |
| </target> |
| |
| <target name="runAll" depends="init"> |
| <antcall target="buildAll" /> |
| <antcall target="test" /> |
| <antcall target="publish" /> |
| </target> |
| |
| <target name="build" depends="init"> |
| <antcall target="buildAll" /> |
| <ant target="cleanUp" antfile="${helper}" /> |
| </target> |
| |
| </project> |