blob: fca933fa048634c014d7136091ed520b57fcf894 [file] [log] [blame]
<project
default="build"
basedir=".">
<fail
unless="wtp.builder.home" />
<property
file="${wtp.builder.home}/build.properties" />
<property environment="env" />
<!-- required to get proper value of doCreateFprojZips -->
<property
name="keyCfgFile"
value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
<echo
level="debug"
message="keyCfgFile: ${keyCfgFile}"/>
<property
file="${keyCfgFile}"/>
<!-- main -->
<target
name="build"
depends="getBaseBuilder">
<dirname
file="${ant.file}"
property="distribution.wtp.build.dir" />
<property
name="buildTargets"
value="${wtp.builder.home}/scripts/build/runbuild.xml" />
<echo
level="info"
message="invoking buildTargets: ${buildTargets} to build for each component" />
<ant
antfile="${buildTargets}">
<property
name="component"
value="xml" />
</ant>
<!-- extender (SDK) versions --><!--
<ant
antfile="${buildTargets}">
<property
name="component"
value="xml-sdk" />
</ant>
-->
<!-- JUnit test code --><!--
<ant
antfile="${buildTargets}">
<property
name="component"
value="xml.tests" />
<property
name="eclipseBuildFailOnError"
value="false" />
</ant>
-->
<!-- calling label.xml to createg label.properties file -->
<ant
antfile="${wtp.builder.home}/scripts/build/label.xml" />
<!-- package -->
<antcall target="package" />
</target>
<!-- invoking runbuild.xml targetting getBaseBuilder -->
<target
name="getBaseBuilder"
if="eclipse.builder.fetch">
<dirname
file="${ant.file}"
property="wtbuilder.dir" />
<property
name="buildTargets"
value="${wtp.builder.home}/scripts/build/runbuild.xml" />
<echo
level="info"
message="invoking buildTargets: ${buildTargets} -> getBaseBuilder" />
<ant
antfile="${buildTargets}"
target="getBaseBuilder" />
</target>
<target
name="package">
<!--
post, post packaging, for WTP ... "manually" assemble the
desired zips
-->
<antcall
target="combineArchives">
<param
name="corename"
value="" />
</antcall>
<!--
<antcall
target="combineArchives">
<param
name="corename"
value="-sdk" />
</antcall>
<antcall
target="combineArchives">
<param
name="corename"
value="-Automated-Tests" />
</antcall>
-->
<!--
<antcall
target="createNoOptionalZip">
<param
name="archiveName"
value="wtp-${buildLabel}.zip" />
<param
name="newarchiveName"
value="wtp-noop-${buildLabel}.zip" />
</antcall>
<antcall
target="createNoOptionalZip">
<param
name="archiveName"
value="wtp-sdk-${buildLabel}.zip" />
<param
name="newarchiveName"
value="wtp-sdk-noop-${buildLabel}.zip" />
</antcall>
-->
<!-- <antcall target="createFprojZips"/>
-->
</target>
<target
name="createNoOptionalZip">
<zip
destfile="${buildDirectory}/${buildLabel}/${newarchiveName}">
<zipfileset
src="${buildDirectory}/${buildLabel}/${archiveName}"
excludes="eclipse/plugins/org.eclipse.jst.ws.axis2*/**,eclipse/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport*/**,eclipse/plugins/org.eclipse.jst.pagedesigner*/**,eclipse/plugins/org.eclipse.jpt.eclipselink*/**,eclipse/features/org.eclipse.jst.ws.axis2tools*/**,eclipse/features/org.eclipse.jst.webpageeditor*/**,eclipse/features/org.eclipse.jst.jsf.apache.trinidad.tagsupport*/**,eclipse/features/org.eclipse.jpt.eclipselink*/**" />
</zip>
<ant
antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
target="createChecksums">
<property
name="buildDirectory"
value="${buildDirectory}" />
<property
name="buildLabel"
value="${buildLabel}" />
<property
name="archiveName"
value="${newarchiveName}" />
</ant>
</target>
<target
name="combineArchives">
<property
name="archiveName"
value="wtp${corename}-${buildLabel}.zip" />
<delete
dir="${buildDirectory}/tempforrezipping"
failonerror="false" />
<exec
dir="${buildDirectory}/${buildLabel}"
executable="unzip"
failonerror="false">
<arg
line="-o -qq wtp-wst${corename}-${buildLabel}.zip -d ${buildDirectory}/tempforrezipping" />
</exec>
<exec
dir="${buildDirectory}/${buildLabel}"
executable="unzip"
failonerror="false">
<arg
line="-o -qq wtp-jst${corename}-${buildLabel}.zip -d ${buildDirectory}/tempforrezipping" />
</exec>
<exec
dir="${buildDirectory}/${buildLabel}"
executable="unzip"
failonerror="false">
<arg
line="-o -qq wtp-jpt${corename}-${buildLabel}.zip -d ${buildDirectory}/tempforrezipping" />
</exec>
<zip
destfile="${buildDirectory}/${buildLabel}/${archiveName}"
basedir="${buildDirectory}/tempforrezipping" />
<delete
dir="${buildDirectory}/tempforrezipping"
failonerror="false" />
<ant
antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
target="createChecksums">
<property
name="buildDirectory"
value="${buildDirectory}" />
<property
name="buildLabel"
value="${buildLabel}" />
<property
name="archiveName"
value="${archiveName}" />
</ant>
</target>
<!-- Handles packaging of individual Faceted Project Framework distributions. -->
<target name="createFprojZips" if="doCreateFprojZips">
<delete file="${buildDirectory}/${buildLabel}/wtp-common-fproj-${buildLabel}.zip" failonerror="false"/>
<zip destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-${buildLabel}.zip">
<zipfileset src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
<include name="eclipse/features/org.eclipse.wst.common.fproj_*/**"/>
<include name="eclipse/plugins/org.eclipse.wst.common.project.facet.core_*.jar"/>
<include name="eclipse/plugins/org.eclipse.wst.common.project.facet.ui_*.jar"/>
</zipfileset>
</zip>
<delete file="${buildDirectory}/${buildLabel}/wtp-common-fproj-sdk-${buildLabel}.zip" failonerror="false"/>
<zip destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-sdk-${buildLabel}.zip">
<zipfileset src="${buildDirectory}/${buildLabel}/wtp-common-fproj-${buildLabel}.zip"/>
<zipfileset src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
<include name="eclipse/features/org.eclipse.wst.common.fproj.sdk_*/**"/>
<include name="eclipse/plugins/org.eclipse.wst.common.fproj.sdk_*.jar"/>
<include name="eclipse/plugins/org.eclipse.wst.common.project.facet.doc.api_*.jar"/>
<include name="eclipse/plugins/org.eclipse.wst.common.project.facet.core.source_*.jar"/>
<include name="eclipse/plugins/org.eclipse.wst.common.project.facet.ui.source_*.jar"/>
</zipfileset>
</zip>
<delete file="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-${buildLabel}.zip" failonerror="false"/>
<zip destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-${buildLabel}.zip">
<zipfileset src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
<include name="eclipse/features/org.eclipse.jst.common.fproj.enablement.jdt_*/**"/>
<include name="eclipse/plugins/org.eclipse.jst.common.project.facet.core_*.jar"/>
<include name="eclipse/plugins/org.eclipse.jst.common.project.facet.ui_*.jar"/>
</zipfileset>
</zip>
<delete file="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-sdk-${buildLabel}.zip" failonerror="false"/>
<zip destfile="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-sdk-${buildLabel}.zip">
<zipfileset src="${buildDirectory}/${buildLabel}/wtp-common-fproj-enablement-jdt-${buildLabel}.zip"/>
<zipfileset src="${buildDirectory}/${buildLabel}/wtp-sdk-${buildLabel}.zip">
<include name="eclipse/features/org.eclipse.jst.common.fproj.enablement.jdt.sdk_*/**"/>
<include name="eclipse/plugins/org.eclipse.jst.common.fproj.enablement.jdt.sdk_*.jar"/>
<include name="eclipse/plugins/org.eclipse.jst.common.project.facet.core.source_*.jar"/>
<include name="eclipse/plugins/org.eclipse.jst.common.project.facet.ui.source_*.jar"/>
</zipfileset>
</zip>
</target>
</project>