Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

166 lines (143 sloc) 5.969 kb
<project name="org.eclipse.swtbot.updatesite" default="all" basedir=".">
<taskdef name="purge" classname="com.dallaway.ant.Purge" classpath="../org.eclipse.swtbot.releng/externals/libs/purge.jar" />
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<property name="target" value="${basedir}/target" />
<taskdef resource="net/sf/antcontrib/antlib.xml" classpath="../org.eclipse.swtbot.releng/externals/libs/ant-contrib-1.0b3.jar" />
<condition property="should.generate.archives">
<equals arg1="${has.archives}" arg2="true" />
</condition>
<echo>${should.generate.archives}: ${has.archives}</echo>
<target name="-create.features.template">
<basename file="${file}" property="file.name" />
<propertyregex property="all.buildId" input="${file.name}" regexp="${featureId}_(.*).jar" select="\1" />
<echo message="Adding ${featureId} version: ${all.buildId}" />
<concat destfile="build/${destFile}" append="true">
<path path="${srcFile}" />
<filterchain>
<expandproperties />
</filterchain>
</concat>
</target>
<target name="create_features_list">
<for param="file">
<path>
<fileset dir="${target}/features" includes="org.eclipse.swtbot_*.jar" />
</path>
<sequential>
<ant target="-create.features.template" inheritall="false">
<property name="file" value="@{file}" />
<property name="featureId" value="org.eclipse.swtbot" />
<property name="destFile" value="org.eclipse.swtbot.featurelist.xml" />
<property name="srcFile" value="site.template.org.eclipse.swtbot.featurelist.xml" />
</ant>
</sequential>
</for>
</target>
<target name="-create.plugins.template">
<basename file="${plugin.file.name}" property="file" />
<dirname file="${plugin.file.name}" property="file.dirname" />
<basename file="${file.dirname}" property="file.basedir" />
<echo>Adding feature/plugin: ${file} in ${file.basedir}</echo>
<concat destfile="build/${destFile}" append="true">
<path path="${srcFile}" />
<filterchain>
<expandproperties />
</filterchain>
</concat>
</target>
<target name="create_plugins_archive_list" if="should.generate.archives">
<for param="plugin">
<path>
<fileset dir="${target}/features" includes="*.jar" />
<fileset dir="${target}/plugins" includes="*.jar" />
</path>
<sequential>
<ant target="-create.plugins.template" inheritall="false">
<property name="plugin.file.name" value="@{plugin}" />
<property name="featureId" value="org.eclipse.swtbot" />
<property name="destFile" value="org.eclipse.swtbot.pluginarchivelist.xml" />
<property name="srcFile" value="site.template.org.eclipse.swtbot.pluginarchivelist.xml" />
</ant>
</sequential>
</for>
</target>
<target name="create_site_xml" depends="create_features_list">
<concat destfile="${target}/site.xml.tokenize" fixlastline="true" eol="unix">
<header file="site.template.header.xml" />
<fileset file="build/org.eclipse.swtbot.featurelist.xml" />
<fileset file="build/org.eclipse.swtbot.pluginarchivelist.xml" />
<fileset file="site.template.categories.xml" />
<footer file="site.template.footer.xml" />
</concat>
<move file="${target}/site.xml.tokenize" tofile="${target}/site.xml">
<filterchain>
<expandproperties />
</filterchain>
</move>
</target>
<target name="clean">
<delete dir="build" />
<delete dir="eclipse" />
<mkdir dir="build" />
<delete dir="${target}" />
</target>
<target name="-create.jars">
<for param="file">
<path>
<dirset dir="${target}/eclipse/features" includes="*" excludes="*.jar" />
<dirset dir="${target}/eclipse/plugins" includes="*" excludes="*.jar" />
</path>
<sequential>
<echo>Packaging feature @{file} as a jar</echo>
<zip destfile="@{file}.jar" basedir="@{file}" />
<delete dir="@{file}" />
</sequential>
</for>
</target>
<target name="init">
<mkdir dir="${target}" />
<unzip dest="${target}">
<fileset dir="../org.eclipse.swtbot.releng/artifacts" includes="org.eclipse.swtbot.eclipse-*" />
<fileset dir="../org.eclipse.swtbot.releng/artifacts" includes="org.eclipse.swtbot.eclipse.test.junit3-*" />
<fileset dir="../org.eclipse.swtbot.releng/artifacts" includes="org.eclipse.swtbot.eclipse.test.junit4-*" />
<fileset dir="../org.eclipse.swtbot.releng/artifacts" includes="org.eclipse.swtbot.eclipse.gef-*" />
<fileset dir="../org.eclipse.swtbot.releng/artifacts" includes="org.eclipse.swtbot.ide-*" />
</unzip>
<antcall target="-create.jars" inheritall="false" />
<move todir="${target}">
<fileset dir="${target}/eclipse" />
</move>
</target>
<target name="copy-to-update-site">
<property name="update-site-location" value="update-site" />
<copy todir="${update-site-location}">
<fileset dir=".">
<include name="features/**.*" />
<include name="plugins/**.*" />
<include name="index.html" />
<include name="site.xml" />
<include name="web/**.*" />
</fileset>
<fileset dir="target">
</fileset>
</copy>
</target>
<target name="create-p2-site">
<java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
<classpath>
<fileset dir="${eclipse.location}/plugins">
<include name="org.eclipse.equinox.launcher_*.jar" />
</fileset>
</classpath>
<arg line="-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator" />
<arg line="-updateSite ${target}" />
<arg line="-site file:${target}/site.xml" />
<arg line="-metadataRepository file:${target}" />
<arg line="-metadataRepositoryName 'SWTBot Update Site'" />
<arg line="-artifactRepository file:${target}" />
<arg line="-artifactRepositoryName 'SWTBot Artifacts'" />
<arg line="-compress -reusePack200Files -vmargs -Xmx128M" />
</java>
</target>
<target name="all" depends="clean, init, create_features_list, create_plugins_archive_list, create_site_xml, create-p2-site, copy-to-update-site" />
</project>
Jump to Line
Something went wrong with that request. Please try again.