Fixed problem opening other sources
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.core / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="net.sourceforge.phpeclipse.debug.core" default="build.jars" basedir=".">
3
4         <property name="bootclasspath" value=""/>
5         <property name="ws" value="win32"/>
6         <property name="os" value="win32"/>
7         <property name="arch" value="x86"/>
8
9         <target name="init" depends="properties">
10                 <property name="plugin" value="net.sourceforge.phpeclipse.debug.core"/>
11                 <property name="version.suffix" value="_1.0.3"/>
12                 <property name="full.name" value="${plugin}${version.suffix}"/>
13                 <property name="temp.folder" value="${basedir}/temp.folder"/>
14                 <property name="plugin.destination" value="${basedir}"/>
15                 <property name="build.result.folder" value="${basedir}"/>
16         </target>
17
18         <target name="properties" if="eclipse.running">
19                 <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
20         </target>
21
22         <target name="build.update.jar" depends="init">
23                 <delete dir="${temp.folder}"/>
24                 <mkdir dir="${temp.folder}"/>
25                 <antcall target="build.jars"/>
26                 <antcall target="gather.bin.parts">
27                         <param name="destination.temp.folder" value="${temp.folder}/"/>
28                 </antcall>
29                 <zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false"/>
30                 <delete dir="${temp.folder}"/>
31         </target>
32
33         <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
34                 <mkdir dir="${destination.temp.folder}/${full.name}"/>
35                 <copy file="${build.result.folder}/core.jar" todir="${destination.temp.folder}/${full.name}"/>
36         </target>
37
38         <target name="core.jar" depends="init" unless="core.jar">
39                 <property name="destdir" value="${temp.folder}/core.jar.bin"/>
40                 <delete dir="${temp.folder}/core.jar.bin"/>
41                 <mkdir dir="${temp.folder}/core.jar.bin"/>
42                 <!-- compile the source code -->
43                 <javac destdir="${temp.folder}/core.jar.bin" failonerror="false" verbose="true" debug="on" includeAntRuntime="no" bootclasspath="${bootclasspath}" classpath="../../plugins/org.eclipse.core.resources.win32_2.0.0/resources.jar;../net.sourceforge.phpeclipse/phpeclipse.jar;../../plugins/org.eclipse.debug.ui_2.0.0/dtui.jar;../../plugins/org.eclipse.debug.core_2.0.0/dtcore.jar;../../plugins/org.junit_3.7.0/bin;../../plugins/org.eclipse.debug.ui_2.0.0/bin;../../plugins/org.eclipse.core.boot_2.0.0/bin;../../plugins/org.eclipse.core.runtime_2.0.0/runtime.jar;../../plugins/org.eclipse.core.boot_2.0.0/boot.jar;../net.sourceforge.phpeclipse/bin;../../plugins/org.eclipse.debug.core_2.0.0/bin;../../plugins/org.eclipse.core.resources_2.0.0/bin;../../plugins/org.eclipse.core.resources_2.0.0/resources.jar;../../plugins/org.eclipse.core.runtime_2.0.0/bin;../../plugins/org.junit_3.7.0/junit.jar">
44                         <src path="src/"/>
45                 </javac>
46                 <!-- copy necessary resources -->
47                 <copy todir="${temp.folder}/core.jar.bin">
48                         <fileset dir="src/" excludes="**/*.java"/>
49                 </copy>
50                 <mkdir dir="${build.result.folder}"/>
51                 <jar jarfile="${build.result.folder}/core.jar" basedir="${temp.folder}/core.jar.bin"/>
52                 <delete dir="${temp.folder}/core.jar.bin"/>
53         </target>
54
55         <target name="coresrc.zip" depends="init" unless="coresrc.zip">
56                 <mkdir dir="${build.result.folder}"/>
57                 <zip zipfile="${build.result.folder}/coresrc.zip" filesonly="false">
58                         <fileset dir="src/" includes="**/*.java"/>
59                 </zip>
60         </target>
61
62         <target name="build.jars" depends="init">
63                 <available property="core.jar" file="${build.result.folder}/core.jar"/>
64                 <antcall target="core.jar"/>
65         </target>
66
67         <target name="build.sources" depends="init">
68                 <available property="coresrc.zip" file="${build.result.folder}/coresrc.zip"/>
69                 <antcall target="coresrc.zip"/>
70         </target>
71
72         <target name="build.zips" depends="init">
73         </target>
74
75         <target name="gather.sources" depends="init" if="destination.temp.folder">
76                 <mkdir dir="${destination.temp.folder}/${full.name}"/>
77                 <copy file="${build.result.folder}/coresrc.zip" todir="${destination.temp.folder}/${full.name}"/>
78         </target>
79
80         <target name="gather.logs" depends="init" if="destination.temp.folder">
81                 <mkdir dir="${destination.temp.folder}/${full.name}"/>
82                 <copy file="${temp.folder}/core.jar.bin.log" todir="${destination.temp.folder}/${full.name}"/>
83         </target>
84
85         <target name="clean" depends="init">
86                 <delete file="${build.result.folder}/core.jar"/>
87                 <delete file="${build.result.folder}/coresrc.zip"/>
88                 <delete file="${plugin.destination}/${full.name}.jar"/>
89                 <delete file="${plugin.destination}/${full.name}.zip"/>
90                 <delete dir="${temp.folder}"/>
91         </target>
92
93         <target name="refresh" depends="init" if="eclipse.running">
94                 <eclipse.refreshLocal resource="${plugin}" depth="infinite"/>
95         </target>
96
97         <target name="zip.plugin" depends="init">
98                 <delete dir="${temp.folder}"/>
99                 <mkdir dir="${temp.folder}"/>
100                 <antcall target="build.jars"/>
101                 <antcall target="build.sources"/>
102                 <antcall target="gather.bin.parts">
103                         <param name="destination.temp.folder" value="${temp.folder}/"/>
104                 </antcall>
105                 <antcall target="gather.sources">
106                         <param name="destination.temp.folder" value="${temp.folder}/"/>
107                 </antcall>
108                 <delete>
109                         <fileset dir="${temp.folder}" includes="**/*.bin.log"/>
110                 </delete>
111                 <zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true"/>
112                 <delete dir="${temp.folder}"/>
113         </target>
114
115 </project>