Bumped versions to 1.1.6.
[phpeclipse.git] / net.sourceforge.phpeclipse.smarty.ui / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="net.sourceforge.phpdt.smarty.ui" 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.smarty.ui">
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.phpdt.smarty.ui 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.phpdt.smarty.ui_1.1.2.jar" basedir="${temp.folder}/net.sourceforge.phpdt.smarty.ui_1.1.2" filesonly="false" whenempty="skip" update="false"/>
41                 <delete dir="${temp.folder}"/>
42         </target>
43
44         <target name="smartyui.jar" depends="init" unless="smartyui.jar" description="Create jar: smartyui.jar.">
45                 <delete dir="${temp.folder}/smartyui.jar.bin"/>
46                 <mkdir dir="${temp.folder}/smartyui.jar.bin"/>
47                 <!-- compile the source code -->
48                 <javac destdir="${temp.folder}/smartyui.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="${build.result.folder}/../net.sourceforge.phpeclipse.xml.ui/bin"/>
52                                 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.xml.ui/xmlui.jar"/>
53                                 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.core/bin"/>
54                                 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.core/webcore.jar"/>
55                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.runtime_3.0.1/runtime.jar"/>
56                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/core.jar"/>
57                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/console.jar"/>
58                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/osgi.jar"/>
59                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/resolver.jar"/>
60                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/defaultAdaptor.jar"/>
61                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/eclipseAdaptor.jar"/>
62                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.text_3.0.1/text.jar"/>
63                                 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.xml.core/bin"/>
64                                 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.xml.core/xmlcore.jar"/>
65                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.resources_3.0.1/resources.jar"/>
66                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.resources.win32_3.0.0/resources.jar"/>
67                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.resources.win32_3.0.0/resources-win32.jar"/>
68                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.runtime.compatibility_3.0.0/compatibility.jar"/>
69                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.update.configurator_3.0.0/configurator.jar"/>
70                                 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.ui/bin"/>
71                                 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.ui/ui.jar"/>
72                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.jface.text_3.0.1/jfacetext.jar"/>
73                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.swt_3.0.1/ws/${basews}/swt.jar"/>
74                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.swt.win32_3.0.1/ws/${basews}/swt.jar"/>
75                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.swt.win32_3.0.1"/>
76                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.jface_3.0.0/jface.jar"/>
77                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui_3.0.1/ui.jar"/>
78                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.help_3.0.0/help.jar"/>
79                                 <pathelement path="../org.eclipse.ui.workbench/bin"/>
80                                 <pathelement path="../org.eclipse.ui.workbench/compatibility.jar"/>
81                                 <pathelement path="../org.eclipse.ui.workbench/workbench.jar"/>
82                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui.workbench.compatibility_3.0.0/compatibility.jar"/>
83                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui.workbench.compatibility_3.0.0/workbench.jar"/>
84                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.expressions_3.0.0/expressions.jar"/>
85                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui.editors_3.0.1/editors.jar"/>
86                                 <pathelement path="../org.eclipse.ui.ide/bin"/>
87                                 <pathelement path="../org.eclipse.ui.ide/ide.jar"/>
88                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui.win32_3.0.1/ide.jar"/>
89                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui.win32_3.0.1/workbenchwin32.jar"/>
90                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui.views_3.0.0/views.jar"/>
91                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.update.core_3.0.1/updatecore.jar"/>
92                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.update.core.win32_3.0.0/updatecore.jar"/>
93                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.update.ui_3.0.1/updateui.jar"/>
94                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.help.base_3.0.1/helpbase.jar"/>
95                                 <pathelement path="../../../eclipse301/plugins/org.apache.lucene_1.3.1/parser.jar"/>
96                                 <pathelement path="../../../eclipse301/plugins/org.apache.lucene_1.3.1/lucene-1.3-final.jar"/>
97                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.help.appserver_3.0.0/appserver.jar"/>
98                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui.forms_3.0.0/forms.jar"/>
99                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.ui.workbench.texteditor_3.0.1/texteditor.jar"/>
100                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.filebuffers_3.0.1/filebuffers.jar"/>
101                                 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.webbrowser/bin"/>
102                                 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.webbrowser/webbrowser.jar"/>
103                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.compare_3.0.0/compare.jar"/>
104                         </classpath>
105                         <src path="src/"                        />
106                         </javac>
107                 <!-- Copy necessary resources -->
108                 <copy todir="${temp.folder}/smartyui.jar.bin" failonerror="true">
109                         <fileset dir="src/" excludes="**/*.java, **/package.htm*"                       />
110                 </copy>
111                 <mkdir dir="${build.result.folder}"/>
112                 <jar jarfile="${build.result.folder}/smartyui.jar" basedir="${temp.folder}/smartyui.jar.bin"/>
113                 <delete dir="${temp.folder}/smartyui.jar.bin"/>
114         </target>
115
116         <target name="smartyuisrc.zip" depends="init" unless="smartyuisrc.zip">
117                 <mkdir dir="${build.result.folder}"/>
118                 <zip zipfile="${build.result.folder}/smartyuisrc.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.phpdt.smarty.ui.">
124                 <available property="smartyui.jar" file="${build.result.folder}/smartyui.jar"/>
125                 <antcall target="smartyui.jar"/>
126         </target>
127
128         <target name="build.sources" depends="init">
129                 <available property="smartyuisrc.zip" file="${build.result.folder}/smartyuisrc.zip"/>
130                 <antcall target="smartyuisrc.zip"/>
131         </target>
132
133         <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
134                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpdt.smarty.ui_1.1.2"/>
135                 <copy todir="${destination.temp.folder}/net.sourceforge.phpdt.smarty.ui_1.1.2" failonerror="true">
136                         <fileset dir="${build.result.folder}" includes="smartyui.jar"                   />
137                 </copy>
138                 <copy todir="${destination.temp.folder}/net.sourceforge.phpdt.smarty.ui_1.1.2" failonerror="true">
139                         <fileset dir="${basedir}" includes="plugin.xml,icons/,cpl-v10.html,smartyui.jar"                        />
140                 </copy>
141         </target>
142
143         <target name="build.zips" depends="init">
144         </target>
145
146         <target name="gather.sources" depends="init" if="destination.temp.folder">
147                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpdt.smarty.ui_1.1.2"/>
148                 <copy file="${build.result.folder}/smartyuisrc.zip" todir="${destination.temp.folder}/net.sourceforge.phpdt.smarty.ui_1.1.2" failonerror="false"/>
149                 <copy todir="${destination.temp.folder}/net.sourceforge.phpdt.smarty.ui_1.1.2" failonerror="false">
150                         <fileset dir="${basedir}" includes="src/,.classpath,.cvsignore,.project"                        />
151                 </copy>
152         </target>
153
154         <target name="gather.logs" depends="init" if="destination.temp.folder">
155                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpdt.smarty.ui_1.1.2"/>
156                 <copy file="${temp.folder}/smartyui.jar.bin.log" todir="${destination.temp.folder}/net.sourceforge.phpdt.smarty.ui_1.1.2" failonerror="false"/>
157         </target>
158
159         <target name="clean" depends="init" description="Clean the plug-in: net.sourceforge.phpdt.smarty.ui of all the zips, jars and logs created.">
160                 <delete file="${build.result.folder}/smartyui.jar"/>
161                 <delete file="${build.result.folder}/smartyuisrc.zip"/>
162                 <delete file="${plugin.destination}/net.sourceforge.phpdt.smarty.ui_1.1.2.jar"/>
163                 <delete file="${plugin.destination}/net.sourceforge.phpdt.smarty.ui_1.1.2.zip"/>
164                 <delete dir="${temp.folder}"/>
165         </target>
166
167         <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
168                 <eclipse.convertPath fileSystemPath="C:/eclipse3/workspace/net.sourceforge.phpeclipse.smarty.ui" property="resourcePath"/>
169                 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
170         </target>
171
172         <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: net.sourceforge.phpdt.smarty.ui.">
173                 <delete dir="${temp.folder}"/>
174                 <mkdir dir="${temp.folder}"/>
175                 <antcall target="build.jars"/>
176                 <antcall target="build.sources"/>
177                 <antcall target="gather.bin.parts">
178                         <param name="destination.temp.folder" value="${temp.folder}/"/>
179                 </antcall>
180                 <antcall target="gather.sources">
181                         <param name="destination.temp.folder" value="${temp.folder}/"/>
182                 </antcall>
183                 <delete>
184                         <fileset dir="${temp.folder}" includes="**/*.bin.log"                   />
185                 </delete>
186                 <zip zipfile="${plugin.destination}/net.sourceforge.phpdt.smarty.ui_1.1.2.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
187                 <delete dir="${temp.folder}"/>
188         </target>
189
190 </project>