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