1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <project name="com.ibm.wala.core" default="build.jars" basedir=".">
\r
4 <property name="basews" value="${ws}"/>
\r
5 <property name="baseos" value="${os}"/>
\r
6 <property name="basearch" value="${arch}"/>
\r
7 <property name="basenl" value="${nl}"/>
\r
8 <property name="bundleId" value="com.ibm.wala.core"/>
\r
9 <property name="bundleVersion" value="1.0.0"/>
\r
11 <!-- Compiler settings. -->
\r
12 <property name="javacFailOnError" value="true"/>
\r
13 <property name="javacDebugInfo" value="on"/>
\r
14 <property name="javacVerbose" value="false"/>
\r
15 <property name="logExtension" value=".log"/>
\r
16 <property name="compilerArg" value=""/>
\r
17 <property name="javacSource" value="1.5"/>
\r
18 <property name="javacTarget" value="1.5"/>
\r
19 <condition property="dir_bootclasspath" value="${java.home}/../Classes">
\r
22 <property name="dir_bootclasspath" value="${java.home}/lib"/>
\r
23 <path id="path_bootclasspath">
\r
24 <fileset dir="${dir_bootclasspath}">
\r
25 <include name="*.jar"/>
\r
28 <property name="bootclasspath" refid="path_bootclasspath"/>
\r
29 <property name="bundleJavacSource" value="${javacSource}"/>
\r
30 <property name="bundleJavacTarget" value="${javacTarget}"/>
\r
31 <property name="bundleBootClasspath" value="${bootclasspath}"/>
\r
33 <target name="init" depends="properties">
\r
34 <condition property="pluginTemp" value="${buildTempFolder}/plugins">
\r
35 <isset property="buildTempFolder"/>
\r
37 <property name="pluginTemp" value="${basedir}"/>
\r
38 <condition property="build.result.folder" value="${pluginTemp}/com.ibm.wala.core_1.0.0">
\r
39 <isset property="buildTempFolder"/>
\r
41 <property name="build.result.folder" value="${basedir}"/>
\r
42 <property name="temp.folder" value="${basedir}/temp.folder"/>
\r
43 <property name="plugin.destination" value="${basedir}"/>
\r
46 <target name="properties" if="eclipse.running">
\r
47 <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
\r
51 <target name="build.update.jar" depends="init" description="Build the plug-in: com.ibm.wala.core for an update site.">
\r
52 <delete dir="${temp.folder}"/>
\r
53 <mkdir dir="${temp.folder}"/>
\r
54 <antcall target="build.jars"/>
\r
55 <antcall target="gather.bin.parts">
\r
56 <param name="destination.temp.folder" value="${temp.folder}/"/>
\r
58 <jar destfile="${plugin.destination}/com.ibm.wala.core_1.0.0.jar" basedir="${temp.folder}/com.ibm.wala.core_1.0.0" filesetmanifest="merge"/>
\r
59 <delete dir="${temp.folder}"/>
\r
62 <target name="@dot" depends="init" unless="@dot" description="Create jar: com.ibm.wala.core @dot.">
\r
63 <delete dir="${temp.folder}/@dot.bin"/>
\r
64 <mkdir dir="${temp.folder}/@dot.bin"/>
\r
65 <path id="@dot.classpath">
\r
66 <pathelement path="../com.ibm.wala.emf/bin/"/>
\r
67 <pathelement path="../com.ibm.wala.emf/@dot"/>
\r
68 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.runtime_3.3.100.v20070530.jar"/>
\r
69 <pathelement path="${eclipse.root}/plugins/org.eclipse.osgi_3.3.0.v20070530.jar"/>
\r
70 <pathelement path="${eclipse.root}/plugins/org.eclipse.equinox.common_3.3.0.v20070426.jar"/>
\r
71 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.jobs_3.3.0.v20070423.jar"/>
\r
72 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316/runtime_registry_compatibility.jar"/>
\r
73 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316"/>
\r
74 <pathelement path="${eclipse.root}/plugins/org.eclipse.equinox.registry_3.3.0.v20070522.jar"/>
\r
75 <pathelement path="${eclipse.root}/plugins/org.eclipse.equinox.preferences_3.2.100.v20070522.jar"/>
\r
76 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316/@dot"/>
\r
77 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.contenttype_3.2.100.v20070319.jar"/>
\r
78 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502.jar"/>
\r
79 <pathelement path="${eclipse.root}/plugins/org.eclipse.equinox.app_1.0.0.v20070606.jar"/>
\r
80 <pathelement path="${eclipse.root}/plugins/org.eclipse.osgi.services_3.1.200.v20070605.jar"/>
\r
81 <pathelement path="${eclipse.root}/plugins/javax.servlet_2.4.0.v200706111738.jar"/>
\r
82 <pathelement path="${eclipse.root}/plugins/org.eclipse.emf.ecore_2.3.0.v200706262000.jar"/>
\r
83 <pathelement path="${eclipse.root}/plugins/org.eclipse.emf.common_2.3.0.v200706262000.jar"/>
\r
84 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.resources_3.3.0.v20070604.jar"/>
\r
85 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.resources.compatibility_3.2.100.v20070502.jar"/>
\r
86 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.resources.win32_3.3.0.v20070226.jar"/>
\r
87 <pathelement path="${eclipse.root}/plugins/org.eclipse.ant.core_3.1.200.v20070522.jar"/>
\r
88 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.variables_3.2.0.v20070426.jar"/>
\r
89 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.expressions_3.3.0.v20070606-0010.jar"/>
\r
90 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.filesystem_1.1.0.v20070606.jar"/>
\r
91 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.filesystem.win32.x86_1.1.0.v20070510.jar"/>
\r
92 <pathelement path="${eclipse.root}/plugins/org.eclipse.emf.ecore.xmi_2.3.0.v200706262000.jar"/>
\r
93 <pathelement path="../com.ibm.wala.shrike/bin/"/>
\r
94 <pathelement path="../com.ibm.wala.shrike/@dot"/>
\r
95 <pathelement path="${eclipse.root}/plugins/org.eclipse.jface_3.3.0.I20070606-0010.jar"/>
\r
96 <pathelement path="${eclipse.root}/plugins/org.eclipse.swt_3.3.0.v3346.jar"/>
\r
97 <pathelement path="${eclipse.root}/plugins/org.eclipse.swt.win32.win32.x86_3.3.0.v3346.jar"/>
\r
98 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.commands_3.3.0.I20070605-0010.jar"/>
\r
99 <pathelement path="${eclipse.root}/plugins/org.eclipse.jdt.core_3.3.0.v_771.jar"/>
\r
100 <pathelement path="${eclipse.root}/plugins/org.eclipse.jdt.compiler.apt_1.0.0.v20070510-2000.jar"/>
\r
101 <pathelement path="${eclipse.root}/plugins/org.eclipse.jdt.compiler.tool_1.0.0.v_771.jar"/>
\r
102 <pathelement path="${eclipse.root}/plugins/org.eclipse.text_3.3.0.v20070606-0010.jar"/>
\r
103 <pathelement path="${eclipse.root}/plugins/com.ibm.icu_3.6.1.v20070417.jar"/>
\r
104 <pathelement path="${eclipse.root}/plugins/org.eclipse.team.core_3.3.0.I20070607.jar"/>
\r
105 <pathelement path="${eclipse.root}/plugins/org.eclipse.ui_3.3.0.I20070614-0800.jar"/>
\r
106 <pathelement path="${eclipse.root}/plugins/org.eclipse.ui.workbench_3.3.0.I20070608-1100.jar"/>
\r
107 <pathelement path="${eclipse.root}/plugins/org.eclipse.ui.workbench.compatibility_3.2.0.I20070319-0010/@dot"/>
\r
108 <pathelement path="${eclipse.root}/plugins/org.eclipse.ui.workbench.compatibility_3.2.0.I20070319-0010/compatibility.jar"/>
\r
109 <pathelement path="${eclipse.root}/plugins/org.eclipse.help_3.3.0.v20070524.jar"/>
\r
110 <pathelement path="${eclipse.root}/plugins/org.eclipse.jface.databinding_1.1.0.I20070606-0010.jar"/>
\r
111 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.databinding_1.0.0.I20070606-0010.jar"/>
\r
113 <!-- compile the source code -->
\r
114 <javac destdir="${temp.folder}/@dot.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" >
\r
115 <compilerarg line="${compilerArg}" compiler="${build.compiler}"/>
\r
116 <classpath refid="@dot.classpath" />
\r
117 <src path="dat/" />
\r
118 <src path="src/" />
\r
119 <src path="lib/" />
\r
120 <exclude name="**/bak/"/>
\r
121 <compilerarg value="@${basedir}/javaCompiler...args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>
\r
122 <compilerarg line="-log '${temp.folder}/@dot.bin${logExtension}'" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>
\r
124 <!-- Copy necessary resources -->
\r
125 <copy todir="${temp.folder}/@dot.bin" failonerror="true" overwrite="false">
\r
126 <fileset dir="dat/">
\r
127 <exclude name="**/*.java"/>
\r
128 <exclude name="**/package.htm*"/>
\r
130 <fileset dir="src/">
\r
131 <exclude name="**/*.java"/>
\r
132 <exclude name="**/package.htm*"/>
\r
134 <fileset dir="lib/">
\r
135 <exclude name="**/*.java"/>
\r
136 <exclude name="**/package.htm*"/>
\r
139 <mkdir dir="${build.result.folder}"/>
\r
140 <copy todir="${build.result.folder}/@dot" failonerror="true" overwrite="false">
\r
141 <fileset dir="${temp.folder}/@dot.bin">
\r
144 <delete dir="${temp.folder}/@dot.bin"/>
\r
147 <target name="src.zip" depends="init" unless="src.zip">
\r
148 <mkdir dir="${build.result.folder}"/>
\r
149 <zip destfile="${build.result.folder}/src.zip" filesonly="false" whenempty="skip" update="false">
\r
150 <fileset dir="dat/">
\r
151 <include name="**/*.java"/>
\r
153 <fileset dir="src/">
\r
154 <include name="**/*.java"/>
\r
156 <fileset dir="lib/">
\r
157 <include name="**/*.java"/>
\r
162 <target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: com.ibm.wala.core.">
\r
163 <available property="@dot" file="${build.result.folder}/@dot"/>
\r
164 <antcall target="@dot"/>
\r
167 <target name="build.sources" depends="init">
\r
168 <available property="src.zip" file="${build.result.folder}/src.zip"/>
\r
169 <antcall target="src.zip"/>
\r
172 <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
\r
173 <mkdir dir="${destination.temp.folder}/com.ibm.wala.core_1.0.0"/>
\r
174 <copy todir="${destination.temp.folder}/com.ibm.wala.core_1.0.0" failonerror="true" overwrite="false">
\r
175 <fileset dir="${build.result.folder}/@dot">
\r
176 <include name="**"/>
\r
179 <copy todir="${destination.temp.folder}/com.ibm.wala.core_1.0.0" failonerror="true" overwrite="false">
\r
180 <fileset dir="${basedir}">
\r
181 <include name="lib/primordial.jar.model"/>
\r
182 <include name="plugin.properties"/>
\r
183 <include name="dat/SyntheticJ2SEModel.xml"/>
\r
184 <include name="dat/benign.xml"/>
\r
185 <include name="dat/natives.xml"/>
\r
186 <include name="META-INF/"/>
\r
191 <target name="build.zips" depends="init">
\r
194 <target name="gather.sources" depends="init" if="destination.temp.folder">
\r
195 <mkdir dir="${destination.temp.folder}/com.ibm.wala.core_1.0.0"/>
\r
196 <copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/com.ibm.wala.core_1.0.0" failonerror="false" overwrite="false"/>
\r
199 <target name="gather.logs" depends="init" if="destination.temp.folder">
\r
200 <mkdir dir="${destination.temp.folder}/com.ibm.wala.core_1.0.0"/>
\r
201 <copy todir="${destination.temp.folder}/com.ibm.wala.core_1.0.0" failonerror="false" overwrite="false">
\r
202 <fileset dir="${temp.folder}">
\r
203 <include name="@dot.bin${logExtension}"/>
\r
208 <target name="clean" depends="init" description="Clean the plug-in: com.ibm.wala.core of all the zips, jars and logs created.">
\r
209 <delete dir="${build.result.folder}/@dot"/>
\r
210 <delete file="${build.result.folder}/src.zip"/>
\r
211 <delete file="${plugin.destination}/com.ibm.wala.core_1.0.0.jar"/>
\r
212 <delete file="${plugin.destination}/com.ibm.wala.core_1.0.0.zip"/>
\r
213 <delete dir="${temp.folder}"/>
\r
216 <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
\r
217 <eclipse.convertPath fileSystemPath="C:/Data/Projects/Safe/workspaces/safe-build/com.ibm.wala.core" property="resourcePath"/>
\r
218 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
\r
221 <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: com.ibm.wala.core.">
\r
222 <delete dir="${temp.folder}"/>
\r
223 <mkdir dir="${temp.folder}"/>
\r
224 <antcall target="build.jars"/>
\r
225 <antcall target="build.sources"/>
\r
226 <antcall target="gather.bin.parts">
\r
227 <param name="destination.temp.folder" value="${temp.folder}/"/>
\r
229 <antcall target="gather.sources">
\r
230 <param name="destination.temp.folder" value="${temp.folder}/"/>
\r
233 <fileset dir="${temp.folder}">
\r
234 <include name="**/*.bin${logExtension}"/>
\r
237 <zip destfile="${plugin.destination}/com.ibm.wala.core_1.0.0.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
\r
238 <delete dir="${temp.folder}"/>
\r