...
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.sql / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="net.sourceforge.phpeclipse.sql" 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.sql"/>
11                 <property name="version.suffix" value="_1.0.1"/>
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}/phpeclipsesql.jar" todir="${destination.temp.folder}/${full.name}"/>
36         </target>
37
38         <target name="phpeclipsesql.jar" depends="init" unless="phpeclipsesql.jar">
39                 <property name="destdir" value="${temp.folder}/phpeclipsesql.jar.bin"/>
40                 <delete dir="${temp.folder}/phpeclipsesql.jar.bin"/>
41                 <mkdir dir="${temp.folder}/phpeclipsesql.jar.bin"/>
42                 <!-- compile the source code -->
43                 <javac destdir="${temp.folder}/phpeclipsesql.jar.bin" failonerror="false" verbose="true" debug="on" includeAntRuntime="no" bootclasspath="${bootclasspath}" classpath="../../plugins/org.eclipse.ui.win32_2.1.0/workbenchwin32.jar;../../plugins/org.eclipse.jface.text_2.1.0/jfacetext.jar;../../plugins/org.eclipse.ui.workbench_2.1.0/workbench.jar;../../plugins/org.eclipse.swt_2.1.0/ws/${ws}/swt.jar;../../plugins/org.eclipse.core.resources_2.1.0/bin;../../plugins/org.eclipse.swt_2.1.0/bin;../../plugins/org.eclipse.core.runtime_2.1.0/runtime.jar;../../plugins/org.eclipse.ui.win32_2.1.0/workbench.jar;../../plugins/org.eclipse.core.runtime_2.1.0/bin;../../plugins/org.eclipse.ui.workbench.texteditor_2.1.0/bin;../../plugins/org.eclipse.ui_2.1.0/bin;../../plugins/org.eclipse.ui.editors_2.1.0/bin;../../plugins/org.eclipse.jface.text_2.1.0/bin;../../plugins/org.eclipse.ui.views_2.1.0/bin;../../plugins/org.eclipse.ui_2.1.0/ui.jar;../../plugins/org.eclipse.jface_2.1.0/jface.jar;../../plugins/org.eclipse.core.boot_2.1.0/bin;../../plugins/org.eclipse.core.resources.win32_2.1.0/resources.jar;../../plugins/org.eclipse.ui.workbench.texteditor_2.1.0/texteditor.jar;../../plugins/org.eclipse.ui.views_2.1.0/views.jar;../../plugins/org.eclipse.core.boot_2.1.0/boot.jar;../../plugins/org.eclipse.core.resources_2.1.0/resources.jar;../../plugins/org.eclipse.text_2.1.0/bin;../../plugins/org.eclipse.jface_2.1.0/bin;../../plugins/org.eclipse.ui.workbench_2.1.0/bin;../../plugins/org.eclipse.swt.win32_2.1.0/ws/${ws}/swt.jar;../../plugins/org.eclipse.ui.editors_2.1.0/editors.jar;../../plugins/org.eclipse.text_2.1.0/text.jar">
44                         <src path="src/"/>
45                 </javac>
46                 <!-- copy necessary resources -->
47                 <copy todir="${temp.folder}/phpeclipsesql.jar.bin">
48                         <fileset dir="src/" excludes="**/*.java"/>
49                 </copy>
50                 <mkdir dir="${build.result.folder}"/>
51                 <jar jarfile="${build.result.folder}/phpeclipsesql.jar" basedir="${temp.folder}/phpeclipsesql.jar.bin"/>
52                 <delete dir="${temp.folder}/phpeclipsesql.jar.bin"/>
53         </target>
54
55         <target name="phpeclipsesqlsrc.zip" depends="init" unless="phpeclipsesqlsrc.zip">
56                 <mkdir dir="${build.result.folder}"/>
57                 <zip zipfile="${build.result.folder}/phpeclipsesqlsrc.zip" filesonly="false">
58                         <fileset dir="src/" includes="**/*.java"/>
59                 </zip>
60         </target>
61
62         <target name="build.jars" depends="init">
63                 <available property="phpeclipsesql.jar" file="${build.result.folder}/phpeclipsesql.jar"/>
64                 <antcall target="phpeclipsesql.jar"/>
65         </target>
66
67         <target name="build.sources" depends="init">
68                 <available property="phpeclipsesqlsrc.zip" file="${build.result.folder}/phpeclipsesqlsrc.zip"/>
69                 <antcall target="phpeclipsesqlsrc.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}/phpeclipsesqlsrc.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}/phpeclipsesql.jar.bin.log" todir="${destination.temp.folder}/${full.name}"/>
83         </target>
84
85         <target name="clean" depends="init">
86                 <delete file="${build.result.folder}/phpeclipsesql.jar"/>
87                 <delete file="${build.result.folder}/phpeclipsesqlsrc.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>