imakerplugin/com.nokia.s60tools.imaker.tests.feature/build.xml
author dpodwall
Tue, 12 Jan 2010 13:17:53 -0600
changeset 0 61163b28edca
permissions -rw-r--r--
initial EPL conversion

<?xml version="1.0" encoding="UTF-8"?>
<project name="com.nokia.s60tools.imaker.tests.feature" default="build.update.jar" basedir=".">
	<property file="../common.properties" />
	
	<taskdef resource="eclipseTasks.properties" classpath="pdebuild-myant.jar"/>	
	<target name="init">
		<property name="feature.temp.folder" value="${basedir}/feature.temp.folder"/>
		<property name="feature.destination" value="${basedir}"/>
		<mkdir dir="${plugin.lib}"/>
	</target>

	<target name="all.plugins" depends="init">
		<ant antfile="build.xml" dir="../com.nokia.s60tools.imaker" target="${target}">
			<property name="arch" value="x86"/>
			<property name="ws" value="win32"/>
			<property name="os" value="win32"/>
		</ant>
		<ant antfile="build.xml" dir="../com.nokia.s60tools.imaker.tests" target="${target}">
			<property name="arch" value="x86"/>
			<property name="ws" value="win32"/>
			<property name="os" value="win32"/>
		</ant>
	</target>
	<target name="all.features" depends="init">
	</target>
	<target name="update.feature" depends="init">
	</target>

	<target name="all.children" depends="init,all.features,all.plugins,update.feature">
	</target>

	<target name="children" if="include.children">
		<antcall target="all.children"/>
	</target>

	<target name="build.jars" depends="init" description="Build all the jars for the feature: com.nokia.s60tools.imaker.tests.feature.">
		<antcall target="all.children">
			<param name="target" value="build.jars"/>
		</antcall>
	</target>

	<target name="build.sources" depends="init">
		<antcall target="all.children">
			<param name="target" value="build.sources"/>
		</antcall>
	</target>

	<target name="build.zips" depends="init">
		<antcall target="all.children">
			<param name="target" value="build.zips"/>
		</antcall>
	</target>

	<target name="build.update.jar" depends="clean, init" description="Build the feature jar of: com.nokia.s60tools.imaker.tests.feature for an update site.">
		<antcall target="all.children">
			<param name="target" value="build.update.jar"/>
		</antcall>
		<property name="feature.base" value="${feature.temp.folder}"/>
		<delete dir="${feature.temp.folder}"/>
		<mkdir dir="${feature.temp.folder}"/>
		<antcall target="gather.bin.parts" inheritAll="false">
			<param name="os" value="*"/>
			<param name="feature.base" value="${feature.temp.folder}"/>
			<param name="ws" value="*"/>
			<param name="arch" value="*"/>
			<param name="nl" value="*"/>
		</antcall>
		<jar destfile="${feature.destination}/com.nokia.s60tools.imaker.tests.feature_${plugin.version}.jar" basedir="${feature.temp.folder}/features/com.nokia.s60tools.imaker.tests.feature_${plugin.version}"/>
		<delete dir="${feature.temp.folder}"/>
	</target>

	<target name="gather.bin.parts" depends="init" if="feature.base">
		<mkdir dir="${feature.base}/features/com.nokia.s60tools.imaker.tests.feature_${plugin.version}"/>
		<antcall target="children">
			<param name="target" value="gather.bin.parts"/>
			<param name="destination.temp.folder" value="${feature.base}/plugins"/>
		</antcall>
		<copy todir="${feature.base}/features/com.nokia.s60tools.imaker.tests.feature_${plugin.version}" failonerror="true" overwrite="false">
			<fileset dir="${basedir}">
				<include name="feature.xml"/>
			</fileset>
		</copy>
	</target>
	<target name="rootFiles*_*_*">
	</target>
	<target name="rootFilesgroup_group_group">
		<antcall target="rootFiles*_*_*"/>
	</target>

	<target name="zip.distribution" depends="init" description="Create a zip containing all the plug-ins and features for the feature: com.nokia.s60tools.imaker.tests.feature.">
		<delete dir="${feature.temp.folder}"/>
		<mkdir dir="${feature.temp.folder}"/>
		<antcall target="gather.bin.parts">
			<param name="feature.base" value="${feature.temp.folder}"/>
			<param name="os" value="*"/>
			<param name="arch" value="*"/>
			<param name="ws" value="*"/>
			<param name="nl" value="*"/>
			<param name="include.children" value="true"/>
		</antcall>
		<zip destfile="${feature.destination}/com.nokia.s60tools.imaker.tests.feature_${plugin.version}.bin.dist.zip" basedir="${feature.temp.folder}" filesonly="false" whenempty="skip" update="false"/>
		<delete dir="${feature.temp.folder}"/>
	</target>

	<target name="zip.sources" depends="init">
		<delete dir="${feature.temp.folder}"/>
		<mkdir dir="${feature.temp.folder}"/>
		<antcall target="all.children">
			<param name="target" value="gather.sources"/>
			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins/com.nokia.s60tools.imaker.tests.feature.source_${plugin.version}/src"/>
			<param name="include.children" value="true"/>
		</antcall>
		<zip destfile="${feature.destination}/com.nokia.s60tools.imaker.tests.feature_${plugin.version}.src.zip" basedir="${feature.temp.folder}" filesonly="true" whenempty="skip" update="false"/>
		<delete dir="${feature.temp.folder}"/>
	</target>

	<target name="zip.logs" depends="init">
		<delete dir="${feature.temp.folder}"/>
		<mkdir dir="${feature.temp.folder}"/>
		<antcall target="all.children" inheritAll="false">
			<param name="target" value="gather.logs"/>
			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins"/>
			<param name="include.children" value="true"/>
		</antcall>
		<zip destfile="${feature.destination}/com.nokia.s60tools.imaker.tests.feature_${plugin.version}.log.zip" basedir="${feature.temp.folder}" filesonly="true" whenempty="skip" update="false"/>
		<delete dir="${feature.temp.folder}"/>
	</target>

	<target name="clean" depends="init" description="Clean the feature: com.nokia.s60tools.imaker.tests.feature of all the zips, jars and logs created.">
		<delete file="${feature.destination}/com.nokia.s60tools.imaker.tests.feature_${plugin.version}.jar"/>
		<delete file="${feature.destination}/com.nokia.s60tools.imaker.tests.feature_${plugin.version}.bin.dist.zip"/>
		<delete file="${feature.destination}/com.nokia.s60tools.imaker.tests.feature_${plugin.version}.log.zip"/>
		<delete file="${feature.destination}/com.nokia.s60tools.imaker.tests.feature_${plugin.version}.src.zip"/>
		<delete dir="${feature.temp.folder}"/>
		<antcall target="all.children">
			<param name="target" value="clean"/>
		</antcall>
	</target>

	<target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
		<eclipse.convertPath fileSystemPath="C:/dev/workspaces/eclipse-3.3.1/imaker_plugin/com.nokia.s60tools.imaker.tests.feature/" property="resourcePath"/>
		<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
		<antcall target="all.children">
			<param name="target" value="refresh"/>
		</antcall>
	</target>
	<target name="gather.sources">
		<antcall target="children">
			<param name="target" value="gather.sources"/>
			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins/com.nokia.s60tools.imaker.tests.feature.source_${plugin.version}/src"/>
		</antcall>
	</target>

	<target name="gather.logs" depends="init">
		<mkdir dir="${feature.temp.folder}"/>
		<antcall target="all.children" inheritAll="false">
			<param name="target" value="gather.logs"/>
			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins"/>
		</antcall>
	</target>

</project>