changes for new Action
[phpeclipse.git] / net.sourceforge.phpeclipse / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="net.sourceforge.phpeclipse" 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         <property name="javacFailOnError" value="false"/>
9         <property name="javacDebugInfo" value="on"/>
10         <property name="javacVerbose" value="true"/>
11
12         <target name="init" depends="properties">
13                 <property name="plugin" value="net.sourceforge.phpeclipse"/>
14                 <property name="version.suffix" value="_1.0.6a"/>
15                 <property name="full.name" value="${plugin}${version.suffix}"/>
16                 <property name="temp.folder" value="${basedir}/temp.folder"/>
17                 <property name="plugin.destination" value="${basedir}"/>
18                 <property name="build.result.folder" value="${basedir}"/>
19         </target>
20
21         <target name="properties" if="eclipse.running">
22                 <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
23         </target>
24
25         <target name="build.update.jar" depends="init" description="Build the plug-in: net.sourceforge.phpeclipse for an update site.">
26                 <delete dir="${temp.folder}"/>
27                 <mkdir dir="${temp.folder}"/>
28                 <antcall target="build.jars"/>
29                 <antcall target="gather.bin.parts">
30                         <param name="destination.temp.folder" value="${temp.folder}/"/>
31                 </antcall>
32                 <zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" update="no"/>
33                 <delete dir="${temp.folder}"/>
34         </target>
35
36         <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
37                 <mkdir dir="${destination.temp.folder}/${full.name}"/>
38                 <copy file="${build.result.folder}/phpeclipse.jar" todir="${destination.temp.folder}/${full.name}"/>
39                 <copy todir="${destination.temp.folder}/${full.name}/icons">
40                         <fileset dir="${basedir}/icons"/>
41                 </copy>
42                 <copy file="${basedir}/TODO" todir="${destination.temp.folder}/${full.name}"/>
43                 <copy file="${basedir}/install.txt" todir="${destination.temp.folder}/${full.name}"/>
44                 <copy file="${basedir}/plugin.properties" todir="${destination.temp.folder}/${full.name}"/>
45                 <copy file="${basedir}/plugin.xml" todir="${destination.temp.folder}/${full.name}"/>
46         </target>
47
48         <target name="phpeclipse.jar" depends="init" unless="phpeclipse.jar" description="Create jar: phpeclipse.jar.">
49                 <property name="destdir" value="${temp.folder}/phpeclipse.jar.bin"/>
50                 <delete dir="${destdir}"/>
51                 <mkdir dir="${destdir}"/>
52                 <!-- compile the source code -->
53                 <javac destdir="${destdir}" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bootclasspath}" classpath="../../plugins/org.eclipse.core.boot_2.1.0/bin;../../plugins/org.eclipse.core.boot_2.1.0/boot.jar;../../plugins/org.eclipse.core.runtime_2.1.0/bin;../../plugins/org.eclipse.core.runtime_2.1.0/runtime.jar;../../plugins/org.apache.xerces_4.0.7/bin;../../plugins/org.apache.xerces_4.0.7/xmlParserAPIs.jar;../../plugins/org.apache.xerces_4.0.7/xercesImpl.jar;../../plugins/org.eclipse.core.resources_2.1.0/bin;../../plugins/org.eclipse.core.resources_2.1.0/resources.jar;../../plugins/org.eclipse.core.resources.win32_2.1.0/resources.jar;../../plugins/org.eclipse.ui_2.1.0/bin;../../plugins/org.eclipse.ui_2.1.0/ui.jar;../../plugins/org.eclipse.update.core_2.1.0/bin;../../plugins/org.eclipse.update.core_2.1.0/updatecore.jar;../../plugins/org.eclipse.update.core.win32_2.1.0/updatecore.jar;../../plugins/org.eclipse.help_2.1.0/bin;../../plugins/org.eclipse.help_2.1.0/help.jar;../../plugins/org.apache.lucene_1.2.1/bin;../../plugins/org.apache.lucene_1.2.1/parser.jar;../../plugins/org.apache.lucene_1.2.1/lucene-1.2.jar;../../plugins/org.eclipse.help.appserver_2.1.0/bin;../../plugins/org.eclipse.help.appserver_2.1.0/appserver.jar;../../plugins/org.eclipse.swt_2.1.0/bin;../../plugins/org.eclipse.swt_2.1.0/ws/${ws}/swt.jar;../../plugins/org.eclipse.swt.win32_2.1.0/ws/${ws}/swt.jar;../../plugins/org.eclipse.text_2.1.0/bin;../../plugins/org.eclipse.text_2.1.0/text.jar;../../plugins/org.eclipse.jface_2.1.0/bin;../../plugins/org.eclipse.jface_2.1.0/jface.jar;../../plugins/org.eclipse.jface.text_2.1.0/bin;../../plugins/org.eclipse.jface.text_2.1.0/jfacetext.jar;../../plugins/org.eclipse.ui.views_2.1.0/bin;../../plugins/org.eclipse.ui.views_2.1.0/views.jar;../../plugins/org.eclipse.ui.workbench_2.1.0/bin;../../plugins/org.eclipse.ui.workbench_2.1.0/workbench.jar;../../plugins/org.eclipse.ui.win32_2.1.0/workbench.jar;../../plugins/org.eclipse.ui.win32_2.1.0/bin;../../plugins/org.eclipse.ui.win32_2.1.0/workbenchwin32.jar;../../plugins/org.eclipse.ui.workbench.texteditor_2.1.0/bin;../../plugins/org.eclipse.ui.workbench.texteditor_2.1.0/texteditor.jar;../../plugins/org.eclipse.ui.editors_2.1.0/bin;../../plugins/org.eclipse.ui.editors_2.1.0/editors.jar;../../plugins/org.eclipse.debug.ui_2.1.0/bin;../../plugins/org.eclipse.debug.ui_2.1.0/dtui.jar;../../plugins/org.eclipse.debug.core_2.1.0/bin;../../plugins/org.eclipse.debug.core_2.1.0/dtcore.jar;../../plugins/org.junit_3.8.1/bin;../../plugins/org.junit_3.8.1/junit.jar;../../plugins/org.eclipse.update.ui_2.1.0/bin;../../plugins/org.eclipse.update.ui_2.1.0/updateui.jar;../../plugins/org.eclipse.update.ui.win32_2.1.0/updateui.jar;../../plugins/org.eclipse.update.ui.win32_2.1.0/bin;../../plugins/org.eclipse.update.ui.win32_2.1.0/updateui32.jar;../../plugins/org.eclipse.update.ui.forms_2.1.0/bin;../../plugins/org.eclipse.update.ui.forms_2.1.0/forms.jar">
54                         <src path="src/"/>
55                 </javac>
56                 <!-- copy necessary resources -->
57                 <copy todir="${destdir}">
58                         <fileset dir="src/" excludes="**/*.java"/>
59                 </copy>
60                 <mkdir dir="${build.result.folder}"/>
61                 <jar jarfile="${build.result.folder}/phpeclipse.jar" basedir="${destdir}"/>
62                 <delete dir="${destdir}"/>
63         </target>
64
65         <target name="phpeclipsesrc.zip" depends="init" unless="phpeclipse.jar">
66                 <mkdir dir="${build.result.folder}"/>
67                 <zip zipfile="${build.result.folder}/phpeclipsesrc.zip" filesonly="false" update="no">
68                         <fileset dir="src/" includes="**/*.java"/>
69                 </zip>
70         </target>
71
72         <target name="build.jars" depends="init" description="Build all the jars for the plug-in: net.sourceforge.phpeclipse.">
73                 <available property="phpeclipse.jar" file="${build.result.folder}/phpeclipse.jar"/>
74                 <antcall target="phpeclipse.jar"/>
75         </target>
76
77         <target name="build.sources" depends="init">
78                 <available property="phpeclipsesrc.zip" file="${build.result.folder}/phpeclipsesrc.zip"/>
79                 <antcall target="phpeclipsesrc.zip"/>
80         </target>
81
82                 <target name="build.zips" depends="init">
83                 </target>
84
85         <target name="gather.sources" depends="init" if="destination.temp.folder">
86                 <mkdir dir="${destination.temp.folder}/${full.name}"/>
87                 <copy file="${build.result.folder}/phpeclipsesrc.zip" todir="${destination.temp.folder}/${full.name}"/>
88         </target>
89
90         <target name="gather.logs" depends="init" if="destination.temp.folder">
91                 <mkdir dir="${destination.temp.folder}/${full.name}"/>
92                 <copy file="${temp.folder}/phpeclipse.jar.bin.log" todir="${destination.temp.folder}/${full.name}"/>
93         </target>
94
95         <target name="clean" depends="init" description="Clean the plug-in: net.sourceforge.phpeclipse of all the zips, jars and logs created.">
96                 <delete file="${build.result.folder}/phpeclipse.jar"/>
97                 <delete file="${build.result.folder}/phpeclipsesrc.zip"/>
98                 <delete file="${plugin.destination}/${full.name}.jar"/>
99                 <delete file="${plugin.destination}/${full.name}.zip"/>
100                 <delete dir="${temp.folder}"/>
101         </target>
102
103         <target name="refresh" depends="init" if="eclipse.running">
104                 <eclipse.convertPath fileSystemPath="D:\eclipse_21\workspace\net.sourceforge.phpeclipse\" property="resourcePath"/>
105                 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
106         </target>
107
108         <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: net.sourceforge.phpeclipse.">
109                 <delete dir="${temp.folder}"/>
110                 <mkdir dir="${temp.folder}"/>
111                 <antcall target="build.jars"/>
112                 <antcall target="build.sources"/>
113                 <antcall target="gather.bin.parts">
114                         <param name="destination.temp.folder" value="${temp.folder}/"/>
115                 </antcall>
116                 <antcall target="gather.sources">
117                         <param name="destination.temp.folder" value="${temp.folder}/"/>
118                 </antcall>
119                 <delete>
120                         <fileset dir="${temp.folder}" includes="**/*.bin.log"/>
121                 </delete>
122                 <antcall target="zip.folder"/>
123                 <delete dir="${temp.folder}"/>
124         </target>
125         <target name="zip.folder" depends="init">
126                 <zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" update="no" excludes="**/*.bin.log"/>
127         </target>
128
129 </project>