1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="net.sourceforge.phpeclipse.core" default="build.jars" basedir=".">
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=""/>
16 <target name="init" depends="properties">
17 <condition property="pluginTemp" value="${buildTempFolder}/plugins">
18 <isset property="buildTempFolder"/>
20 <property name="pluginTemp" value="${basedir}"/>
21 <condition property="build.result.folder" value="${pluginTemp}/net.sourceforge.phpeclipse.core">
22 <isset property="buildTempFolder"/>
24 <property name="build.result.folder" value="${basedir}"/>
25 <property name="temp.folder" value="${basedir}/temp.folder"/>
26 <property name="plugin.destination" value="${basedir}"/>
29 <target name="properties" if="eclipse.running">
30 <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
33 <target name="build.update.jar" depends="init" description="Build the plug-in: net.sourceforge.phpeclipse.core 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}/"/>
40 <zip zipfile="${plugin.destination}/net.sourceforge.phpeclipse.core_1.1.1.jar" basedir="${temp.folder}/net.sourceforge.phpeclipse.core_1.1.1" filesonly="false" whenempty="skip" update="false"/>
41 <delete dir="${temp.folder}"/>
44 <target name="webcore.jar" depends="init" unless="webcore.jar" description="Create jar: webcore.jar.">
45 <delete dir="${temp.folder}/webcore.jar.bin"/>
46 <mkdir dir="${temp.folder}/webcore.jar.bin"/>
47 <!-- compile the source code -->
48 <javac destdir="${temp.folder}/webcore.jar.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bootclasspath}" source="${javacSource}" target="${javacTarget}" >
49 <compilerarg line="${compilerArg}"/>
51 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.runtime_3.0.1/runtime.jar"/>
52 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/core.jar"/>
53 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/console.jar"/>
54 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/osgi.jar"/>
55 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/resolver.jar"/>
56 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/defaultAdaptor.jar"/>
57 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/eclipseAdaptor.jar"/>
58 <pathelement path="../../../eclipse301/plugins/org.eclipse.text_3.0.1/text.jar"/>
62 <!-- Copy necessary resources -->
63 <copy todir="${temp.folder}/webcore.jar.bin" failonerror="true">
64 <fileset dir="src/" excludes="**/*.java, **/package.htm*" />
66 <mkdir dir="${build.result.folder}"/>
67 <jar jarfile="${build.result.folder}/webcore.jar" basedir="${temp.folder}/webcore.jar.bin"/>
68 <delete dir="${temp.folder}/webcore.jar.bin"/>
71 <target name="webcoresrc.zip" depends="init" unless="webcoresrc.zip">
72 <mkdir dir="${build.result.folder}"/>
73 <zip zipfile="${build.result.folder}/webcoresrc.zip" filesonly="false" whenempty="skip" update="false">
74 <fileset dir="src/" includes="**/*.java" />
78 <target name="build.jars" depends="init" description="Build all the jars for the plug-in: net.sourceforge.phpeclipse.core.">
79 <available property="webcore.jar" file="${build.result.folder}/webcore.jar"/>
80 <antcall target="webcore.jar"/>
83 <target name="build.sources" depends="init">
84 <available property="webcoresrc.zip" file="${build.result.folder}/webcoresrc.zip"/>
85 <antcall target="webcoresrc.zip"/>
88 <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
89 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.1.1"/>
90 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.1.1" failonerror="true">
91 <fileset dir="${build.result.folder}" includes="webcore.jar" />
93 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.1.1" failonerror="true">
94 <fileset dir="${basedir}" includes="plugin.xml,webcore.jar" />
98 <target name="build.zips" depends="init">
101 <target name="gather.sources" depends="init" if="destination.temp.folder">
102 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.1.1"/>
103 <copy file="${build.result.folder}/webcoresrc.zip" todir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.1.1" failonerror="false"/>
104 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.1.1" failonerror="false">
105 <fileset dir="${basedir}" includes="src/" />
109 <target name="gather.logs" depends="init" if="destination.temp.folder">
110 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.1.1"/>
111 <copy file="${temp.folder}/webcore.jar.bin.log" todir="${destination.temp.folder}/net.sourceforge.phpeclipse.core_1.1.1" failonerror="false"/>
114 <target name="clean" depends="init" description="Clean the plug-in: net.sourceforge.phpeclipse.core of all the zips, jars and logs created.">
115 <delete file="${build.result.folder}/webcore.jar"/>
116 <delete file="${build.result.folder}/webcoresrc.zip"/>
117 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.core_1.1.1.jar"/>
118 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.core_1.1.1.zip"/>
119 <delete dir="${temp.folder}"/>
122 <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
123 <eclipse.convertPath fileSystemPath="C:/eclipse3/workspace/net.sourceforge.phpeclipse.core" property="resourcePath"/>
124 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
127 <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: net.sourceforge.phpeclipse.core.">
128 <delete dir="${temp.folder}"/>
129 <mkdir dir="${temp.folder}"/>
130 <antcall target="build.jars"/>
131 <antcall target="build.sources"/>
132 <antcall target="gather.bin.parts">
133 <param name="destination.temp.folder" value="${temp.folder}/"/>
135 <antcall target="gather.sources">
136 <param name="destination.temp.folder" value="${temp.folder}/"/>
139 <fileset dir="${temp.folder}" includes="**/*.bin.log" />
141 <zip zipfile="${plugin.destination}/net.sourceforge.phpeclipse.core_1.1.1.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
142 <delete dir="${temp.folder}"/>