blob: eb8da9e6f1784ba524d40a18ed6328755dc8e6b8 [file] [log] [blame]
<!-- build script to create JUnit Plugin -->
<project name="org.eclipse.jdt.junit.runtime" default="export" basedir="..">
<target name="init">
<tstamp/>
<property name="destdir" value="../../plugin-export" />
<property name="plugin" value="org.eclipse.jdt.junit.runtime" />
<property name="qualifier" value="zzz${DSTAMP}-${TSTAMP}" />
<!-- define property ${plugin_version} by reading version from MANIFEST.MF: -->
<tempfile property="plugin_version_file" suffix=".plugin_version.tmp" destdir="${destdir}"/>
<copy file="META-INF/MANIFEST.MF" tofile="${plugin_version_file}"/>
<replaceregexp file="${plugin_version_file}" match=".*Bundle-Version: ((\d)+\.(\d)+\.(\d)+\.)qualifier.*" replace="plugin_version=_\1${qualifier}" flags="s" />
<property file="${plugin_version_file}"/>
<delete file="${plugin_version_file}" />
<property name="dest" value="${destdir}/${plugin}${plugin_version}" />
</target>
<target name="build" depends="init">
<eclipse.incrementalBuild project="${plugin}" kind="incr"/>
</target>
<target name="export" depends="build">
<mkdir dir="${destdir}" />
<delete dir="${dest}" />
<mkdir dir="${dest}" />
<jar
jarfile="${dest}/junitruntime.jar"
basedir="bin"
/>
<jar
jarfile="${dest}/junitruntimesrc.jar"
basedir="src"
/>
<copy file="plugin.xml" todir="${dest}"/>
<copy file="plugin.properties" todir="${dest}"/>
<copy file="about.html" todir="${dest}"/>
<copy todir= "${dest}/META-INF">
<fileset dir="META-INF"/>
</copy>
<replaceregexp file="${dest}/META-INF/MANIFEST.MF" match="Bundle-Version: ((\d)+\.(\d)+\.(\d)+\.)qualifier" replace="Bundle-Version: \1${qualifier}" byline="true" />
<replaceregexp file="${dest}/plugin.xml" match="version=&quot;((\d)+\.(\d)+\.(\d)+\.)qualifier" replace="version=&quot;\1${qualifier}" byline="true" />
</target>
</project>