Make PHPeclipse compile correctly under Eclipse Version: 3.2.0 Build id: I20060519...
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.monitor.core / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="net.sourceforge.phpeclipse.monitor.core" 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.monitor.core">
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.monitor.core 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.monitor.core_1.1.2.jar" basedir="${temp.folder}/net.sourceforge.phpeclipse.monitor.core_1.1.2" filesonly="false" whenempty="skip" update="false"/>
41                 <delete dir="${temp.folder}"/>
42         </target>
43
44         <target name="monitorcore.jar" depends="init" unless="monitorcore.jar" description="Create jar: monitorcore.jar.">
45                 <delete dir="${temp.folder}/monitorcore.jar.bin"/>
46                 <mkdir dir="${temp.folder}/monitorcore.jar.bin"/>
47                 <!-- compile the source code -->
48                 <javac destdir="${temp.folder}/monitorcore.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="../../../eclipse301/plugins/org.eclipse.core.runtime_3.0.1/runtime.jar"/>
52                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/core.jar"/>
53                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/console.jar"/>
54                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/osgi.jar"/>
55                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/resolver.jar"/>
56                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/defaultAdaptor.jar"/>
57                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/eclipseAdaptor.jar"/>
58                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui_3.0.1/ui.jar"/>
59                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.help_3.0.0/help.jar"/>
60                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.swt_3.0.1/ws/${basews}/swt.jar"/>
61                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.swt.win32_3.0.1/ws/${basews}/swt.jar"/>
62                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.swt.win32_3.0.1"/>
63                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.jface_3.0.0/jface.jar"/>
64                                 <pathelement path="../org.eclipse.ui.workbench/bin"/>
65                                 <pathelement path="../org.eclipse.ui.workbench/compatibility.jar"/>
66                                 <pathelement path="../org.eclipse.ui.workbench/workbench.jar"/>
67                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui.workbench.compatibility_3.0.0/compatibility.jar"/>
68                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui.workbench.compatibility_3.0.0/workbench.jar"/>
69                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.expressions_3.0.0/expressions.jar"/>
70                         </classpath>
71                         <src path="src/"                        />
72                         </javac>
73                 <!-- Copy necessary resources -->
74                 <copy todir="${temp.folder}/monitorcore.jar.bin" failonerror="true">
75                         <fileset dir="src/" excludes="**/*.java, **/package.htm*"                       />
76                 </copy>
77                 <mkdir dir="${build.result.folder}"/>
78                 <jar jarfile="${build.result.folder}/monitorcore.jar" basedir="${temp.folder}/monitorcore.jar.bin"/>
79                 <delete dir="${temp.folder}/monitorcore.jar.bin"/>
80         </target>
81
82         <target name="monitorcoresrc.zip" depends="init" unless="monitorcoresrc.zip">
83                 <mkdir dir="${build.result.folder}"/>
84                 <zip zipfile="${build.result.folder}/monitorcoresrc.zip" filesonly="false" whenempty="skip" update="false">
85                         <fileset dir="src/" includes="**/*.java"                        />
86                 </zip>
87         </target>
88
89         <target name="build.jars" depends="init" description="Build all the jars for the plug-in: net.sourceforge.phpeclipse.monitor.core.">
90                 <available property="monitorcore.jar" file="${build.result.folder}/monitorcore.jar"/>
91                 <antcall target="monitorcore.jar"/>
92         </target>
93
94         <target name="build.sources" depends="init">
95                 <available property="monitorcoresrc.zip" file="${build.result.folder}/monitorcoresrc.zip"/>
96                 <antcall target="monitorcoresrc.zip"/>
97         </target>
98
99         <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
100                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.monitor.core_1.1.2"/>
101                 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.monitor.core_1.1.2" failonerror="true">
102                         <fileset dir="${build.result.folder}" includes="monitorcore.jar"                        />
103                 </copy>
104                 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.monitor.core_1.1.2" failonerror="true">
105                         <fileset dir="${basedir}" includes="plugin.xml,*.jar,monitorcore.jar,plugin.properties,.options"                        />
106                 </copy>
107         </target>
108
109         <target name="build.zips" depends="init">
110         </target>
111
112         <target name="gather.sources" depends="init" if="destination.temp.folder">
113                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.monitor.core_1.1.2"/>
114                 <copy file="${build.result.folder}/monitorcoresrc.zip" todir="${destination.temp.folder}/net.sourceforge.phpeclipse.monitor.core_1.1.2" failonerror="false"/>
115                 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.monitor.core_1.1.2" failonerror="false">
116                         <fileset dir="${basedir}" includes="build.properties,schema/"                   />
117                 </copy>
118         </target>
119
120         <target name="gather.logs" depends="init" if="destination.temp.folder">
121                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.monitor.core_1.1.2"/>
122                 <copy file="${temp.folder}/monitorcore.jar.bin.log" todir="${destination.temp.folder}/net.sourceforge.phpeclipse.monitor.core_1.1.2" failonerror="false"/>
123         </target>
124
125         <target name="clean" depends="init" description="Clean the plug-in: net.sourceforge.phpeclipse.monitor.core of all the zips, jars and logs created.">
126                 <delete file="${build.result.folder}/monitorcore.jar"/>
127                 <delete file="${build.result.folder}/monitorcoresrc.zip"/>
128                 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.monitor.core_1.1.2.jar"/>
129                 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.monitor.core_1.1.2.zip"/>
130                 <delete dir="${temp.folder}"/>
131         </target>
132
133         <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
134                 <eclipse.convertPath fileSystemPath="C:/eclipse3/workspace/net.sourceforge.phpeclipse.monitor.core" property="resourcePath"/>
135                 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
136         </target>
137
138         <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: net.sourceforge.phpeclipse.monitor.core.">
139                 <delete dir="${temp.folder}"/>
140                 <mkdir dir="${temp.folder}"/>
141                 <antcall target="build.jars"/>
142                 <antcall target="build.sources"/>
143                 <antcall target="gather.bin.parts">
144                         <param name="destination.temp.folder" value="${temp.folder}/"/>
145                 </antcall>
146                 <antcall target="gather.sources">
147                         <param name="destination.temp.folder" value="${temp.folder}/"/>
148                 </antcall>
149                 <delete>
150                         <fileset dir="${temp.folder}" includes="**/*.bin.log"                   />
151                 </delete>
152                 <zip zipfile="${plugin.destination}/net.sourceforge.phpeclipse.monitor.core_1.1.2.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
153                 <delete dir="${temp.folder}"/>
154         </target>
155
156 </project>