| <project name="Build specific targets and properties" default="noDefault"> |
| |
| <!-- ===================================================================== --> |
| <!-- Run a given ${target} on all elements being built --> |
| <!-- Add on <ant> task for each top level element being built. --> |
| <!-- ===================================================================== --> |
| <property name="allElementsFile" value="${builder}/allElements.xml" /> |
| <import file="${allElementsFile}" /> |
| <target name="allElements"> |
| <antcall target="allElementsDelegator" /> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Check out map files from correct repository --> |
| <!-- Replace values for mapsCheckoutTag as desired. --> |
| <!-- ===================================================================== --> |
| <target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps"> |
| <cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" /> |
| </target> |
| |
| <target name="checkLocalMaps"> |
| <available property="skipMaps" file="${buildDirectory}/maps" /> |
| </target> |
| |
| <target name="clean" unless="noclean"> |
| <antcall target="allElements"> |
| <param name="target" value="cleanElement" /> |
| </antcall> |
| </target> |
| |
| <target name="gatherLogs"> |
| <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" /> |
| <antcall target="allElements"> |
| <param name="target" value="gatherLogs" /> |
| </antcall> |
| <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true"> |
| <fileset dir="${buildDirectory}/features"> |
| <include name="**/*.log.zip" /> |
| </fileset> |
| </unzip> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before setup --> |
| <!-- ===================================================================== --> |
| <target name="preSetup"> |
| <!-- tidy up before build to clean broken build --> |
| <antcall target="tidyup" /> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after generating the build scripts. --> |
| <!-- ===================================================================== --> |
| <target name="postGenerate"> |
| <antcall target="clean" /> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after the build is done. --> |
| <!-- ===================================================================== --> |
| <target name="postBuild"> |
| <antcall target="finish" /> |
| </target> |
| |
| <target name="assembleTarget"> |
| <property name="targetLocation" value="${buildDirectory}/${buildLabel}/target" /> |
| <property name="rap-feature" value="${buildDirectory}/${buildLabel}/org.eclipse.rap.runtime.sdk-${buildId}.zip" /> |
| |
| <unzip src="${rap-feature}" dest="${targetLocation}" /> |
| |
| <!-- checks if ICU base is available and fail otherwise --> |
| <pathconvert property="icuBaseAvailable" setonempty="false" pathsep=" "> |
| <path> |
| <fileset dir="${baseLocation}/plugins" includes="com.ibm.icu.base*" /> |
| </path> |
| </pathconvert> |
| <fail unless="icuBaseAvailable" message="ICU base is not available in base platform." /> |
| |
| <!-- zip target --> |
| <zip destfile="${buildDirectory}/${buildLabel}/${buildLabel}.zip"> |
| <fileset dir="${targetLocation}"> |
| </fileset> |
| </zip> |
| |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do to test the build results --> |
| <!-- ===================================================================== --> |
| <target name="runTests"> |
| <property name="src.tests" value="${buildDirectory}/plugins/org.eclipse.rap.rwt.test/" /> |
| <property name="host.tests" value="${buildDirectory}/plugins/org.eclipse.rap.rwt.test/@dot" /> |
| <property name="fragment.tests" value="${buildDirectory}/plugins/org.eclipse.rap.rwt.q07.test/@dot" /> |
| <property name="forms.tests" value="${buildDirectory}/plugins/org.eclipse.rap.ui.forms.test/@dot" /> |
| <property name="themes.tests" value="${buildDirectory}/plugins/org.eclipse.rap.rwt.themes.test/@dot" /> |
| <property name="reports.tests" value="${buildDirectory}/tests" /> |
| <mkdir dir="${reports.tests}" /> |
| <path id="cp"> |
| <pathelement location="${host.tests}" /> |
| <pathelement location="${fragment.tests}" /> |
| <pathelement location="${forms.tests}" /> |
| <pathelement location="${themes.tests}" /> |
| <fileset dir="${buildDirectory}/${buildLabel}/target/eclipse/plugins"> |
| <include name="**/*.jar" /> |
| </fileset> |
| <pathelement path="${buildDirectory}/plugins/org.eclipse.rap.rwt/lib/org.w3c.css.sac_1.3.jar" /> |
| <pathelement path="${buildDirectory}/plugins/org.eclipse.rap.rwt.testfixture/@dot" /> |
| <pathelement path="${buildDirectory}/plugins/org.eclipse.rap.rwt.test.mockup/@dot" /> |
| <pathelement path="${buildDirectory}/plugins/org.eclipse.rap.rwt.q07/@dot" /> |
| <pathelement path="${buildDirectory}/plugins/org.eclipse.rap.design.example/@dot" /> |
| <pathelement path="${buildDirectory}/plugins/org.eclipse.rap.rwt.test/lib/resource_manager_test.jar" /> |
| <fileset dir="${baseLocation}/plugins"> |
| <include name="org.junit_3*/junit.jar" /> |
| </fileset> |
| <pathelement path="${buildDirectory}/plugins/org.eclipse.rap.ui.forms/@dot" /> |
| </path> |
| |
| <!-- run rwt tests --> |
| <junit printsummary="yes" failureproperty="test.failed" fork="yes" forkmode="perTest"> |
| <classpath refid="cp" /> |
| <formatter type="xml" /> |
| <batchtest fork="yes" todir="${reports.tests}"> |
| <fileset dir="${host.tests}"> |
| <include name="**/*_Test.class" /> |
| </fileset> |
| <fileset dir="${fragment.tests}"> |
| <include name="**/*_Test.class" /> |
| </fileset> |
| <fileset dir="${forms.tests}"> |
| <include name="**/*_Test.class" /> |
| </fileset> |
| <fileset dir="${themes.tests}"> |
| <include name="**/*_Test.class" /> |
| </fileset> |
| </batchtest> |
| </junit> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do to publish the build results --> |
| <!-- ===================================================================== --> |
| <target name="publish"> |
| <property name="buildOuputDirectory" value="${outputDirectory}/${buildType}-${buildId}" /> |
| <property name="fBuildLocation" value="${buildDirectory}/${buildLabel}/" /> |
| <property name="reports.tests" value="${buildDirectory}/tests" /> |
| |
| <mkdir dir="${ouputDirectory}" /> |
| <mkdir dir="${buildOuputDirectory}" /> |
| |
| <!-- copy targets --> |
| <copy todir="${buildOuputDirectory}"> |
| <fileset dir="${fBuildLocation}"> |
| <include name="*runtime*.zip" /> |
| </fileset> |
| </copy> |
| |
| <!-- copy test results --> |
| <copy todir="${buildOuputDirectory}/tests"> |
| <fileset dir="${reports.tests}" /> |
| </copy> |
| </target> |
| |
| <target name="tidyup"> |
| <echo message="Deleting all working resources" /> |
| <delete dir="${buildDirectory}" includeEmptyDirs="true" defaultexcludes="false" /> |
| </target> |
| |
| <target name="finish" depends="gatherLogs,assembleTarget,runTests,publish,tidyup"> |
| <fail if="test.failed" message="Test failed" /> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Default target --> |
| <!-- ===================================================================== --> |
| <target name="noDefault"> |
| <echo message="You must specify a target when invoking this file" /> |
| </target> |
| |
| <!-- not used targets --> |
| <target name="tagMapFiles" if="tagMaps"></target> |
| <target name="postSetup"></target> |
| <target name="preFetch"></target> |
| <target name="postFetch"></target> |
| <target name="preGenerate"></target> |
| <target name="preProcess"></target> |
| <target name="postProcess"></target> |
| <target name="preAssemble"></target> |
| <target name="postAssemble"></target> |
| <target name="prePackage"></target> |
| <target name="postPackage"></target> |
| </project> |