| <project |
| default="main" |
| basedir="."> |
| |
| <!-- |
| Required inputs: |
| |
| build.home |
| buildType |
| buildId |
| timestamp |
| env.BASEOS |
| env.BASEWS |
| env.BASEARCH |
| build.stream [optional] |
| build.committers [optional] |
| releng.tag [optional] |
| wtp.dir [optional] |
| clean [optional] |
| --> |
| |
| <!-- Note to be cross-platform, "environment variables" are only appropriate for |
| some variables, e.g. ones we set, since properties are case sensitive, even if |
| the environment variables on your operating system are not, e.g. it will |
| be ${env.Path} not ${env.PATH} on Windows --> |
| <property environment="env" /> |
| |
| |
| <target name="main"> |
| <property |
| file="${build.home}/${env.RELENG_BUILDER}/build.properties" /> |
| <property |
| file="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.api/api.properties" /> |
| <property |
| name="wtp.api" |
| value="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.api" /> |
| <property |
| name="apiRoot" |
| value="${build.home}/apiRoot" /> |
| <property |
| name="buildLabel" |
| value="${buildId}" /> |
| <delete |
| dir="${apiRoot}" |
| failonerror="false" /> |
| <mkdir dir="${apiRoot}" /> |
| <antcall target="getReleng" /> |
| <property |
| file="${apiRoot}/${env.RELENG}/maps/dependencies.properties" /> |
| <property |
| name="local.cache.dir" |
| value="${env.LOCAL_PREREQS_CACHE}" /> |
| <property |
| name="wtp.dir" |
| value="${local.cache.dir}" /> |
| <property |
| name="install.destination" |
| value="${apiRoot}" /> |
| <antcall target="getDependencies" /> |
| <condition |
| property="wtp-sdk" |
| value="wtp-sdk-${buildId}.zip" |
| else="wtp-sdk-${buildType}-${buildId}-${timestamp}.zip"> |
| <available file="${wtp.dir}/wtp-sdk-${buildId}.zip" /> |
| </condition> |
| <condition |
| property="wtp-tests" |
| value="wtp-Automated-Tests-${buildId}.zip" |
| else="wtp-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip"> |
| <available |
| file="${wtp.dir}/wtp-Automated-Tests-${buildId}.zip" /> |
| </condition> |
| <antcall target="run" /> |
| <antcall target="upload" /> |
| </target> |
| |
| <target name="getReleng"> |
| <property |
| name="releng.tag" |
| value="v${buildType}${timestamp}" /> |
| <cvs |
| cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools" |
| package="${env.RELENG}" |
| dest="${apiRoot}" |
| command="export" |
| tag="${releng.tag}" |
| quiet="${env.CVS_QUIET}" |
| reallyquiet="${env.CVS_REALLY_QUIET}" /> |
| </target> |
| |
| <target name="getDependencies"> |
| <antcall target="getAndInstall"> |
| <param |
| name="groupId" |
| value="eclipse" /> |
| </antcall> |
| <antcall target="getAndInstall"> |
| <param |
| name="groupId" |
| value="eclipseTestFramework" /> |
| <param |
| name="clean" |
| value="true" /> |
| </antcall> |
| <antcall target="getAndInstall"> |
| <param |
| name="groupId" |
| value="emf" /> |
| </antcall> |
| <antcall target="getAndInstall"> |
| <param |
| name="groupId" |
| value="gef" /> |
| </antcall> |
| <antcall target="getAndInstall"> |
| <param |
| name="groupId" |
| value="dtp" /> |
| </antcall> |
| <antcall target="getAndInstall"> |
| <param |
| name="groupId" |
| value="tomcat.5" /> |
| </antcall> |
| <antcall target="getAndInstall"> |
| <param |
| name="groupId" |
| value="jonas.4" /> |
| </antcall> |
| <antcall target="getAndInstall"> |
| <param |
| name="groupId" |
| value="oagis.release" /> |
| </antcall> |
| <antcall target="getAndInstall"> |
| <param |
| name="groupId" |
| value="oagis.wsdl" /> |
| </antcall> |
| |
| <!-- this appears to be pretty explict hard coding for windows machines. |
| I wonder why the usual "get dependencies" methods would not work? |
| --> |
| <antcall target="get"> |
| <param |
| name="groupId" |
| value="eclipse" /> |
| <param |
| name="baseos" |
| value="win32" /> |
| <param |
| name="basews" |
| value="win32" /> |
| <param |
| name="basearch" |
| value="x86" /> |
| </antcall> |
| |
| |
| <antcall target="get"> |
| <param |
| name="groupId" |
| value="tptp" /> |
| </antcall> |
| <mkdir dir="${apiRoot}/piagent" /> |
| <condition property="isLinux"> |
| <equals |
| arg1="${baseos}" |
| arg2="linux" /> |
| </condition> |
| <antcall target="setupPIAgent.linux" /> |
| <antcall target="setupPIAgent.win32" /> |
| <antcall target="getAndInstallWTP"> |
| <param |
| name="file" |
| value="wtp-sdk-${buildId}.zip" /> |
| </antcall> |
| <antcall target="getAndInstallWTP"> |
| <param |
| name="file" |
| value="wtp-sdk-${buildType}-${buildId}-${timestamp}.zip" /> |
| </antcall> |
| <antcall target="getAndInstallWTP"> |
| <param |
| name="file" |
| value="wtp-Automated-Tests-${buildId}.zip" /> |
| </antcall> |
| <antcall target="getAndInstallWTP"> |
| <param |
| name="file" |
| value="wtp-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip" /> |
| </antcall> |
| <delete file="${local.cache.dir}/wtp-apiscanner.zip" /> |
| <get |
| src="http://download.eclipse.org/webtools/downloads/wtp-apiscanner.zip" |
| dest="${local.cache.dir}/wtp-apiscanner.zip" /> |
| <unzip |
| src="${local.cache.dir}/wtp-apiscanner.zip" |
| dest="${apiRoot}" /> |
| </target> |
| |
| <target name="get"> |
| <property |
| name="dependencyTargets" |
| value="${build.home}/${env.RELENG_BUILDER}/scripts/dependency/build.xml" /> |
| <ant |
| antfile="${dependencyTargets}" |
| target="checkDependency"> |
| <property |
| name="groupId" |
| value="${groupId}" /> |
| </ant> |
| </target> |
| |
| <target name="getAndInstall"> |
| <property |
| name="dependencyTargets" |
| value="${build.home}/${env.RELENG_BUILDER}/scripts/dependency/build.xml" /> |
| <ant |
| antfile="${dependencyTargets}" |
| target="checkDependency"> |
| <property |
| name="groupId" |
| value="${groupId}" /> |
| </ant> |
| <ant |
| antfile="${dependencyTargets}" |
| target="installDependency"> |
| <property |
| name="groupId" |
| value="${groupId}" /> |
| </ant> |
| </target> |
| |
| <target name="getAndInstallWTP"> |
| <available |
| file="${wtp.dir}/${file}" |
| property="file.exists" /> |
| <antcall target="getWTP" /> |
| <available |
| file="${wtp.dir}/${file}" |
| property="file.exists" /> |
| <antcall target="installWTP" /> |
| </target> |
| |
| <target name="getWTP"> |
| <condition |
| property="file.url.1" |
| value="http://download.eclipse.org/webtools/committers" |
| else="http://download.eclipse.org/webtools/downloads"> |
| <isset property="build.committers" /> |
| </condition> |
| <condition |
| property="file.url" |
| value="${file.url.1}/drops/${build.stream}/${buildType}-${buildId}-${timestamp}" |
| else="${file.url.1}/drops/${buildType}-${buildId}-${timestamp}"> |
| <isset property="build.stream" /> |
| </condition> |
| <antcall target="getWTP2" /> |
| </target> |
| |
| <target |
| name="getWTP2" |
| unless="file.exists"> |
| <property |
| name="file.url" |
| value="http://download.eclipse.org/webtools/downloads/drops/${build.stream}/${buildType}-${buildId}-${timestamp}" /> |
| <mkdir dir="${wtp.dir}" /> |
| <get |
| dest="${wtp.dir}/${file}" |
| src="${file.url}/${file}" |
| ignoreerrors="true" /> |
| </target> |
| |
| <target |
| name="installWTP" |
| if="file.exists"> |
| <unzip |
| src="${wtp.dir}/${file}" |
| dest="${install.destination}" |
| overwrite="true" /> |
| </target> |
| |
| <target |
| name="setupPIAgent.linux" |
| if="isLinux"> |
| <unzip |
| src="${local.cache.dir}/${tptp.file.linux-gtk-x86}" |
| dest="${apiRoot}/piagent"> |
| <patternset> |
| <include name="lib/*" /> |
| </patternset> |
| </unzip> |
| <move |
| todir="${apiRoot}/piagent" |
| flatten="true"> |
| <fileset dir="${apiRoot}/piagent/lib" /> |
| </move> |
| </target> |
| |
| <target |
| name="setupPIAgent.win32" |
| unless="isLinux"> |
| <unzip |
| src="${local.cache.dir}/${tptp.file.win32-win32-x86}" |
| dest="${apiRoot}/piagent"> |
| <patternset> |
| <include name="bin/*" /> |
| </patternset> |
| </unzip> |
| <move |
| todir="${apiRoot}/piagent" |
| flatten="true"> |
| <fileset dir="${apiRoot}/piagent/bin" /> |
| </move> |
| </target> |
| |
| <target name="run"> |
| <cvs |
| cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools" |
| package="releng.wtptools/api/adopter_usages" |
| dest="${apiRoot}" |
| command="export" |
| tag="HEAD" /> |
| <mkdir dir="${apiRoot}/adopters" /> |
| <antcall target="runEclipseApp"> |
| <param |
| name="application" |
| value="org.eclipse.wtp.releng.tools.component.core.APIRefCompatibilityScanner" /> |
| <param |
| name="vmargs" |
| value="-Dsrc=${local.cache.dir}/${wtp-sdk},${local.cache.dir}/${eclipse.file.win32-win32-x86},${local.cache.dir}/${emf.file},${local.cache.dir}/${gef.file},${local.cache.dir}/${dtp.file} -Duse=${apiRoot}/releng.wtptools/api/adopter_usages -DoutputDir=${apiRoot}/adopters -Xmx512M" /> |
| </antcall> |
| <copy |
| tofile="${apiRoot}/apiresults/api-ref-compatibility.html" |
| file="${apiRoot}/adopters/api-ref-compatibility.html" /> |
| <copy |
| tofile="${apiRoot}/apiresults/api-ref-compatibility.xml" |
| file="${apiRoot}/adopters/api-ref-compatibility.xml" /> |
| |
| <antcall target="runEclipseApp"> |
| <param |
| name="application" |
| value="org.eclipse.wtp.releng.tools.component.core.Java2API" /> |
| <param |
| name="vmargs" |
| value="-Dsrc=${local.cache.dir}/${eclipse.file.win32-win32-x86} -DoutputDir=${apiRoot}/api-eclipse -Dexcludes=.*internal.*" /> |
| </antcall> |
| <antcall target="runEclipseApp"> |
| <param |
| name="application" |
| value="org.eclipse.wtp.releng.tools.component.core.Java2API" /> |
| <param |
| name="vmargs" |
| value="-Dsrc=${local.cache.dir}/${emf.file} -DoutputDir=${apiRoot}/api-emf -Dexcludes=.*internal.*" /> |
| </antcall> |
| <antcall target="runEclipseApp"> |
| <param |
| name="application" |
| value="org.eclipse.wtp.releng.tools.component.core.Java2API" /> |
| <param |
| name="vmargs" |
| value="-Dsrc=${local.cache.dir}/${gef.file} -DoutputDir=${apiRoot}/api-gef -Dexcludes=.*internal.*" /> |
| </antcall> |
| <antcall target="runEclipseApp"> |
| <param |
| name="application" |
| value="org.eclipse.wtp.releng.tools.component.core.Java2API" /> |
| <param |
| name="vmargs" |
| value="-Dsrc=${local.cache.dir}/${dtp.file} -DoutputDir=${apiRoot}/api-dtp -Dexcludes=.*internal.*" /> |
| </antcall> |
| <antcall target="runEclipseApp"> |
| <param |
| name="application" |
| value="org.eclipse.wtp.releng.tools.component.core.Java2API" /> |
| <param |
| name="vmargs" |
| value="-Dsrc=${local.cache.dir}/${wtp-sdk} -DoutputDir=${apiRoot}/api-wtp" /> |
| </antcall> |
| |
| <antcall target="runJavaMain"> |
| <param |
| name="classname" |
| value="org.eclipse.wtp.releng.tools.component.api.violation.APIViolationScanner" /> |
| <param |
| name="args" |
| value="-src ${local.cache.dir}/${wtp-sdk} -api ${apiRoot}/api-eclipse ${apiRoot}/api-emf ${apiRoot}/api-gef ${apiRoot}/api-dtp -outputDir ${apiRoot}/apiresults -html -includes org.eclipse.* -excludes org.eclipse.wst.* org.eclipse.jst.* org.eclipse.jem.* org.eclipse.jpt.* -debug" /> |
| </antcall> |
| |
| <antcall target="runJavaMain"> |
| <param |
| name="classname" |
| value="org.eclipse.wtp.releng.tools.component.api.API2ComponentAPI" /> |
| <param |
| name="args" |
| value="-src ${local.cache.dir}/${wtp-sdk} -api ${local.cache.dir}/${wtp-sdk} -outputDir ${apiRoot}/apiresults -html" /> |
| </antcall> |
| |
| <antcall target="runEclipseApp"> |
| <param |
| name="application" |
| value="org.eclipse.wtp.releng.tools.component.core.JavadocScanner" /> |
| <param |
| name="vmargs" |
| value="-Dsrc=${local.cache.dir}/${wtp-sdk} -DoutputDir=${apiRoot}/apiresults -Dapi=${local.cache.dir}/${wtp-sdk} -Dexcludes=.*internal.* -DskipAPIGen=true -Dhtml=true" /> |
| </antcall> |
| |
| <antcall target="runJavaMain"> |
| <param |
| name="classname" |
| value="org.eclipse.wtp.releng.tools.component.api.violation.NonAPIDependencyScanner" /> |
| <param |
| name="args" |
| value="-src ${local.cache.dir}/${wtp-sdk} -api ${local.cache.dir}/${wtp-sdk} -outputDir ${apiRoot}/apiresults -refapi ${apiRoot}/api-eclipse ${apiRoot}/api-emf ${apiRoot}/api-gef ${apiRoot}/api-dtp -includes org.eclipse.* -skipAPIGen" /> |
| </antcall> |
| |
| <mkdir dir="${apiRoot}/results/consolelogs" /> |
| <copy |
| todir="${apiRoot}" |
| overwrite="true"> |
| <fileset |
| dir="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.tests/testScripts" /> |
| </copy> |
| <copy |
| file="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.api/testScripts/test.xml" |
| tofile="${apiRoot}/test.xml" |
| overwrite="true" /> |
| <ant |
| antfile="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.tests/build.xml" |
| target="runTestEclipse"> |
| <property |
| name="testRoot" |
| value="${apiRoot}" /> |
| <property |
| name="testTarget" |
| value="all" /> |
| </ant> |
| <antcall target="runJavaMain"> |
| <param |
| name="classname" |
| value="org.eclipse.wtp.releng.tools.component.CodeCoverageScanner" /> |
| <param |
| name="args" |
| value="-api ${local.cache.dir}/${wtp-sdk} -src ${local.cache.dir}/${wtp-sdk} ${local.cache.dir}/${wtp-tests} ${local.cache.dir}/${wtp-wst-tests} ${local.cache.dir}/${wtp-jst-tests} -trcxml ${apiRoot}/apiresults/trcxml -outputDir ${apiRoot}/apiresults -skipAPIGen -html" /> |
| </antcall> |
| |
| <cvs |
| cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools" |
| package="releng.wtptools/api/api_progress" |
| dest="${apiRoot}" |
| command="export" |
| tag="HEAD" /> |
| <antcall target="runJavaMain"> |
| <param |
| name="classname" |
| value="org.eclipse.wtp.releng.tools.component.api.progress.APIProgressScanner" /> |
| <param |
| name="args" |
| value="-api ${local.cache.dir}/${wtp-sdk} -src ${local.cache.dir}/${wtp-sdk} -outputDir ${apiRoot}/apiresults -progressDir ${apiRoot}/releng.wtptools/api/api_progress/2.0 -timestamp ${timestamp} -excludes .*infopop .*doc.isv .*doc.user .*source org.eclipse.wst org.eclipse.jst org.eclipse.jem org.eclipse.jpt" /> |
| </antcall> |
| |
| <antcall target="runJavaMain"> |
| <param |
| name="classname" |
| value="org.eclipse.wtp.releng.tools.component.CodeCoverageScanner" /> |
| <param |
| name="args" |
| value="-api ${apiRoot}/api-wtp -src ${local.cache.dir}/${wtp-sdk} ${local.cache.dir}/${wtp-tests} ${local.cache.dir}/${wtp-wst-tests} ${local.cache.dir}/${wtp-jst-tests} -trcxml ${apiRoot}/apiresults/trcxml -outputDir ${apiRoot}/apiresults/full_test_coverage -html -includeAllTC -title Test_Coverage_Report" /> |
| </antcall> |
| </target> |
| |
| <target name="runEclipseApp"> |
| <property |
| name="vmargs" |
| value="" /> |
| <java |
| jar="${apiRoot}/eclipse/plugins/org.eclipse.equinox.launcher_*.jar" |
| fork="true" |
| failonerror="true" |
| timeout="3600000" |
| dir="${apiRoot}"> |
| <jvmarg value="-Dosgi.ws=${env.BASEWS}" /> |
| <jvmarg value="-Dosgi.os=${env.BASEOS}" /> |
| <jvmarg value="-Dosgi.arch=${env.BASEARCH}" /> |
| <jvmarg value="-Xmx512M" /> |
| <jvmarg line="${vmargs}" /> |
| <arg value="-application" /> |
| <arg value="${application}" /> |
| </java> |
| </target> |
| |
| <target name="runJavaMain"> |
| <java |
| fork="true" |
| classname="${classname}" |
| failonerror="false" |
| timeout="3600000" |
| dir="${apiRoot}"> |
| <classpath> |
| <fileset dir="${apiRoot}/eclipse/plugins"> |
| <include |
| name="**/org.eclipse.wtp.releng.tools.component.core*.jar" /> |
| </fileset> |
| <fileset dir="${apiRoot}/lib"> |
| <include |
| name="**/org.eclipse.core.contenttype*.jar" /> |
| <include name="**/org.eclipse.core.jobs*.jar" /> |
| <include name="**/org.eclipse.core.resources*.jar" /> |
| <include name="**/org.eclipse.core.runtime*.jar" /> |
| <include name="**/org.eclipse.equinox*.jar" /> |
| <include name="**/org.eclipse.jdt.core*.jar" /> |
| <include name="**/org.eclipse.jface.text*.jar" /> |
| <include name="**/org.eclipse.osgi*.jar" /> |
| <include name="**/org.eclipse.text*.jar" /> |
| <include |
| name="**/org.eclipse.equinox.launcher_*.jar" /> |
| </fileset> |
| </classpath> |
| <jvmarg value="-Xmx512M" /> |
| <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}" /> |
| <arg line="${args}" /> |
| </java> |
| </target> |
| |
| <target |
| name="upload" |
| if="login"> |
| <mkdir dir="${build.home}/archives" /> |
| <zip |
| destfile="${build.home}/archives/${buildType}-${buildId}-${timestamp}.zip" |
| basedir="${build.home}/apiRoot/apiresults" /> |
| <condition |
| property="upload.path.1" |
| else="${login}@build.eclipse.org:~/downloads/webtools/downloads" |
| value="${login}@build.eclipse.org:~/downloads/webtools/committers"> |
| <isset property="build.committers" /> |
| </condition> |
| <condition |
| property="upload.path" |
| else="${upload.path.1}/drops/${buildType}-${buildId}-${timestamp}" |
| value="${upload.path.1}/drops/${build.stream}/${buildType}-${buildId}-${timestamp}"> |
| <isset property="build.stream" /> |
| </condition> |
| <exec |
| executable="scp" |
| dir="${build.home}"> |
| <arg line="-r ./apiRoot/apiresults ${upload.path}" /> |
| </exec> |
| </target> |
| |
| <target |
| name="clean" |
| if="clean"> |
| <property |
| file="${build.home}/${env.RELENG_BUILDER}/build.properties" /> |
| <property |
| name="local.cache.dir" |
| value="${env.LOCAL_PREREQS_CACHE}" /> |
| <property |
| name="apiRoot" |
| value="${build.home}/apiRoot" /> |
| <property |
| name="wtp.dir" |
| value="${local.cache.dir}" /> |
| <delete |
| dir="${apiRoot}" |
| failonerror="false" /> |
| <delete failonerror="false"> |
| <fileset |
| dir="${wtp.dir}" |
| includes="wtp-*" /> |
| </delete> |
| </target> |
| |
| </project> |