blob: 8117db9d1257e5dfec68f9a79a77a1740c7f51f5 [file] [log] [blame]
<project
name="maptasks"
default="noDefault"
basedir=".">
<!-- = = = standard properties pattern = = = -->
<!--
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"/>
<!--
Let users override standard properties, if desired. If
directory, file, or some properties do not exist, then standard
properties will be used.
-->
<property
file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/>
<property
name="cvsProtocol"
value="${env.BUILD_CVS_WRITE_PROTOCOL}"/>
<property
name="cvsUser"
value="${env.BUILD_CVS_WRITE_USER}"/>
<property
name="cvsServer"
value="${env.BUILD_CVS_SERVER}"/>
<property
name="cvsRoot"
value="${env.BUILD_CVS_ROOT}"/>
<!-- *** assign repo info -->
<property
name="mapCvsRoot"
value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}"/>
<echo
level="info"
message="mapCvsRoot: ${mapCvsRoot}"/>
<!--
fetchAllMaps is pure convenience. If you are tempted to modify
fetchAllMaps, chances are you should just use more specific
calls to map util in your own code
-->
<target
name="fetchAllMaps">
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENG}"/>
<property
name="mapTag"
value="${mapVersionTag}"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENGCOMMON}"/>
<property
name="mapTag"
value="${mapVersionTag}"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENGSERVERTOOLS}"/>
<property
name="mapTag"
value="${mapVersionTag}"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENGSOURCEEDITING}"/>
<property
name="mapTag"
value="${mapVersionTag}"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENGWEBSERVICES}"/>
<property
name="mapTag"
value="${mapVersionTag}"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENGJSF}"/>
<property
name="mapTag"
value="${releng.jsf-mapVersionTag}"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENGDALI}"/>
<property
name="mapTag"
value="${releng.dali-mapVersionTag}"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENGEJBTOOLS}"/>
<property
name="mapTag"
value="${mapVersionTag}"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENGJEETOOLS}"/>
<property
name="mapTag"
value="${mapVersionTag}"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENGINCUBATORVEX}"/>
<property
name="mapTag"
value="${mapVersionTag}"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENGJAXWS}"/>
<property
name="mapTag"
value="${mapVersionTag}"/>
</ant>
<ant
antfile="${wtp.builder.home}/scripts/build/maptasks.xml"
target="maputil">
<property
name="mapcomponent"
value="${env.RELENGPAVE}"/>
<property
name="mapTag"
value="${mapVersionTag}"/>
</ant>
</target>
<target
name="maputil">
<!--
remember, for now, the check out and tagging operations are
seperate, since may have already been checked out, but not
tagged
-->
<fail
unless="mapcomponent"/>
<fail
unless="mapTag"/>
<antcall
target="checkOutMaps">
<param
name="cvsPackage"
value="${mapcomponent}"/>
<param
name="versionTagParam"
value="${mapTag}"/>
</antcall>
<antcall
target="tagMapFiles">
<param
name="cvsPackage"
value="${mapcomponent}"/>
</antcall>
<antcall
target="tagMapFiles">
<param
name="cvsPackage"
value="${mapcomponent}"/>
</antcall>
<antcall
target="rewriteMaps">
<param
name="cvsPackage"
value="${mapcomponent}"/>
</antcall>
</target>
<!--
Check out the cvsPackage
-->
<target
name="checkOutMaps"
depends="checkLocal"
unless="mapsLocal">
<echo
level="debug"
message="mapCvsRoot: ${mapCvsRoot}"/>
<echo
level="info"
message="cvsPackage = ${cvsPackage} "/>
<echo
level="info"
message="versionTagParam: ${versionTagParam}"/>
<!-- if not set, fail. There are no safe assumptions. -->
<fail
unless="mapCvsRoot"/>
<fail
unless="cvsPackage"/>
<fail
unless="versionTagParam"/>
<fail
unless="buildDirectory"/>
<cvs
cvsRoot="${mapCvsRoot}"
package="${cvsPackage}"
dest="${buildDirectory}/maps"
tag="${versionTagParam}"
quiet="${env.CVS_QUIET}"
reallyquiet="${env.CVS_REALLY_QUIET}"/>
</target>
<!--
Tag Map Files mapCvsRoot
-->
<target
name="tagMapFiles"
depends="checktagMaps"
if="tagMaps">
<cvs
cvsRoot="${mapCvsRoot}"
dest="${buildDirectory}/maps/${cvsPackage}"
command="tag v${buildType}${timestamp}"
quiet="${env.CVS_QUIET}"
reallyquiet="${env.CVS_REALLY_QUIET}"/>
</target>
<!--
rewriteMaps tasks changes the
"standard" eclipse map protocol, user, and host name
Since this should not be required (or used) during production builds,
and since machine and user specific, a good place to define the value,
rewriteMapsLine, is in
${env.LOCAL_BUILD_PROPERTIES_DIR}/maptasks.properties
If rewriteMapsLine exists, it is assume it is desired to rewrite, and
the value of rewriteMapsLine will be used. It must be a complete replacement for
:pserver:anonymous@dev.eclipse.org:
such as
:ext:david_williams@dev.eclipse.org:
-->
<target
name="rewriteMaps"
if="rewriteMapsLine">
<echo message="rewriteMapsLine: ${rewriteMapsLine}" />
<replace
dir="${buildDirectory}/maps/${cvsPackage}"
token=":pserver:anonymous@dev.eclipse.org:"
value="${rewriteMapsLine}">
<include
name="**/*.map"/>
</replace>
</target>
<target
name="checktagMaps">
<condition
property="tagMaps">
<equals
arg1="${build.donottagmaps}"
arg2="false"/>
</condition>
<echo
level="info"
message="tagMaps: ${tagMaps}"/>
</target>
<target
name="checkLocal">
<condition
property="mapsLocal">
<available
file="${buildDirectory}/maps/${cvsPackage}"/>
</condition>
<echo
message="mapsLocal: ${mapsLocal}"/>
</target>
<!--
Default target
-->
<target
name="noDefault">
<echo
level="error"
message="You must specify a target when invoking this file"/>
</target>
</project>