1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="com.ibm.wala.shrike" default="build.update.jar" basedir=".">
3 <import file="../org.eclipse.imp.runtime.feature/buildCommon.xml"/>
4 <import file="../org.eclipse.imp.update/buildPluginCommon.xml"/>
6 <target name="init" depends="properties">
7 <loadfile property="plugin.id" srcfile="META-INF/MANIFEST.MF">
9 <containsregex pattern="Bundle-SymbolicName:"/>
10 <replaceregex pattern="Bundle-SymbolicName: (.*)(;.*)?" replace="\1"/>
11 <!-- Don't know why we need striplinebreaks here and not in defining javacSource (see below) -->
15 <!-- <echo message="Plugin ID = ${plugin.id}"/> -->
17 <loadfile property="plugin.version" srcfile="META-INF/MANIFEST.MF">
19 <containsregex pattern="Bundle-Version:"/>
20 <replaceregex pattern="Bundle-Version: (.*)" replace="\1"/>
21 <!-- Don't know why we need striplinebreaks here and not in defining javacSource (see below) -->
25 <!-- <echo message="Plugin version = ${plugin.version}"/> -->
27 <property name="plugin.jar.name" value="${plugin.id}_${plugin.version}.jar"/>
28 <property name="plugin.zip.name" value="${plugin.id}_${plugin.version}.zip"/>
29 <property name="plugin.src.zip" value="${plugin.id}src.zip"/>
30 <property name="plugin.destination" value="${basedir}"/>
31 <condition property="pluginTemp" value="${buildTempFolder}/plugins">
32 <isset property="buildTempFolder"/>
34 <property name="pluginTemp" value="${basedir}"/>
35 <condition property="build.result.folder" value="${pluginTemp}/${plugin.id}">
36 <isset property="buildTempFolder"/>
38 <property name="build.result.folder" value="${basedir}"/>
39 <property name="temp.folder" value="${basedir}/temp.folder"/>
42 <target name="properties" if="eclipse.running">
43 <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
47 <!-- ================================================================================= -->
49 <target name="plugin.jar" depends="init" unless="${plugin.jar.name}" description="Create jar: ${plugin.jar.name}.">
50 <delete dir="${temp.folder}/${plugin.jar.name}.bin"/>
51 <mkdir dir="${temp.folder}/${plugin.jar.name}.bin"/>
52 <!-- compile the source code -->
53 <javac destdir="${temp.folder}/${plugin.jar.name}.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bootclasspath}" source="${javacSource}" target="${javacTarget}" >
54 <compilerarg line="${compilerArg}"/>
56 <pathelement path="${eclipse.build.path}"/>
60 <!-- Copy necessary resources -->
61 <copy todir="${temp.folder}/${plugin.jar.name}.bin" failonerror="true" overwrite="false">
62 <fileset dir="src/" excludes="**/*.java,**/package.htm*"/>
64 <mkdir dir="${build.result.folder}"/>
65 <jar destfile="${build.result.folder}/${plugin.jar.name}" basedir="${temp.folder}/${plugin.jar.name}.bin"
66 manifest="META-INF/MANIFEST.MF"/>
67 <delete dir="${temp.folder}/${plugin.jar.name}.bin"/>