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