| <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" /> | |
| <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 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="lib" value="${basedir}/lib"/> | |
| <!-- required for signing & repackaging master zip into smaller zips --> | |
| <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/gmf" /> | |
| <!-- user with write perms in staging dir & permission to run /usr/bin/sign --> | |
| <property name="buildServerUser" value="nickb@build.eclipse.org" /> | |
| <property name="masterZip" value="${subprojectName}-Master-${buildAlias}.zip" /> | |
| <condition property="sign"> | |
| <or> | |
| <!-- want to enable/disable signing for a given build type? add/remove types here --> | |
| <equals arg1="${buildType}" arg2="I"/> | |
| <equals arg1="${buildType}" arg2="M"/> | |
| <equals arg1="${buildType}" arg2="S"/> | |
| <equals arg1="${buildType}" arg2="R"/> | |
| </or> | |
| </condition> | |
| </target> | |
| <target name="run" depends="init"> | |
| <antcall target="runAll" /> | |
| <ant target="cleanUp" antfile="${helper}"/> | |
| </target> | |
| <target name="runTestsOnly" depends="init"> | |
| <antcall target="runTestsOnlySetup" /> | |
| <ant target="test" antfile="${helper}"/> | |
| <ant target="publish" 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" /> | |
| <ant target="test" antfile="${helper}"/> | |
| <ant target="publish" antfile="${helper}"/> | |
| </target> | |
| <target name="build" depends="init"> | |
| <antcall target="buildAll" /> | |
| <ant target="cleanUp" antfile="${helper}"/> | |
| </target> | |
| <target name="buildAll" depends="init"> | |
| <macrodef name="build"> | |
| <attribute name="component"/> | |
| <attribute name="zip"/> | |
| <sequential> | |
| <!-- building component. creating component zip with jar --> | |
| <ant antfile="build.xml" target="main"> | |
| <property name="component" value="@{component}" /> | |
| </ant> | |
| </sequential> | |
| </macrodef> | |
| <build component="builder/notation" zip="gmf-notation-${buildAlias}.zip"/> | |
| <build component="builder/notation-sdk" zip="gmf-sdk-notation-${buildAlias}.zip"/> | |
| <build component="builder/tests" zip="gmf-tests-notation-${buildAlias}.zip"/> | |
| <ant target="signMasterZip" antfile="${helper}"> | |
| <property name="mailStatus" value="nomail" /> | |
| </ant> | |
| <ant target="packMasterZip" antfile="${helper}"/> | |
| <antcall target="updateZips"/> | |
| <!-- TODO: if necessary, you can copy files from the SDK into the runtime or examples zips here --> | |
| <!-- for example, see validation/buildAll.xml or cdo/buildAll.xml --> | |
| <!-- TODO: if necessary, you can remove 3rd party jars used at build time from the zips here --> | |
| <!-- for example, see cdo/buildAll.xml --> | |
| <!-- md5 files generation --> | |
| <exec executable="bash" dir="${buildDirectory}/${buildLabel}"> | |
| <arg line="${basedir}/../org.eclipse.modeling.common.releng/scripts/createZipCheckSum.sh" /> | |
| </exec> | |
| </target> | |
| <target name="updateZips" if="sign"> | |
| <!-- [233486] Update zip content with signed jars (note: temporary, as there must be a better way) --> | |
| <zip destfile="${buildDirectory}/${buildLabel}/gmf-sdk-notation-${buildAlias}.zip" update="true" duplicate="preserve"> | |
| <zipfileset | |
| src="${buildDirectory}/${buildLabel}/${masterZip}" | |
| dirmode="775" filemode="664" | |
| id="NotationZipFiles" | |
| excludes="**/*.pack.gz, | |
| **/pack.properties, | |
| **/features/*.jar" /> | |
| </zip> | |
| <zip destfile="${buildDirectory}/${buildLabel}/gmf-notation-${buildAlias}.zip" update="true" duplicate="preserve"> | |
| <zipfileset | |
| src="${buildDirectory}/${buildLabel}/${masterZip}" | |
| dirmode="775" filemode="664" | |
| id="NotationZipFiles" | |
| excludes="**/*.pack.gz, | |
| **/pack.properties, | |
| **/features/*.jar, | |
| **/features/*sdk*, | |
| **/plugins/*sdk*.jar, | |
| **/plugins/*.source_*.jar" /> | |
| </zip> | |
| </target> | |
| </project> |