fixed ID bug
[phpeclipse.git] / net.sourceforge.phpeclipse.launching / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="net.sourceforge.phpeclipse.launching" default="build.jars" basedir=".">
3
4         <property name="bootclasspath" value=""/>
5         <property name="basews" value="${ws}"/>
6         <property name="baseos" value="${os}"/>
7         <property name="basearch" value="${arch}"/>
8         <property name="basenl" value="${nl}"/>
9         <property name="javacFailOnError" value="false"/>
10         <property name="javacDebugInfo" value="on"/>
11         <property name="javacVerbose" value="true"/>
12         <property name="javacSource" value="1.3"/>
13         <property name="javacTarget" value="1.2"/>
14         <property name="compilerArg" value=""/>
15
16         <target name="init" depends="properties">
17                 <condition property="pluginTemp" value="${buildTempFolder}/plugins">
18                         <isset property="buildTempFolder"/>
19                 </condition>
20                 <property name="pluginTemp" value="${basedir}"/>
21                 <condition property="build.result.folder" value="${pluginTemp}/net.sourceforge.phpeclipse.launching">
22                         <isset property="buildTempFolder"/>
23                 </condition>
24                 <property name="build.result.folder" value="${basedir}"/>
25                 <property name="temp.folder" value="${basedir}/temp.folder"/>
26                 <property name="plugin.destination" value="${basedir}"/>
27         </target>
28
29         <target name="properties" if="eclipse.running">
30                 <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
31         </target>
32
33         <target name="build.update.jar" depends="init" description="Build the plug-in: net.sourceforge.phpeclipse.launching for an update site.">
34                 <delete dir="${temp.folder}"/>
35                 <mkdir dir="${temp.folder}"/>
36                 <antcall target="build.jars"/>
37                 <antcall target="gather.bin.parts">
38                         <param name="destination.temp.folder" value="${temp.folder}/"/>
39                 </antcall>
40                 <zip zipfile="${plugin.destination}/net.sourceforge.phpeclipse.launching_1.1.0.jar" basedir="${temp.folder}/net.sourceforge.phpeclipse.launching_1.1.0" filesonly="false" whenempty="skip" update="false"/>
41                 <delete dir="${temp.folder}"/>
42         </target>
43
44         <target name="launch.jar" depends="init" unless="launch.jar" description="Create jar: launch.jar.">
45                 <delete dir="${temp.folder}/launch.jar.bin"/>
46                 <mkdir dir="${temp.folder}/launch.jar.bin"/>
47                 <!-- compile the source code -->
48                 <javac destdir="${temp.folder}/launch.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bootclasspath}" source="${javacSource}" target="${javacTarget}"            >
49                         <compilerarg line="${compilerArg}"/>
50                         <classpath>
51                                 <pathelement path="../../plugins/org.eclipse.core.runtime.compatibility_3.0.0/compatibility.jar"/>
52                                 <pathelement path="../../plugins/org.eclipse.core.runtime_3.0.0/runtime.jar"/>
53                                 <pathelement path="../../plugins/org.eclipse.osgi_3.0.0/core.jar"/>
54                                 <pathelement path="../../plugins/org.eclipse.osgi_3.0.0/console.jar"/>
55                                 <pathelement path="../../plugins/org.eclipse.osgi_3.0.0/osgi.jar"/>
56                                 <pathelement path="../../plugins/org.eclipse.osgi_3.0.0/resolver.jar"/>
57                                 <pathelement path="../../plugins/org.eclipse.osgi_3.0.0/defaultAdaptor.jar"/>
58                                 <pathelement path="../../plugins/org.eclipse.osgi_3.0.0/eclipseAdaptor.jar"/>
59                                 <pathelement path="../../plugins/org.eclipse.update.configurator_3.0.0/configurator.jar"/>
60                                 <pathelement path="../../plugins/org.eclipse.ui.ide_3.0.0/ide.jar"/>
61                                 <pathelement path="../../plugins/org.eclipse.ui.win32_3.0.0/ide.jar"/>
62                                 <pathelement path="../../plugins/org.eclipse.ui.win32_3.0.0/workbenchwin32.jar"/>
63                                 <pathelement path="../../plugins/org.eclipse.core.resources_3.0.0/resources.jar"/>
64                                 <pathelement path="../../plugins/org.eclipse.core.resources.win32_3.0.0/resources.jar"/>
65                                 <pathelement path="../../plugins/org.eclipse.core.resources.win32_3.0.0/resources-win32.jar"/>
66                                 <pathelement path="../../plugins/org.eclipse.help_3.0.0/help.jar"/>
67                                 <pathelement path="../../plugins/org.eclipse.ui_3.0.0/ui.jar"/>
68                                 <pathelement path="../../plugins/org.eclipse.swt_3.0.0/ws/${basews}/swt.jar"/>
69                                 <pathelement path="../../plugins/org.eclipse.swt.win32_3.0.0/ws/${basews}/swt.jar"/>
70                                 <pathelement path="../../plugins/org.eclipse.jface_3.0.0/jface.jar"/>
71                                 <pathelement path="../../plugins/org.eclipse.ui.workbench_3.0.0/compatibility.jar"/>
72                                 <pathelement path="../../plugins/org.eclipse.ui.workbench_3.0.0/workbench.jar"/>
73                                 <pathelement path="../../plugins/org.eclipse.ui.workbench.compatibility_3.0.0/compatibility.jar"/>
74                                 <pathelement path="../../plugins/org.eclipse.ui.workbench.compatibility_3.0.0/workbench.jar"/>
75                                 <pathelement path="../../plugins/org.eclipse.core.expressions_3.0.0/expressions.jar"/>
76                                 <pathelement path="../../plugins/org.eclipse.ui.views_3.0.0/views.jar"/>
77                                 <pathelement path="../../plugins/org.eclipse.update.core_3.0.0/updatecore.jar"/>
78                                 <pathelement path="../../plugins/org.eclipse.update.core.win32_3.0.0/updatecore.jar"/>
79                                 <pathelement path="../../plugins/org.eclipse.update.ui_3.0.0/updateui.jar"/>
80                                 <pathelement path="../../plugins/org.eclipse.help.base_3.0.0/helpbase.jar"/>
81                                 <pathelement path="../../plugins/org.apache.lucene_1.3.0/parser.jar"/>
82                                 <pathelement path="../../plugins/org.apache.lucene_1.3.0/lucene-1.3-final.jar"/>
83                                 <pathelement path="../../plugins/org.eclipse.help.appserver_3.0.0/appserver.jar"/>
84                                 <pathelement path="../../plugins/org.eclipse.ui.forms_3.0.0/forms.jar"/>
85                                 <pathelement path="../../plugins/org.eclipse.jface.text_3.0.0/jfacetext.jar"/>
86                                 <pathelement path="../../plugins/org.eclipse.text_3.0.0/text.jar"/>
87                                 <pathelement path="../../plugins/org.eclipse.ui.workbench.texteditor_3.0.0/texteditor.jar"/>
88                                 <pathelement path="../../plugins/org.eclipse.ui.editors_3.0.0/editors.jar"/>
89                                 <pathelement path="../../plugins/org.eclipse.core.filebuffers_3.0.0/filebuffers.jar"/>
90                                 <pathelement path="../../plugins/org.eclipse.debug.core_3.0.0/dtcore.jar"/>
91                                 <pathelement path="../../plugins/org.eclipse.core.variables_3.0.0/variables.jar"/>
92                                 <pathelement path="../../plugins/org.junit_3.8.1/junit.jar"/>
93                                 <pathelement path="../net.sourceforge.phpeclipse/bin"/>
94                                 <pathelement path="../net.sourceforge.phpeclipse/phpeclipse.jar"/>
95                                 <pathelement path="../../plugins/org.eclipse.ui.console_3.0.0/console.jar"/>
96                                 <pathelement path="../../plugins/org.eclipse.search_3.0.0/search.jar"/>
97                                 <pathelement path="../../plugins/org.eclipse.debug.ui_3.0.0/dtui.jar"/>
98                                 <pathelement path="../../plugins/org.eclipse.compare_3.0.0/compare.jar"/>
99                                 <pathelement path="../../plugins/org.eclipse.ui.externaltools_3.0.0/externaltools.jar"/>
100                                 <pathelement path="../net.sourceforge.phpeclipse.quantum.sql/bin"/>
101                                 <pathelement path="../net.sourceforge.phpeclipse.quantum.sql/quantum.jar"/>
102                                 <pathelement path="../net.sourceforge.phpeclipse.debug.core/bin"/>
103                                 <pathelement path="../net.sourceforge.phpeclipse.debug.core/core.jar"/>
104                         </classpath>
105                         <src path="src/"                        />
106                         </javac>
107                 <!-- Copy necessary resources -->
108                 <copy todir="${temp.folder}/launch.jar.bin" failonerror="true">
109                         <fileset dir="src/" excludes="**/*.java"                        />
110                 </copy>
111                 <mkdir dir="${build.result.folder}"/>
112                 <jar jarfile="${build.result.folder}/launch.jar" basedir="${temp.folder}/launch.jar.bin"/>
113                 <delete dir="${temp.folder}/launch.jar.bin"/>
114         </target>
115
116         <target name="launchsrc.zip" depends="init" unless="launchsrc.zip">
117                 <mkdir dir="${build.result.folder}"/>
118                 <zip zipfile="${build.result.folder}/launchsrc.zip" filesonly="false" whenempty="skip" update="false">
119                         <fileset dir="src/" includes="**/*.java"                        />
120                 </zip>
121         </target>
122
123         <target name="build.jars" depends="init" description="Build all the jars for the plug-in: net.sourceforge.phpeclipse.launching.">
124                 <available property="launch.jar" file="${build.result.folder}/launch.jar"/>
125                 <antcall target="launch.jar"/>
126         </target>
127
128         <target name="build.sources" depends="init">
129                 <available property="launchsrc.zip" file="${build.result.folder}/launchsrc.zip"/>
130                 <antcall target="launchsrc.zip"/>
131         </target>
132
133         <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
134                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.launching_1.1.0"/>
135         </target>
136
137         <target name="build.zips" depends="init">
138         </target>
139
140         <target name="gather.sources" depends="init" if="destination.temp.folder">
141                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.launching_1.1.0"/>
142                 <copy file="${build.result.folder}/launchsrc.zip" todir="${destination.temp.folder}/net.sourceforge.phpeclipse.launching_1.1.0" failonerror="false"/>
143         </target>
144
145         <target name="gather.logs" depends="init" if="destination.temp.folder">
146                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.launching_1.1.0"/>
147                 <copy file="${temp.folder}/launch.jar.bin.log" todir="${destination.temp.folder}/net.sourceforge.phpeclipse.launching_1.1.0" failonerror="false"/>
148         </target>
149
150         <target name="clean" depends="init" description="Clean the plug-in: net.sourceforge.phpeclipse.launching of all the zips, jars and logs created.">
151                 <delete file="${build.result.folder}/launch.jar"/>
152                 <delete file="${build.result.folder}/launchsrc.zip"/>
153                 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.launching_1.1.0.jar"/>
154                 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.launching_1.1.0.zip"/>
155                 <delete dir="${temp.folder}"/>
156         </target>
157
158         <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
159                 <eclipse.convertPath fileSystemPath="C:/eclipse3m9/workspace/net.sourceforge.phpeclipse.launching" property="resourcePath"/>
160                 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
161         </target>
162
163         <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: net.sourceforge.phpeclipse.launching.">
164                 <delete dir="${temp.folder}"/>
165                 <mkdir dir="${temp.folder}"/>
166                 <antcall target="build.jars"/>
167                 <antcall target="build.sources"/>
168                 <antcall target="gather.bin.parts">
169                         <param name="destination.temp.folder" value="${temp.folder}/"/>
170                 </antcall>
171                 <antcall target="gather.sources">
172                         <param name="destination.temp.folder" value="${temp.folder}/"/>
173                 </antcall>
174                 <delete>
175                         <fileset dir="${temp.folder}" includes="**/*.bin.log"                   />
176                 </delete>
177                 <zip zipfile="${plugin.destination}/net.sourceforge.phpeclipse.launching_1.1.0.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
178                 <delete dir="${temp.folder}"/>
179         </target>
180
181 </project>