1) Open port 7869 for dbg communication if we run a non remote debug session, as...
[phpeclipse.git] / net.sourceforge.phpeclipse.nl1 / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="net.sourceforge.phpeclipse.nl1" 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="fragment" value="net.sourceforge.phpeclipse.nl1"/>
14                 <property name="version.suffix" value="_1.0.9"/>
15                 <property name="full.name" value="${fragment}${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.nl1 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}/nl1.jar" todir="${destination.temp.folder}/${full.name}"/>
39                 <copy todir="${destination.temp.folder}/${full.name}">
40                         <fileset dir="${basedir}" includes="fragment.xml,*.jar,nl1.jar"/>
41                 </copy>
42         </target>
43
44         <target name="nl1.jar" depends="init" unless="nl1.jar" description="Create jar: nl1.jar.">
45                 <property name="destdir" value="${temp.folder}/nl1.jar.bin"/>
46                 <delete dir="${temp.folder}/nl1.jar.bin"/>
47                 <mkdir dir="${temp.folder}/nl1.jar.bin"/>
48                 <!-- compile the source code -->
49                 <javac destdir="${temp.folder}/nl1.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bootclasspath}" classpath="../../plugins/org.eclipse.core.boot_2.1.1/bin;../../plugins/org.eclipse.core.boot_2.1.1/boot.jar;../net.sourceforge.phpeclipse/bin;../net.sourceforge.phpeclipse/phpeclipse.jar;../../plugins/org.eclipse.core.runtime_2.1.1/bin;../../plugins/org.eclipse.core.runtime_2.1.1/runtime.jar;../../plugins/org.apache.xerces_4.0.13/bin;../../plugins/org.apache.xerces_4.0.13/xmlParserAPIs.jar;../../plugins/org.apache.xerces_4.0.13/xercesImpl.jar;../../plugins/org.eclipse.core.resources_2.1.1/bin;../../plugins/org.eclipse.core.resources_2.1.1/resources.jar;../../plugins/org.eclipse.core.resources.win32_2.1.0/resources.jar;../../plugins/org.eclipse.ui_2.1.1/bin;../../plugins/org.eclipse.ui_2.1.1/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.1/bin;../../plugins/org.eclipse.help_2.1.1/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.1/bin;../../plugins/org.eclipse.swt_2.1.1/ws/${ws}/swt.jar;../../plugins/org.eclipse.swt.win32_2.1.1/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.1/bin;../../plugins/org.eclipse.jface_2.1.1/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.1/bin;../../plugins/org.eclipse.ui.workbench_2.1.1/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.ui.externaltools_2.1.1/bin;../../plugins/org.eclipse.ui.externaltools_2.1.1/externaltools.jar;../../plugins/org.apache.ant_1.5.3/bin;../../plugins/org.apache.ant_1.5.3/ant.jar;../../plugins/org.apache.ant_1.5.3/optional.jar;../../plugins/org.eclipse.ant.core_2.1.1/bin;../../plugins/org.eclipse.ant.core_2.1.1/antsupport.jar;../../plugins/org.eclipse.debug.core_2.1.0/bin;../../plugins/org.eclipse.debug.core_2.1.0/dtcore.jar;../../plugins/org.eclipse.debug.ui_2.1.1/bin;../../plugins/org.eclipse.debug.ui_2.1.1/dtui.jar;../../plugins/org.eclipse.search_2.1.1/bin;../../plugins/org.eclipse.search_2.1.1/search.jar;../../plugins/org.eclipse.update.ui_2.1.1/bin;../../plugins/org.eclipse.update.ui_2.1.1/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">
50                         <src path="src/"/>
51                 </javac>
52                 <!-- copy necessary resources -->
53                 <copy todir="${temp.folder}/nl1.jar.bin">
54                         <fileset dir="src/" excludes="**/*.java"/>
55                 </copy>
56                 <mkdir dir="${build.result.folder}"/>
57                 <jar jarfile="${build.result.folder}/nl1.jar" basedir="${temp.folder}/nl1.jar.bin"/>
58                 <delete dir="${temp.folder}/nl1.jar.bin"/>
59         </target>
60
61         <target name="nl1src.zip" depends="init" unless="nl1.jar">
62                 <mkdir dir="${build.result.folder}"/>
63                 <zip zipfile="${build.result.folder}/nl1src.zip" filesonly="false" update="no">
64                         <fileset dir="src/" includes="**/*.java"/>
65                 </zip>
66         </target>
67
68         <target name="build.jars" depends="init" description="Build all the jars for the plug-in: net.sourceforge.phpeclipse.nl1.">
69                 <available property="nl1.jar" file="${build.result.folder}/nl1.jar"/>
70                 <antcall target="nl1.jar"/>
71         </target>
72
73         <target name="build.sources" depends="init">
74                 <available property="nl1src.zip" file="${build.result.folder}/nl1src.zip"/>
75                 <antcall target="nl1src.zip"/>
76         </target>
77
78                 <target name="build.zips" depends="init">
79                 </target>
80
81         <target name="gather.sources" depends="init" if="destination.temp.folder">
82                 <mkdir dir="${destination.temp.folder}/${full.name}"/>
83                 <copy file="${build.result.folder}/nl1src.zip" todir="${destination.temp.folder}/${full.name}"/>
84         </target>
85
86         <target name="gather.logs" depends="init" if="destination.temp.folder">
87                 <mkdir dir="${destination.temp.folder}/${full.name}"/>
88                 <copy file="${temp.folder}/nl1.jar.bin.log" todir="${destination.temp.folder}/${full.name}"/>
89         </target>
90
91         <target name="clean" depends="init" description="Clean the plug-in: net.sourceforge.phpeclipse.nl1 of all the zips, jars and logs created.">
92                 <delete file="${build.result.folder}/nl1.jar"/>
93                 <delete file="${build.result.folder}/nl1src.zip"/>
94                 <delete file="${plugin.destination}/${full.name}.jar"/>
95                 <delete file="${plugin.destination}/${full.name}.zip"/>
96                 <delete dir="${temp.folder}"/>
97         </target>
98
99         <target name="refresh" depends="init" if="eclipse.running">
100                 <eclipse.convertPath fileSystemPath="D:\eclipse\workspace\net.sourceforge.phpeclipse.nl1\" property="resourcePath"/>
101                 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
102         </target>
103
104         <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: net.sourceforge.phpeclipse.nl1.">
105                 <delete dir="${temp.folder}"/>
106                 <mkdir dir="${temp.folder}"/>
107                 <antcall target="build.jars"/>
108                 <antcall target="build.sources"/>
109                 <antcall target="gather.bin.parts">
110                         <param name="destination.temp.folder" value="${temp.folder}/"/>
111                 </antcall>
112                 <antcall target="gather.sources">
113                         <param name="destination.temp.folder" value="${temp.folder}/"/>
114                 </antcall>
115                 <delete>
116                         <fileset dir="${temp.folder}" includes="**/*.bin.log"/>
117                 </delete>
118                 <antcall target="zip.folder"/>
119                 <delete dir="${temp.folder}"/>
120         </target>
121         <target name="zip.folder" depends="init">
122                 <zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" update="no" excludes="**/*.bin.log"/>
123         </target>
124
125 </project>