30dc662acbb9b7366d10d3236aeead9606ad95ba
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.css.core / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="net.sourceforge.phpeclipse.css.core" 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.css.core">
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.css.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}/"/>
39                 </antcall>
40                 <zip zipfile="${plugin.destination}/net.sourceforge.phpeclipse.css.core_1.1.1.jar" basedir="${temp.folder}/net.sourceforge.phpeclipse.css.core_1.1.1" filesonly="false" whenempty="skip" update="false"/>
41                 <delete dir="${temp.folder}"/>
42         </target>
43
44         <target name="csscore.jar" depends="init" unless="csscore.jar" description="Create jar: csscore.jar.">
45                 <delete dir="${temp.folder}/csscore.jar.bin"/>
46                 <mkdir dir="${temp.folder}/csscore.jar.bin"/>
47                 <!-- compile the source code -->
48                 <javac destdir="${temp.folder}/csscore.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.core/bin"/>
52                                 <pathelement path="${build.result.folder}/../net.sourceforge.phpeclipse.core/webcore.jar"/>
53                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.runtime_3.0.1/runtime.jar"/>
54                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/core.jar"/>
55                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/console.jar"/>
56                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/osgi.jar"/>
57                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/resolver.jar"/>
58                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/defaultAdaptor.jar"/>
59                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.osgi_3.0.1/eclipseAdaptor.jar"/>
60                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.text_3.0.1/text.jar"/>
61                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.resources_3.0.1/resources.jar"/>
62                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.resources.win32_3.0.0/resources.jar"/>
63                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.resources.win32_3.0.0/resources-win32.jar"/>
64                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.core.runtime.compatibility_3.0.0/compatibility.jar"/>
65                                 <pathelement path="../../../eclipse301/plugins/org.eclipse.update.configurator_3.0.0/configurator.jar"/>
66                         </classpath>
67                         <src path="src/"                        />
68                         </javac>
69                 <!-- Copy necessary resources -->
70                 <copy todir="${temp.folder}/csscore.jar.bin" failonerror="true">
71                         <fileset dir="src/" excludes="**/*.java, **/package.htm*"                       />
72                 </copy>
73                 <mkdir dir="${build.result.folder}"/>
74                 <jar jarfile="${build.result.folder}/csscore.jar" basedir="${temp.folder}/csscore.jar.bin"/>
75                 <delete dir="${temp.folder}/csscore.jar.bin"/>
76         </target>
77
78         <target name="csscoresrc.zip" depends="init" unless="csscoresrc.zip">
79                 <mkdir dir="${build.result.folder}"/>
80                 <zip zipfile="${build.result.folder}/csscoresrc.zip" filesonly="false" whenempty="skip" update="false">
81                         <fileset dir="src/" includes="**/*.java"                        />
82                 </zip>
83         </target>
84
85         <target name="build.jars" depends="init" description="Build all the jars for the plug-in: net.sourceforge.phpeclipse.css.core.">
86                 <available property="csscore.jar" file="${build.result.folder}/csscore.jar"/>
87                 <antcall target="csscore.jar"/>
88         </target>
89
90         <target name="build.sources" depends="init">
91                 <available property="csscoresrc.zip" file="${build.result.folder}/csscoresrc.zip"/>
92                 <antcall target="csscoresrc.zip"/>
93         </target>
94
95         <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
96                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.css.core_1.1.1"/>
97                 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.css.core_1.1.1" failonerror="true">
98                         <fileset dir="${build.result.folder}" includes="csscore.jar"                    />
99                 </copy>
100                 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.css.core_1.1.1" failonerror="true">
101                         <fileset dir="${basedir}" includes="plugin.xml,*.jar,csscore.jar,plugin.properties"                     />
102                 </copy>
103         </target>
104
105         <target name="build.zips" depends="init">
106         </target>
107
108         <target name="gather.sources" depends="init" if="destination.temp.folder">
109                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.css.core_1.1.1"/>
110                 <copy file="${build.result.folder}/csscoresrc.zip" todir="${destination.temp.folder}/net.sourceforge.phpeclipse.css.core_1.1.1" failonerror="false"/>
111                 <copy todir="${destination.temp.folder}/net.sourceforge.phpeclipse.css.core_1.1.1" failonerror="false">
112                         <fileset dir="${basedir}" includes="src/,schema/"                       />
113                 </copy>
114         </target>
115
116         <target name="gather.logs" depends="init" if="destination.temp.folder">
117                 <mkdir dir="${destination.temp.folder}/net.sourceforge.phpeclipse.css.core_1.1.1"/>
118                 <copy file="${temp.folder}/csscore.jar.bin.log" todir="${destination.temp.folder}/net.sourceforge.phpeclipse.css.core_1.1.1" failonerror="false"/>
119         </target>
120
121         <target name="clean" depends="init" description="Clean the plug-in: net.sourceforge.phpeclipse.css.core of all the zips, jars and logs created.">
122                 <delete file="${build.result.folder}/csscore.jar"/>
123                 <delete file="${build.result.folder}/csscoresrc.zip"/>
124                 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.css.core_1.1.1.jar"/>
125                 <delete file="${plugin.destination}/net.sourceforge.phpeclipse.css.core_1.1.1.zip"/>
126                 <delete dir="${temp.folder}"/>
127         </target>
128
129         <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
130                 <eclipse.convertPath fileSystemPath="C:/eclipse3/workspace/net.sourceforge.phpeclipse.css.core" property="resourcePath"/>
131                 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
132         </target>
133
134         <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: net.sourceforge.phpeclipse.css.core.">
135                 <delete dir="${temp.folder}"/>
136                 <mkdir dir="${temp.folder}"/>
137                 <antcall target="build.jars"/>
138                 <antcall target="build.sources"/>
139                 <antcall target="gather.bin.parts">
140                         <param name="destination.temp.folder" value="${temp.folder}/"/>
141                 </antcall>
142                 <antcall target="gather.sources">
143                         <param name="destination.temp.folder" value="${temp.folder}/"/>
144                 </antcall>
145                 <delete>
146                         <fileset dir="${temp.folder}" includes="**/*.bin.log"                   />
147                 </delete>
148                 <zip zipfile="${plugin.destination}/net.sourceforge.phpeclipse.css.core_1.1.1.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
149                 <delete dir="${temp.folder}"/>
150         </target>
151
152 </project>