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