jtulach@52
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
jtulach@52
|
2 |
<!--
|
jtulach@52
|
3 |
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
jtulach@52
|
4 |
*** EDIT ../build.xml INSTEAD ***
|
jtulach@52
|
5 |
|
jtulach@52
|
6 |
For the purpose of easier reading the script
|
jtulach@52
|
7 |
is divided into following sections:
|
jtulach@52
|
8 |
|
jtulach@52
|
9 |
- initialization
|
jtulach@52
|
10 |
- compilation
|
jtulach@52
|
11 |
- jar
|
jtulach@52
|
12 |
- execution
|
jtulach@52
|
13 |
- debugging
|
jtulach@52
|
14 |
- javadoc
|
jtulach@52
|
15 |
- junit compilation
|
jtulach@52
|
16 |
- junit execution
|
jtulach@52
|
17 |
- junit debugging
|
jtulach@52
|
18 |
- applet
|
jtulach@52
|
19 |
- cleanup
|
jtulach@52
|
20 |
|
jtulach@52
|
21 |
-->
|
jtulach@52
|
22 |
<project name="subclassingsolution-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1">
|
jtulach@52
|
23 |
<target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
|
jtulach@52
|
24 |
<!--
|
jtulach@52
|
25 |
======================
|
jtulach@52
|
26 |
INITIALIZATION SECTION
|
jtulach@52
|
27 |
======================
|
jtulach@52
|
28 |
-->
|
jtulach@52
|
29 |
<target name="-pre-init">
|
jtulach@52
|
30 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
31 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
32 |
</target>
|
jtulach@52
|
33 |
<target name="-init-private" depends="-pre-init">
|
jtulach@52
|
34 |
<property file="nbproject/private/private.properties"/>
|
jtulach@52
|
35 |
</target>
|
jtulach@52
|
36 |
<target name="-init-user" depends="-pre-init,-init-private">
|
jtulach@52
|
37 |
<property file="${user.properties.file}"/>
|
jtulach@52
|
38 |
<!-- The two properties below are usually overridden -->
|
jtulach@52
|
39 |
<!-- by the active platform. Just a fallback. -->
|
jtulach@52
|
40 |
<property name="default.javac.source" value="1.4"/>
|
jtulach@52
|
41 |
<property name="default.javac.target" value="1.4"/>
|
jtulach@52
|
42 |
</target>
|
jtulach@52
|
43 |
<target name="-init-project" depends="-pre-init,-init-private,-init-user">
|
jtulach@52
|
44 |
<property file="nbproject/project.properties"/>
|
jtulach@52
|
45 |
</target>
|
jtulach@52
|
46 |
<target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
|
jtulach@52
|
47 |
<available file="${manifest.file}" property="manifest.available"/>
|
jtulach@52
|
48 |
<condition property="manifest.available+main.class">
|
jtulach@52
|
49 |
<and>
|
jtulach@52
|
50 |
<isset property="manifest.available"/>
|
jtulach@52
|
51 |
<isset property="main.class"/>
|
jtulach@52
|
52 |
<not>
|
jtulach@52
|
53 |
<equals arg1="${main.class}" arg2="" trim="true"/>
|
jtulach@52
|
54 |
</not>
|
jtulach@52
|
55 |
</and>
|
jtulach@52
|
56 |
</condition>
|
jtulach@52
|
57 |
<condition property="manifest.available+main.class+mkdist.available">
|
jtulach@52
|
58 |
<and>
|
jtulach@52
|
59 |
<istrue value="${manifest.available+main.class}"/>
|
jtulach@52
|
60 |
<isset property="libs.CopyLibs.classpath"/>
|
jtulach@52
|
61 |
</and>
|
jtulach@52
|
62 |
</condition>
|
jtulach@52
|
63 |
<condition property="have.tests">
|
jtulach@52
|
64 |
<or>
|
jtulach@52
|
65 |
<available file="${test.src.dir}"/>
|
jtulach@52
|
66 |
</or>
|
jtulach@52
|
67 |
</condition>
|
jtulach@52
|
68 |
<condition property="have.sources">
|
jtulach@52
|
69 |
<or>
|
jtulach@52
|
70 |
<available file="${src.dir}"/>
|
jtulach@52
|
71 |
</or>
|
jtulach@52
|
72 |
</condition>
|
jtulach@52
|
73 |
<condition property="netbeans.home+have.tests">
|
jtulach@52
|
74 |
<and>
|
jtulach@52
|
75 |
<isset property="netbeans.home"/>
|
jtulach@52
|
76 |
<isset property="have.tests"/>
|
jtulach@52
|
77 |
</and>
|
jtulach@52
|
78 |
</condition>
|
jtulach@52
|
79 |
<condition property="no.javadoc.preview">
|
jtulach@52
|
80 |
<isfalse value="${javadoc.preview}"/>
|
jtulach@52
|
81 |
</condition>
|
jtulach@52
|
82 |
<property name="run.jvmargs" value=""/>
|
jtulach@52
|
83 |
<property name="javac.compilerargs" value=""/>
|
jtulach@52
|
84 |
<property name="work.dir" value="${basedir}"/>
|
jtulach@52
|
85 |
<condition property="no.deps">
|
jtulach@52
|
86 |
<and>
|
jtulach@52
|
87 |
<istrue value="${no.dependencies}"/>
|
jtulach@52
|
88 |
</and>
|
jtulach@52
|
89 |
</condition>
|
jtulach@52
|
90 |
<property name="javac.debug" value="true"/>
|
jtulach@52
|
91 |
<property name="javadoc.preview" value="true"/>
|
jtulach@52
|
92 |
<property name="application.args" value=""/>
|
jtulach@52
|
93 |
</target>
|
jtulach@52
|
94 |
<target name="-post-init">
|
jtulach@52
|
95 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
96 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
97 |
</target>
|
jtulach@52
|
98 |
<target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
|
jtulach@52
|
99 |
<fail unless="src.dir">Must set src.dir</fail>
|
jtulach@52
|
100 |
<fail unless="test.src.dir">Must set test.src.dir</fail>
|
jtulach@52
|
101 |
<fail unless="build.dir">Must set build.dir</fail>
|
jtulach@52
|
102 |
<fail unless="dist.dir">Must set dist.dir</fail>
|
jtulach@52
|
103 |
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
|
jtulach@52
|
104 |
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
|
jtulach@52
|
105 |
<fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
|
jtulach@52
|
106 |
<fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
|
jtulach@52
|
107 |
<fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
|
jtulach@52
|
108 |
<fail unless="dist.jar">Must set dist.jar</fail>
|
jtulach@52
|
109 |
</target>
|
jtulach@52
|
110 |
<target name="-init-macrodef-property">
|
jtulach@52
|
111 |
<macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
|
jtulach@52
|
112 |
<attribute name="name"/>
|
jtulach@52
|
113 |
<attribute name="value"/>
|
jtulach@52
|
114 |
<sequential>
|
jtulach@52
|
115 |
<property name="@{name}" value="${@{value}}"/>
|
jtulach@52
|
116 |
</sequential>
|
jtulach@52
|
117 |
</macrodef>
|
jtulach@52
|
118 |
</target>
|
jtulach@52
|
119 |
<target name="-init-macrodef-javac">
|
jtulach@52
|
120 |
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
|
jtulach@52
|
121 |
<attribute name="srcdir" default="${src.dir}"/>
|
jtulach@52
|
122 |
<attribute name="destdir" default="${build.classes.dir}"/>
|
jtulach@52
|
123 |
<attribute name="classpath" default="${javac.classpath}"/>
|
jtulach@52
|
124 |
<attribute name="debug" default="${javac.debug}"/>
|
jtulach@52
|
125 |
<element name="customize" optional="true"/>
|
jtulach@52
|
126 |
<sequential>
|
jtulach@52
|
127 |
<depend srcdir="@{srcdir}" destdir="@{destdir}" cache="${build.dir}/depcache">
|
jtulach@52
|
128 |
<classpath>
|
jtulach@52
|
129 |
<path path="@{classpath}"/>
|
jtulach@52
|
130 |
</classpath>
|
jtulach@52
|
131 |
</depend>
|
jtulach@52
|
132 |
<javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
|
jtulach@52
|
133 |
<classpath>
|
jtulach@52
|
134 |
<path path="@{classpath}"/>
|
jtulach@52
|
135 |
</classpath>
|
jtulach@52
|
136 |
<compilerarg line="${javac.compilerargs}"/>
|
jtulach@52
|
137 |
<customize/>
|
jtulach@52
|
138 |
</javac>
|
jtulach@52
|
139 |
</sequential>
|
jtulach@52
|
140 |
</macrodef>
|
jtulach@52
|
141 |
</target>
|
jtulach@52
|
142 |
<target name="-init-macrodef-junit">
|
jtulach@52
|
143 |
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
jtulach@52
|
144 |
<attribute name="includes" default="**/*Test.java"/>
|
jtulach@52
|
145 |
<sequential>
|
jtulach@52
|
146 |
<junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
|
jtulach@52
|
147 |
<batchtest todir="${build.test.results.dir}">
|
jtulach@52
|
148 |
<fileset dir="${test.src.dir}" includes="@{includes}"/>
|
jtulach@52
|
149 |
</batchtest>
|
jtulach@52
|
150 |
<classpath>
|
jtulach@52
|
151 |
<path path="${run.test.classpath}"/>
|
jtulach@52
|
152 |
</classpath>
|
jtulach@52
|
153 |
<syspropertyset>
|
jtulach@52
|
154 |
<propertyref prefix="test-sys-prop."/>
|
jtulach@52
|
155 |
<mapper type="glob" from="test-sys-prop.*" to="*"/>
|
jtulach@52
|
156 |
</syspropertyset>
|
jtulach@52
|
157 |
<formatter type="brief" usefile="false"/>
|
jtulach@52
|
158 |
<formatter type="xml"/>
|
jtulach@52
|
159 |
<jvmarg line="${run.jvmargs}"/>
|
jtulach@52
|
160 |
</junit>
|
jtulach@52
|
161 |
</sequential>
|
jtulach@52
|
162 |
</macrodef>
|
jtulach@52
|
163 |
</target>
|
jtulach@52
|
164 |
<target name="-init-macrodef-nbjpda">
|
jtulach@52
|
165 |
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
jtulach@52
|
166 |
<attribute name="name" default="${main.class}"/>
|
jtulach@52
|
167 |
<attribute name="classpath" default="${debug.classpath}"/>
|
jtulach@52
|
168 |
<attribute name="stopclassname" default=""/>
|
jtulach@52
|
169 |
<sequential>
|
jtulach@52
|
170 |
<nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
|
jtulach@52
|
171 |
<classpath>
|
jtulach@52
|
172 |
<path path="@{classpath}"/>
|
jtulach@52
|
173 |
</classpath>
|
jtulach@52
|
174 |
</nbjpdastart>
|
jtulach@52
|
175 |
</sequential>
|
jtulach@52
|
176 |
</macrodef>
|
jtulach@52
|
177 |
<macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
|
jtulach@52
|
178 |
<attribute name="dir" default="${build.classes.dir}"/>
|
jtulach@52
|
179 |
<sequential>
|
jtulach@52
|
180 |
<nbjpdareload>
|
jtulach@52
|
181 |
<fileset includes="${fix.includes}*.class" dir="@{dir}"/>
|
jtulach@52
|
182 |
</nbjpdareload>
|
jtulach@52
|
183 |
</sequential>
|
jtulach@52
|
184 |
</macrodef>
|
jtulach@52
|
185 |
</target>
|
jtulach@52
|
186 |
<target name="-init-macrodef-debug">
|
jtulach@52
|
187 |
<macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
jtulach@52
|
188 |
<attribute name="classname" default="${main.class}"/>
|
jtulach@52
|
189 |
<attribute name="classpath" default="${debug.classpath}"/>
|
jtulach@52
|
190 |
<element name="customize" optional="true"/>
|
jtulach@52
|
191 |
<sequential>
|
jtulach@52
|
192 |
<java fork="true" classname="@{classname}" dir="${work.dir}">
|
jtulach@52
|
193 |
<jvmarg value="-Xdebug"/>
|
jtulach@52
|
194 |
<jvmarg value="-Xnoagent"/>
|
jtulach@52
|
195 |
<jvmarg value="-Djava.compiler=none"/>
|
jtulach@52
|
196 |
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
|
jtulach@52
|
197 |
<jvmarg line="${run.jvmargs}"/>
|
jtulach@52
|
198 |
<classpath>
|
jtulach@52
|
199 |
<path path="@{classpath}"/>
|
jtulach@52
|
200 |
</classpath>
|
jtulach@52
|
201 |
<syspropertyset>
|
jtulach@52
|
202 |
<propertyref prefix="run-sys-prop."/>
|
jtulach@52
|
203 |
<mapper type="glob" from="run-sys-prop.*" to="*"/>
|
jtulach@52
|
204 |
</syspropertyset>
|
jtulach@52
|
205 |
<customize/>
|
jtulach@52
|
206 |
</java>
|
jtulach@52
|
207 |
</sequential>
|
jtulach@52
|
208 |
</macrodef>
|
jtulach@52
|
209 |
</target>
|
jtulach@52
|
210 |
<target name="-init-macrodef-java">
|
jtulach@52
|
211 |
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
jtulach@52
|
212 |
<attribute name="classname" default="${main.class}"/>
|
jtulach@52
|
213 |
<element name="customize" optional="true"/>
|
jtulach@52
|
214 |
<sequential>
|
jtulach@52
|
215 |
<java fork="true" classname="@{classname}" dir="${work.dir}">
|
jtulach@52
|
216 |
<jvmarg line="${run.jvmargs}"/>
|
jtulach@52
|
217 |
<classpath>
|
jtulach@52
|
218 |
<path path="${run.classpath}"/>
|
jtulach@52
|
219 |
</classpath>
|
jtulach@52
|
220 |
<syspropertyset>
|
jtulach@52
|
221 |
<propertyref prefix="run-sys-prop."/>
|
jtulach@52
|
222 |
<mapper type="glob" from="run-sys-prop.*" to="*"/>
|
jtulach@52
|
223 |
</syspropertyset>
|
jtulach@52
|
224 |
<customize/>
|
jtulach@52
|
225 |
</java>
|
jtulach@52
|
226 |
</sequential>
|
jtulach@52
|
227 |
</macrodef>
|
jtulach@52
|
228 |
</target>
|
jtulach@52
|
229 |
<target name="-init-presetdef-jar">
|
jtulach@52
|
230 |
<presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
|
jtulach@52
|
231 |
<jar jarfile="${dist.jar}" compress="${jar.compress}">
|
jtulach@52
|
232 |
<j2seproject1:fileset dir="${build.classes.dir}"/>
|
jtulach@52
|
233 |
</jar>
|
jtulach@52
|
234 |
</presetdef>
|
jtulach@52
|
235 |
</target>
|
jtulach@52
|
236 |
<target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
|
jtulach@52
|
237 |
<!--
|
jtulach@52
|
238 |
===================
|
jtulach@52
|
239 |
COMPILATION SECTION
|
jtulach@52
|
240 |
===================
|
jtulach@52
|
241 |
-->
|
jtulach@52
|
242 |
<target name="deps-jar" depends="init" unless="no.deps"/>
|
jtulach@52
|
243 |
<target name="-pre-pre-compile" depends="init,deps-jar">
|
jtulach@52
|
244 |
<mkdir dir="${build.classes.dir}"/>
|
jtulach@52
|
245 |
</target>
|
jtulach@52
|
246 |
<target name="-pre-compile">
|
jtulach@52
|
247 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
248 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
249 |
</target>
|
jtulach@52
|
250 |
<target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
|
jtulach@52
|
251 |
<j2seproject3:javac/>
|
jtulach@52
|
252 |
<copy todir="${build.classes.dir}">
|
jtulach@52
|
253 |
<fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
|
jtulach@52
|
254 |
</copy>
|
jtulach@52
|
255 |
</target>
|
jtulach@52
|
256 |
<target name="-post-compile">
|
jtulach@52
|
257 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
258 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
259 |
</target>
|
jtulach@52
|
260 |
<target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
|
jtulach@52
|
261 |
<target name="-pre-compile-single">
|
jtulach@52
|
262 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
263 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
264 |
</target>
|
jtulach@52
|
265 |
<target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
|
jtulach@52
|
266 |
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
jtulach@52
|
267 |
<j2seproject3:javac>
|
jtulach@52
|
268 |
<customize>
|
jtulach@52
|
269 |
<patternset includes="${javac.includes}"/>
|
jtulach@52
|
270 |
</customize>
|
jtulach@52
|
271 |
</j2seproject3:javac>
|
jtulach@52
|
272 |
</target>
|
jtulach@52
|
273 |
<target name="-post-compile-single">
|
jtulach@52
|
274 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
275 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
276 |
</target>
|
jtulach@52
|
277 |
<target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
|
jtulach@52
|
278 |
<!--
|
jtulach@52
|
279 |
====================
|
jtulach@52
|
280 |
JAR BUILDING SECTION
|
jtulach@52
|
281 |
====================
|
jtulach@52
|
282 |
-->
|
jtulach@52
|
283 |
<target name="-pre-pre-jar" depends="init">
|
jtulach@52
|
284 |
<dirname property="dist.jar.dir" file="${dist.jar}"/>
|
jtulach@52
|
285 |
<mkdir dir="${dist.jar.dir}"/>
|
jtulach@52
|
286 |
</target>
|
jtulach@52
|
287 |
<target name="-pre-jar">
|
jtulach@52
|
288 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
289 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
290 |
</target>
|
jtulach@52
|
291 |
<target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
|
jtulach@52
|
292 |
<j2seproject1:jar/>
|
jtulach@52
|
293 |
</target>
|
jtulach@52
|
294 |
<target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
|
jtulach@52
|
295 |
<j2seproject1:jar manifest="${manifest.file}"/>
|
jtulach@52
|
296 |
</target>
|
jtulach@52
|
297 |
<target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
|
jtulach@52
|
298 |
<j2seproject1:jar manifest="${manifest.file}">
|
jtulach@52
|
299 |
<j2seproject1:manifest>
|
jtulach@52
|
300 |
<j2seproject1:attribute name="Main-Class" value="${main.class}"/>
|
jtulach@52
|
301 |
</j2seproject1:manifest>
|
jtulach@52
|
302 |
</j2seproject1:jar>
|
jtulach@52
|
303 |
<echo>To run this application from the command line without Ant, try:</echo>
|
jtulach@52
|
304 |
<property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
|
jtulach@52
|
305 |
<property name="dist.jar.resolved" location="${dist.jar}"/>
|
jtulach@52
|
306 |
<pathconvert property="run.classpath.with.dist.jar">
|
jtulach@52
|
307 |
<path path="${run.classpath}"/>
|
jtulach@52
|
308 |
<map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
|
jtulach@52
|
309 |
</pathconvert>
|
jtulach@52
|
310 |
<echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
|
jtulach@52
|
311 |
</target>
|
jtulach@52
|
312 |
<target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
|
jtulach@52
|
313 |
<property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
|
jtulach@52
|
314 |
<pathconvert property="run.classpath.without.build.classes.dir">
|
jtulach@52
|
315 |
<path path="${run.classpath}"/>
|
jtulach@52
|
316 |
<map from="${build.classes.dir.resolved}" to=""/>
|
jtulach@52
|
317 |
</pathconvert>
|
jtulach@52
|
318 |
<pathconvert property="jar.classpath" pathsep=" ">
|
jtulach@52
|
319 |
<path path="${run.classpath.without.build.classes.dir}"/>
|
jtulach@52
|
320 |
<chainedmapper>
|
jtulach@52
|
321 |
<flattenmapper/>
|
jtulach@52
|
322 |
<globmapper from="*" to="lib/*"/>
|
jtulach@52
|
323 |
</chainedmapper>
|
jtulach@52
|
324 |
</pathconvert>
|
jtulach@52
|
325 |
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
|
jtulach@52
|
326 |
<copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
|
jtulach@52
|
327 |
<fileset dir="${build.classes.dir}"/>
|
jtulach@52
|
328 |
<manifest>
|
jtulach@52
|
329 |
<attribute name="Main-Class" value="${main.class}"/>
|
jtulach@52
|
330 |
<attribute name="Class-Path" value="${jar.classpath}"/>
|
jtulach@52
|
331 |
</manifest>
|
jtulach@52
|
332 |
</copylibs>
|
jtulach@52
|
333 |
<echo>To run this application from the command line without Ant, try:</echo>
|
jtulach@52
|
334 |
<property name="dist.jar.resolved" location="${dist.jar}"/>
|
jtulach@52
|
335 |
<echo>java -jar "${dist.jar.resolved}"</echo>
|
jtulach@52
|
336 |
</target>
|
jtulach@52
|
337 |
<target name="-post-jar">
|
jtulach@52
|
338 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
339 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
340 |
</target>
|
jtulach@52
|
341 |
<target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
|
jtulach@52
|
342 |
<!--
|
jtulach@52
|
343 |
=================
|
jtulach@52
|
344 |
EXECUTION SECTION
|
jtulach@52
|
345 |
=================
|
jtulach@52
|
346 |
-->
|
jtulach@52
|
347 |
<target name="run" depends="init,compile" description="Run a main class.">
|
jtulach@52
|
348 |
<j2seproject1:java>
|
jtulach@52
|
349 |
<customize>
|
jtulach@52
|
350 |
<arg line="${application.args}"/>
|
jtulach@52
|
351 |
</customize>
|
jtulach@52
|
352 |
</j2seproject1:java>
|
jtulach@52
|
353 |
</target>
|
jtulach@52
|
354 |
<target name="run-single" depends="init,compile-single">
|
jtulach@52
|
355 |
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
jtulach@52
|
356 |
<j2seproject1:java classname="${run.class}"/>
|
jtulach@52
|
357 |
</target>
|
jtulach@52
|
358 |
<!--
|
jtulach@52
|
359 |
=================
|
jtulach@52
|
360 |
DEBUGGING SECTION
|
jtulach@52
|
361 |
=================
|
jtulach@52
|
362 |
-->
|
jtulach@52
|
363 |
<target name="-debug-start-debugger" if="netbeans.home" depends="init">
|
jtulach@52
|
364 |
<j2seproject1:nbjpdastart name="${debug.class}"/>
|
jtulach@52
|
365 |
</target>
|
jtulach@52
|
366 |
<target name="-debug-start-debuggee" depends="init,compile">
|
jtulach@52
|
367 |
<j2seproject3:debug>
|
jtulach@52
|
368 |
<customize>
|
jtulach@52
|
369 |
<arg line="${application.args}"/>
|
jtulach@52
|
370 |
</customize>
|
jtulach@52
|
371 |
</j2seproject3:debug>
|
jtulach@52
|
372 |
</target>
|
jtulach@52
|
373 |
<target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
|
jtulach@52
|
374 |
<target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
|
jtulach@52
|
375 |
<j2seproject1:nbjpdastart stopclassname="${main.class}"/>
|
jtulach@52
|
376 |
</target>
|
jtulach@52
|
377 |
<target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
|
jtulach@52
|
378 |
<target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
|
jtulach@52
|
379 |
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
|
jtulach@52
|
380 |
<j2seproject3:debug classname="${debug.class}"/>
|
jtulach@52
|
381 |
</target>
|
jtulach@52
|
382 |
<target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
|
jtulach@52
|
383 |
<target name="-pre-debug-fix" depends="init">
|
jtulach@52
|
384 |
<fail unless="fix.includes">Must set fix.includes</fail>
|
jtulach@52
|
385 |
<property name="javac.includes" value="${fix.includes}.java"/>
|
jtulach@52
|
386 |
</target>
|
jtulach@52
|
387 |
<target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
|
jtulach@52
|
388 |
<j2seproject1:nbjpdareload/>
|
jtulach@52
|
389 |
</target>
|
jtulach@52
|
390 |
<target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
|
jtulach@52
|
391 |
<!--
|
jtulach@52
|
392 |
===============
|
jtulach@52
|
393 |
JAVADOC SECTION
|
jtulach@52
|
394 |
===============
|
jtulach@52
|
395 |
-->
|
jtulach@52
|
396 |
<target name="-javadoc-build" depends="init">
|
jtulach@52
|
397 |
<mkdir dir="${dist.javadoc.dir}"/>
|
jtulach@52
|
398 |
<javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
|
jtulach@52
|
399 |
<classpath>
|
jtulach@52
|
400 |
<path path="${javac.classpath}"/>
|
jtulach@52
|
401 |
</classpath>
|
jtulach@52
|
402 |
<sourcepath>
|
jtulach@52
|
403 |
<pathelement location="${src.dir}"/>
|
jtulach@52
|
404 |
</sourcepath>
|
jtulach@52
|
405 |
<packageset dir="${src.dir}" includes="*/**"/>
|
jtulach@52
|
406 |
<fileset dir="${src.dir}" includes="*.java"/>
|
jtulach@52
|
407 |
</javadoc>
|
jtulach@52
|
408 |
</target>
|
jtulach@52
|
409 |
<target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
|
jtulach@52
|
410 |
<nbbrowse file="${dist.javadoc.dir}/index.html"/>
|
jtulach@52
|
411 |
</target>
|
jtulach@52
|
412 |
<target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
|
jtulach@52
|
413 |
<!--
|
jtulach@52
|
414 |
=========================
|
jtulach@52
|
415 |
JUNIT COMPILATION SECTION
|
jtulach@52
|
416 |
=========================
|
jtulach@52
|
417 |
-->
|
jtulach@52
|
418 |
<target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
|
jtulach@52
|
419 |
<mkdir dir="${build.test.classes.dir}"/>
|
jtulach@52
|
420 |
</target>
|
jtulach@52
|
421 |
<target name="-pre-compile-test">
|
jtulach@52
|
422 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
423 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
424 |
</target>
|
jtulach@52
|
425 |
<target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
|
jtulach@52
|
426 |
<j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
|
jtulach@52
|
427 |
<copy todir="${build.test.classes.dir}">
|
jtulach@52
|
428 |
<fileset dir="${test.src.dir}" excludes="**/*.java"/>
|
jtulach@52
|
429 |
</copy>
|
jtulach@52
|
430 |
</target>
|
jtulach@52
|
431 |
<target name="-post-compile-test">
|
jtulach@52
|
432 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
433 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
434 |
</target>
|
jtulach@52
|
435 |
<target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
|
jtulach@52
|
436 |
<target name="-pre-compile-test-single">
|
jtulach@52
|
437 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
438 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
439 |
</target>
|
jtulach@52
|
440 |
<target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
|
jtulach@52
|
441 |
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
jtulach@52
|
442 |
<j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
|
jtulach@52
|
443 |
<customize>
|
jtulach@52
|
444 |
<patternset includes="${javac.includes}"/>
|
jtulach@52
|
445 |
</customize>
|
jtulach@52
|
446 |
</j2seproject3:javac>
|
jtulach@52
|
447 |
<copy todir="${build.test.classes.dir}">
|
jtulach@52
|
448 |
<fileset dir="${test.src.dir}" excludes="**/*.java"/>
|
jtulach@52
|
449 |
</copy>
|
jtulach@52
|
450 |
</target>
|
jtulach@52
|
451 |
<target name="-post-compile-test-single">
|
jtulach@52
|
452 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
453 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
454 |
</target>
|
jtulach@52
|
455 |
<target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
|
jtulach@52
|
456 |
<!--
|
jtulach@52
|
457 |
=======================
|
jtulach@52
|
458 |
JUNIT EXECUTION SECTION
|
jtulach@52
|
459 |
=======================
|
jtulach@52
|
460 |
-->
|
jtulach@52
|
461 |
<target name="-pre-test-run" if="have.tests" depends="init">
|
jtulach@52
|
462 |
<mkdir dir="${build.test.results.dir}"/>
|
jtulach@52
|
463 |
</target>
|
jtulach@52
|
464 |
<target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
|
jtulach@52
|
465 |
<j2seproject3:junit/>
|
jtulach@52
|
466 |
</target>
|
jtulach@52
|
467 |
<target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
|
jtulach@52
|
468 |
<fail if="tests.failed">Some tests failed; see details above.</fail>
|
jtulach@52
|
469 |
</target>
|
jtulach@52
|
470 |
<target name="test-report" if="have.tests" depends="init"/>
|
jtulach@52
|
471 |
<target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
|
jtulach@52
|
472 |
<target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
|
jtulach@52
|
473 |
<target name="-pre-test-run-single" if="have.tests" depends="init">
|
jtulach@52
|
474 |
<mkdir dir="${build.test.results.dir}"/>
|
jtulach@52
|
475 |
</target>
|
jtulach@52
|
476 |
<target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
|
jtulach@52
|
477 |
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
jtulach@52
|
478 |
<j2seproject3:junit includes="${test.includes}"/>
|
jtulach@52
|
479 |
</target>
|
jtulach@52
|
480 |
<target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
|
jtulach@52
|
481 |
<fail if="tests.failed">Some tests failed; see details above.</fail>
|
jtulach@52
|
482 |
</target>
|
jtulach@52
|
483 |
<target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
|
jtulach@52
|
484 |
<!--
|
jtulach@52
|
485 |
=======================
|
jtulach@52
|
486 |
JUNIT DEBUGGING SECTION
|
jtulach@52
|
487 |
=======================
|
jtulach@52
|
488 |
-->
|
jtulach@52
|
489 |
<target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
|
jtulach@52
|
490 |
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
jtulach@52
|
491 |
<j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
|
jtulach@52
|
492 |
<customize>
|
jtulach@52
|
493 |
<arg line="${test.class}"/>
|
jtulach@52
|
494 |
</customize>
|
jtulach@52
|
495 |
</j2seproject3:debug>
|
jtulach@52
|
496 |
</target>
|
jtulach@52
|
497 |
<target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
|
jtulach@52
|
498 |
<j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
|
jtulach@52
|
499 |
</target>
|
jtulach@52
|
500 |
<target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
|
jtulach@52
|
501 |
<target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
|
jtulach@52
|
502 |
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
jtulach@52
|
503 |
</target>
|
jtulach@52
|
504 |
<target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
|
jtulach@52
|
505 |
<!--
|
jtulach@52
|
506 |
=========================
|
jtulach@52
|
507 |
APPLET EXECUTION SECTION
|
jtulach@52
|
508 |
=========================
|
jtulach@52
|
509 |
-->
|
jtulach@52
|
510 |
<target name="run-applet" depends="init,compile-single">
|
jtulach@52
|
511 |
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
jtulach@52
|
512 |
<j2seproject1:java classname="sun.applet.AppletViewer">
|
jtulach@52
|
513 |
<customize>
|
jtulach@52
|
514 |
<arg value="${applet.url}"/>
|
jtulach@52
|
515 |
</customize>
|
jtulach@52
|
516 |
</j2seproject1:java>
|
jtulach@52
|
517 |
</target>
|
jtulach@52
|
518 |
<!--
|
jtulach@52
|
519 |
=========================
|
jtulach@52
|
520 |
APPLET DEBUGGING SECTION
|
jtulach@52
|
521 |
=========================
|
jtulach@52
|
522 |
-->
|
jtulach@52
|
523 |
<target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
|
jtulach@52
|
524 |
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
jtulach@52
|
525 |
<j2seproject3:debug classname="sun.applet.AppletViewer">
|
jtulach@52
|
526 |
<customize>
|
jtulach@52
|
527 |
<arg value="${applet.url}"/>
|
jtulach@52
|
528 |
</customize>
|
jtulach@52
|
529 |
</j2seproject3:debug>
|
jtulach@52
|
530 |
</target>
|
jtulach@52
|
531 |
<target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
|
jtulach@52
|
532 |
<!--
|
jtulach@52
|
533 |
===============
|
jtulach@52
|
534 |
CLEANUP SECTION
|
jtulach@52
|
535 |
===============
|
jtulach@52
|
536 |
-->
|
jtulach@52
|
537 |
<target name="deps-clean" depends="init" unless="no.deps"/>
|
jtulach@52
|
538 |
<target name="-do-clean" depends="init">
|
jtulach@52
|
539 |
<delete dir="${build.dir}"/>
|
jtulach@52
|
540 |
<delete dir="${dist.dir}"/>
|
jtulach@52
|
541 |
</target>
|
jtulach@52
|
542 |
<target name="-post-clean">
|
jtulach@52
|
543 |
<!-- Empty placeholder for easier customization. -->
|
jtulach@52
|
544 |
<!-- You can override this target in the ../build.xml file. -->
|
jtulach@52
|
545 |
</target>
|
jtulach@52
|
546 |
<target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
|
jtulach@52
|
547 |
</project>
|