1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <project name="com.ibm.wala.j2ee" 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.j2ee"/>
\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.j2ee_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.j2ee 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.j2ee_1.0.0.jar" basedir="${temp.folder}/com.ibm.wala.j2ee_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.j2ee @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.core/bin/"/>
\r
67 <pathelement path="../com.ibm.wala.core/@dot"/>
\r
68 <pathelement path="../com.ibm.wala.emf/bin/"/>
\r
69 <pathelement path="../com.ibm.wala.emf/@dot"/>
\r
70 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.runtime_3.3.100.v20070530.jar"/>
\r
71 <pathelement path="${eclipse.root}/plugins/org.eclipse.osgi_3.3.0.v20070530.jar"/>
\r
72 <pathelement path="${eclipse.root}/plugins/org.eclipse.equinox.common_3.3.0.v20070426.jar"/>
\r
73 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.jobs_3.3.0.v20070423.jar"/>
\r
74 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316/runtime_registry_compatibility.jar"/>
\r
75 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316"/>
\r
76 <pathelement path="${eclipse.root}/plugins/org.eclipse.equinox.registry_3.3.0.v20070522.jar"/>
\r
77 <pathelement path="${eclipse.root}/plugins/org.eclipse.equinox.preferences_3.2.100.v20070522.jar"/>
\r
78 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.100.v20070316/@dot"/>
\r
79 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.contenttype_3.2.100.v20070319.jar"/>
\r
80 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502.jar"/>
\r
81 <pathelement path="${eclipse.root}/plugins/org.eclipse.equinox.app_1.0.0.v20070606.jar"/>
\r
82 <pathelement path="${eclipse.root}/plugins/org.eclipse.osgi.services_3.1.200.v20070605.jar"/>
\r
83 <pathelement path="${eclipse.root}/plugins/javax.servlet_2.4.0.v200706111738.jar"/>
\r
84 <pathelement path="${eclipse.root}/plugins/org.eclipse.emf.ecore_2.3.0.v200706262000.jar"/>
\r
85 <pathelement path="${eclipse.root}/plugins/org.eclipse.emf.common_2.3.0.v200706262000.jar"/>
\r
86 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.resources_3.3.0.v20070604.jar"/>
\r
87 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.resources.compatibility_3.2.100.v20070502.jar"/>
\r
88 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.resources.win32_3.3.0.v20070226.jar"/>
\r
89 <pathelement path="${eclipse.root}/plugins/org.eclipse.ant.core_3.1.200.v20070522.jar"/>
\r
90 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.variables_3.2.0.v20070426.jar"/>
\r
91 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.expressions_3.3.0.v20070606-0010.jar"/>
\r
92 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.filesystem_1.1.0.v20070606.jar"/>
\r
93 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.filesystem.win32.x86_1.1.0.v20070510.jar"/>
\r
94 <pathelement path="${eclipse.root}/plugins/org.eclipse.emf.ecore.xmi_2.3.0.v200706262000.jar"/>
\r
95 <pathelement path="../com.ibm.wala.shrike/bin/"/>
\r
96 <pathelement path="../com.ibm.wala.shrike/@dot"/>
\r
97 <pathelement path="${eclipse.root}/plugins/org.eclipse.jface_3.3.0.I20070606-0010.jar"/>
\r
98 <pathelement path="${eclipse.root}/plugins/org.eclipse.swt_3.3.0.v3346.jar"/>
\r
99 <pathelement path="${eclipse.root}/plugins/org.eclipse.swt.win32.win32.x86_3.3.0.v3346.jar"/>
\r
100 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.commands_3.3.0.I20070605-0010.jar"/>
\r
101 <pathelement path="${eclipse.root}/plugins/org.eclipse.jdt.core_3.3.0.v_771.jar"/>
\r
102 <pathelement path="${eclipse.root}/plugins/org.eclipse.jdt.compiler.apt_1.0.0.v20070510-2000.jar"/>
\r
103 <pathelement path="${eclipse.root}/plugins/org.eclipse.jdt.compiler.tool_1.0.0.v_771.jar"/>
\r
104 <pathelement path="${eclipse.root}/plugins/org.eclipse.text_3.3.0.v20070606-0010.jar"/>
\r
105 <pathelement path="${eclipse.root}/plugins/com.ibm.icu_3.6.1.v20070417.jar"/>
\r
106 <pathelement path="${eclipse.root}/plugins/org.eclipse.team.core_3.3.0.I20070607.jar"/>
\r
107 <pathelement path="${eclipse.root}/plugins/org.eclipse.jem_2.0.0.v200705302225.jar"/>
\r
108 <pathelement path="${eclipse.root}/plugins/org.eclipse.jem.proxy_2.0.0.v200705302225.jar"/>
\r
109 <pathelement path="${eclipse.root}/plugins/org.eclipse.jdt.launching_3.3.0.v20070510.jar"/>
\r
110 <pathelement path="${eclipse.root}/plugins/org.eclipse.debug.core_3.3.0.v20070607-1800.jar"/>
\r
111 <pathelement path="${eclipse.root}/plugins/org.eclipse.jdt.debug_3.3.0.v20070530a/jdi.jar"/>
\r
112 <pathelement path="${eclipse.root}/plugins/org.eclipse.jdt.debug_3.3.0.v20070530a/jdimodel.jar"/>
\r
113 <pathelement path="${eclipse.root}/plugins/org.eclipse.jdt.debug_3.3.0.v20070530a/tools.jar"/>
\r
114 <pathelement path="${eclipse.root}/plugins/org.eclipse.jem.util_2.0.0.v200705302225.jar"/>
\r
115 <pathelement path="${eclipse.root}/plugins/org.eclipse.pde.core_3.3.0.v20070608-1300.jar"/>
\r
116 <pathelement path="${eclipse.root}/plugins/org.eclipse.update.configurator_3.2.100.v20070615.jar"/>
\r
117 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.filebuffers_3.3.0.v20070606-0010.jar"/>
\r
118 <pathelement path="${eclipse.root}/plugins/org.eclipse.pde.build_3.3.0.v20070612/pdebuild.jar"/>
\r
119 <pathelement path="${eclipse.root}/plugins/org.eclipse.update.core_3.2.100.v20070615.jar"/>
\r
120 <pathelement path="${eclipse.root}/plugins/org.eclipse.update.core.win32_3.2.100.v20070615.jar"/>
\r
121 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.net_1.0.0.I20070531.jar"/>
\r
122 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.runtime.compatibility_3.1.200.v20070502.jar"/>
\r
123 <pathelement path="${eclipse.root}/plugins/org.eclipse.ui_3.3.0.I20070614-0800.jar"/>
\r
124 <pathelement path="${eclipse.root}/plugins/org.eclipse.ui.workbench_3.3.0.I20070608-1100.jar"/>
\r
125 <pathelement path="${eclipse.root}/plugins/org.eclipse.ui.workbench.compatibility_3.2.0.I20070319-0010/@dot"/>
\r
126 <pathelement path="${eclipse.root}/plugins/org.eclipse.ui.workbench.compatibility_3.2.0.I20070319-0010/compatibility.jar"/>
\r
127 <pathelement path="${eclipse.root}/plugins/org.eclipse.help_3.3.0.v20070524.jar"/>
\r
128 <pathelement path="${eclipse.root}/plugins/org.eclipse.jface.databinding_1.1.0.I20070606-0010.jar"/>
\r
129 <pathelement path="${eclipse.root}/plugins/org.eclipse.core.databinding_1.0.0.I20070606-0010.jar"/>
\r
130 <pathelement path="${eclipse.root}/plugins/org.eclipse.jst.j2ee.core_1.1.102.v200706111630.jar"/>
\r
131 <pathelement path="${eclipse.root}/plugins/org.eclipse.wst.common.frameworks_1.1.102.v200706071630.jar"/>
\r
132 <pathelement path="${eclipse.root}/plugins/org.eclipse.wst.common.environment_1.0.200.v200705302225.jar"/>
\r
133 <pathelement path="${eclipse.root}/plugins/org.eclipse.osgi.util_3.1.200.v20070605.jar"/>
\r
134 <pathelement path="${eclipse.root}/plugins/org.eclipse.wst.common.emf_1.1.103.v200706071630.jar"/>
\r
135 <pathelement path="${eclipse.root}/plugins/org.eclipse.wst.validation_1.1.101.v200706071630.jar"/>
\r
136 <pathelement path="${eclipse.root}/plugins/org.eclipse.wst.common.project.facet.core_1.2.0.v200706071740.jar"/>
\r
137 <pathelement path="${eclipse.root}/plugins/org.eclipse.wst.xml.core_1.1.200.v200706120811.jar"/>
\r
138 <pathelement path="${eclipse.root}/plugins/org.apache.xerces_2.8.0.v200705301630.jar"/>
\r
139 <pathelement path="${eclipse.root}/plugins/org.apache.xml.resolver_1.1.0.v200705310020.jar"/>
\r
140 <pathelement path="${eclipse.root}/plugins/org.eclipse.wst.common.uriresolver_1.1.201.v200705302225.jar"/>
\r
141 <pathelement path="${eclipse.root}/plugins/org.eclipse.wst.sse.core_1.1.201.v200706212223.jar"/>
\r
142 <pathelement path="${eclipse.root}/plugins/org.eclipse.emf.ecore.edit_2.3.0.v200706262000.jar"/>
\r
143 <pathelement path="${eclipse.root}/plugins/org.eclipse.emf.edit_2.3.0.v200706262000.jar"/>
\r
144 <pathelement path="${eclipse.root}/plugins/org.eclipse.emf.ecore.change_2.3.0.v200706262000.jar"/>
\r
145 <pathelement path="${eclipse.root}/plugins/org.eclipse.wst.common.emfworkbench.integration_1.1.103.v200706071630.jar"/>
\r
146 <pathelement path="${eclipse.root}/plugins/org.eclipse.wst.common.core_1.1.101.v200706120315.jar"/>
\r
147 <pathelement path="${eclipse.root}/plugins/org.eclipse.wst.common.modulecore_1.1.102.v200706071630.jar"/>
\r
148 <pathelement path="${eclipse.root}/plugins/org.eclipse.jem.workbench_2.0.0.v200705302225.jar"/>
\r
150 <!-- compile the source code -->
\r
151 <javac destdir="${temp.folder}/@dot.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}" >
\r
152 <compilerarg line="${compilerArg}" compiler="${build.compiler}"/>
\r
153 <classpath refid="@dot.classpath" />
\r
154 <src path="dat/" />
\r
155 <src path="src/" />
\r
156 <src path="lib/" />
\r
157 <exclude name="**/bak/"/>
\r
158 <compilerarg value="@${basedir}/javaCompiler...args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>
\r
159 <compilerarg line="-log '${temp.folder}/@dot.bin${logExtension}'" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>
\r
161 <!-- Copy necessary resources -->
\r
162 <copy todir="${temp.folder}/@dot.bin" failonerror="true" overwrite="false">
\r
163 <fileset dir="dat/">
\r
164 <exclude name="**/*.java"/>
\r
165 <exclude name="**/package.htm*"/>
\r
167 <fileset dir="src/">
\r
168 <exclude name="**/*.java"/>
\r
169 <exclude name="**/package.htm*"/>
\r
171 <fileset dir="lib/">
\r
172 <exclude name="**/*.java"/>
\r
173 <exclude name="**/package.htm*"/>
\r
176 <mkdir dir="${build.result.folder}"/>
\r
177 <copy todir="${build.result.folder}/@dot" failonerror="true" overwrite="false">
\r
178 <fileset dir="${temp.folder}/@dot.bin">
\r
181 <delete dir="${temp.folder}/@dot.bin"/>
\r
184 <target name="src.zip" depends="init" unless="src.zip">
\r
185 <mkdir dir="${build.result.folder}"/>
\r
186 <zip destfile="${build.result.folder}/src.zip" filesonly="false" whenempty="skip" update="false">
\r
187 <fileset dir="dat/">
\r
188 <include name="**/*.java"/>
\r
190 <fileset dir="src/">
\r
191 <include name="**/*.java"/>
\r
193 <fileset dir="lib/">
\r
194 <include name="**/*.java"/>
\r
199 <target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: com.ibm.wala.j2ee.">
\r
200 <available property="@dot" file="${build.result.folder}/@dot"/>
\r
201 <antcall target="@dot"/>
\r
204 <target name="build.sources" depends="init">
\r
205 <available property="src.zip" file="${build.result.folder}/src.zip"/>
\r
206 <antcall target="src.zip"/>
\r
209 <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
\r
210 <mkdir dir="${destination.temp.folder}/com.ibm.wala.j2ee_1.0.0"/>
\r
211 <copy todir="${destination.temp.folder}/com.ibm.wala.j2ee_1.0.0" failonerror="true" overwrite="false">
\r
212 <fileset dir="${build.result.folder}/@dot">
\r
213 <include name="**"/>
\r
216 <copy todir="${destination.temp.folder}/com.ibm.wala.j2ee_1.0.0" failonerror="true" overwrite="false">
\r
217 <fileset dir="${basedir}">
\r
218 <include name="dat/DefaultWebsphereModules.xml"/>
\r
219 <include name="dat/SyntheticContainerModel.xml"/>
\r
220 <include name="dat/benignext.xml"/>
\r
221 <include name="META-INF/"/>
\r
226 <target name="build.zips" depends="init">
\r
229 <target name="gather.sources" depends="init" if="destination.temp.folder">
\r
230 <mkdir dir="${destination.temp.folder}/com.ibm.wala.j2ee_1.0.0"/>
\r
231 <copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/com.ibm.wala.j2ee_1.0.0" failonerror="false" overwrite="false"/>
\r
234 <target name="gather.logs" depends="init" if="destination.temp.folder">
\r
235 <mkdir dir="${destination.temp.folder}/com.ibm.wala.j2ee_1.0.0"/>
\r
236 <copy todir="${destination.temp.folder}/com.ibm.wala.j2ee_1.0.0" failonerror="false" overwrite="false">
\r
237 <fileset dir="${temp.folder}">
\r
238 <include name="@dot.bin${logExtension}"/>
\r
243 <target name="clean" depends="init" description="Clean the plug-in: com.ibm.wala.j2ee of all the zips, jars and logs created.">
\r
244 <delete dir="${build.result.folder}/@dot"/>
\r
245 <delete file="${build.result.folder}/src.zip"/>
\r
246 <delete file="${plugin.destination}/com.ibm.wala.j2ee_1.0.0.jar"/>
\r
247 <delete file="${plugin.destination}/com.ibm.wala.j2ee_1.0.0.zip"/>
\r
248 <delete dir="${temp.folder}"/>
\r
251 <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
\r
252 <eclipse.convertPath fileSystemPath="C:/Data/Projects/Safe/workspaces/safe-build/com.ibm.wala.j2ee" property="resourcePath"/>
\r
253 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
\r
256 <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: com.ibm.wala.j2ee.">
\r
257 <delete dir="${temp.folder}"/>
\r
258 <mkdir dir="${temp.folder}"/>
\r
259 <antcall target="build.jars"/>
\r
260 <antcall target="build.sources"/>
\r
261 <antcall target="gather.bin.parts">
\r
262 <param name="destination.temp.folder" value="${temp.folder}/"/>
\r
264 <antcall target="gather.sources">
\r
265 <param name="destination.temp.folder" value="${temp.folder}/"/>
\r
268 <fileset dir="${temp.folder}">
\r
269 <include name="**/*.bin${logExtension}"/>
\r
272 <zip destfile="${plugin.destination}/com.ibm.wala.j2ee_1.0.0.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
\r
273 <delete dir="${temp.folder}"/>
\r