[11] | 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="fmgVen-impl"> |
---|
[19] | 23 | <fail message="Please build using Ant 1.7.1 or higher."> |
---|
| 24 | <condition> |
---|
| 25 | <not> |
---|
| 26 | <antversion atleast="1.7.1"/> |
---|
| 27 | </not> |
---|
| 28 | </condition> |
---|
| 29 | </fail> |
---|
[11] | 30 | <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> |
---|
| 31 | <!-- |
---|
| 32 | ====================== |
---|
| 33 | INITIALIZATION SECTION |
---|
| 34 | ====================== |
---|
| 35 | --> |
---|
| 36 | <target name="-pre-init"> |
---|
| 37 | <!-- Empty placeholder for easier customization. --> |
---|
| 38 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 39 | </target> |
---|
| 40 | <target depends="-pre-init" name="-init-private"> |
---|
| 41 | <property file="nbproject/private/config.properties"/> |
---|
| 42 | <property file="nbproject/private/configs/${config}.properties"/> |
---|
| 43 | <property file="nbproject/private/private.properties"/> |
---|
| 44 | </target> |
---|
[19] | 45 | <target name="-pre-init-libraries"> |
---|
| 46 | <property location=".\lib\nblibraries.properties" name="libraries.path"/> |
---|
| 47 | <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/> |
---|
| 48 | <pathconvert dirsep="/" property="libraries.dir"> |
---|
| 49 | <path path="${libraries.dir.nativedirsep}"/> |
---|
[11] | 50 | </pathconvert> |
---|
[19] | 51 | <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/> |
---|
| 52 | <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/> |
---|
| 53 | </target> |
---|
| 54 | <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries"> |
---|
| 55 | <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties"> |
---|
[11] | 56 | <filterchain> |
---|
[19] | 57 | <replacestring from="$${base}" to="${libraries.dir}"/> |
---|
| 58 | <escapeunicode/> |
---|
[11] | 59 | </filterchain> |
---|
| 60 | </loadproperties> |
---|
[19] | 61 | </target> |
---|
| 62 | <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries"> |
---|
| 63 | <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}"> |
---|
[11] | 64 | <filterchain> |
---|
[19] | 65 | <replacestring from="$${base}" to="${libraries.dir}"/> |
---|
| 66 | <escapeunicode/> |
---|
[11] | 67 | </filterchain> |
---|
| 68 | </loadproperties> |
---|
| 69 | </target> |
---|
| 70 | <target depends="-pre-init,-init-private,-init-libraries" name="-init-user"> |
---|
| 71 | <property file="${user.properties.file}"/> |
---|
| 72 | <!-- The two properties below are usually overridden --> |
---|
| 73 | <!-- by the active platform. Just a fallback. --> |
---|
| 74 | <property name="default.javac.source" value="1.4"/> |
---|
| 75 | <property name="default.javac.target" value="1.4"/> |
---|
| 76 | </target> |
---|
| 77 | <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project"> |
---|
| 78 | <property file="nbproject/configs/${config}.properties"/> |
---|
| 79 | <property file="nbproject/project.properties"/> |
---|
| 80 | </target> |
---|
| 81 | <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init"> |
---|
| 82 | <available file="${manifest.file}" property="manifest.available"/> |
---|
[19] | 83 | <available file="${application.splash}" property="splashscreen.available"/> |
---|
| 84 | <condition property="main.class.available"> |
---|
[11] | 85 | <and> |
---|
| 86 | <isset property="main.class"/> |
---|
| 87 | <not> |
---|
| 88 | <equals arg1="${main.class}" arg2="" trim="true"/> |
---|
| 89 | </not> |
---|
| 90 | </and> |
---|
| 91 | </condition> |
---|
[19] | 92 | <condition property="manifest.available+main.class"> |
---|
| 93 | <and> |
---|
| 94 | <isset property="manifest.available"/> |
---|
| 95 | <isset property="main.class.available"/> |
---|
| 96 | </and> |
---|
| 97 | </condition> |
---|
| 98 | <condition property="do.mkdist"> |
---|
| 99 | <and> |
---|
| 100 | <isset property="libs.CopyLibs.classpath"/> |
---|
| 101 | <not> |
---|
| 102 | <istrue value="${mkdist.disabled}"/> |
---|
| 103 | </not> |
---|
| 104 | </and> |
---|
| 105 | </condition> |
---|
[11] | 106 | <condition property="manifest.available+main.class+mkdist.available"> |
---|
| 107 | <and> |
---|
| 108 | <istrue value="${manifest.available+main.class}"/> |
---|
[19] | 109 | <isset property="do.mkdist"/> |
---|
[11] | 110 | </and> |
---|
| 111 | </condition> |
---|
[19] | 112 | <condition property="manifest.available+main.class+mkdist.available+splashscreen.available"> |
---|
| 113 | <and> |
---|
| 114 | <istrue value="${manifest.available+main.class+mkdist.available}"/> |
---|
| 115 | <istrue value="${splashscreen.available}"/> |
---|
| 116 | </and> |
---|
| 117 | </condition> |
---|
| 118 | <condition property="do.archive"> |
---|
| 119 | <not> |
---|
| 120 | <istrue value="${jar.archive.disabled}"/> |
---|
| 121 | </not> |
---|
| 122 | </condition> |
---|
| 123 | <condition property="do.archive+manifest.available"> |
---|
| 124 | <and> |
---|
| 125 | <isset property="manifest.available"/> |
---|
| 126 | <istrue value="${do.archive}"/> |
---|
| 127 | </and> |
---|
| 128 | </condition> |
---|
| 129 | <condition property="do.archive+manifest.available+main.class"> |
---|
| 130 | <and> |
---|
| 131 | <istrue value="${manifest.available+main.class}"/> |
---|
| 132 | <istrue value="${do.archive}"/> |
---|
| 133 | </and> |
---|
| 134 | </condition> |
---|
| 135 | <condition property="do.archive+manifest.available+main.class+mkdist.available"> |
---|
| 136 | <and> |
---|
| 137 | <istrue value="${manifest.available+main.class+mkdist.available}"/> |
---|
| 138 | <istrue value="${do.archive}"/> |
---|
| 139 | </and> |
---|
| 140 | </condition> |
---|
| 141 | <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available"> |
---|
| 142 | <and> |
---|
| 143 | <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/> |
---|
| 144 | <istrue value="${do.archive}"/> |
---|
| 145 | </and> |
---|
| 146 | </condition> |
---|
[11] | 147 | <condition property="have.tests"> |
---|
| 148 | <or> |
---|
| 149 | <available file="${test.src.dir}"/> |
---|
| 150 | </or> |
---|
| 151 | </condition> |
---|
| 152 | <condition property="have.sources"> |
---|
| 153 | <or> |
---|
| 154 | <available file="${src.dir}"/> |
---|
| 155 | </or> |
---|
| 156 | </condition> |
---|
| 157 | <condition property="netbeans.home+have.tests"> |
---|
| 158 | <and> |
---|
| 159 | <isset property="netbeans.home"/> |
---|
| 160 | <isset property="have.tests"/> |
---|
| 161 | </and> |
---|
| 162 | </condition> |
---|
| 163 | <condition property="no.javadoc.preview"> |
---|
| 164 | <and> |
---|
| 165 | <isset property="javadoc.preview"/> |
---|
| 166 | <isfalse value="${javadoc.preview}"/> |
---|
| 167 | </and> |
---|
| 168 | </condition> |
---|
| 169 | <property name="run.jvmargs" value=""/> |
---|
| 170 | <property name="javac.compilerargs" value=""/> |
---|
| 171 | <property name="work.dir" value="${basedir}"/> |
---|
| 172 | <condition property="no.deps"> |
---|
| 173 | <and> |
---|
| 174 | <istrue value="${no.dependencies}"/> |
---|
| 175 | </and> |
---|
| 176 | </condition> |
---|
| 177 | <property name="javac.debug" value="true"/> |
---|
| 178 | <property name="javadoc.preview" value="true"/> |
---|
| 179 | <property name="application.args" value=""/> |
---|
| 180 | <property name="source.encoding" value="${file.encoding}"/> |
---|
[19] | 181 | <property name="runtime.encoding" value="${source.encoding}"/> |
---|
[11] | 182 | <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> |
---|
| 183 | <and> |
---|
| 184 | <isset property="javadoc.encoding"/> |
---|
| 185 | <not> |
---|
| 186 | <equals arg1="${javadoc.encoding}" arg2=""/> |
---|
| 187 | </not> |
---|
| 188 | </and> |
---|
| 189 | </condition> |
---|
| 190 | <property name="javadoc.encoding.used" value="${source.encoding}"/> |
---|
| 191 | <property name="includes" value="**"/> |
---|
| 192 | <property name="excludes" value=""/> |
---|
| 193 | <property name="do.depend" value="false"/> |
---|
| 194 | <condition property="do.depend.true"> |
---|
| 195 | <istrue value="${do.depend}"/> |
---|
| 196 | </condition> |
---|
[19] | 197 | <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> |
---|
| 198 | <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> |
---|
| 199 | <length length="0" string="${endorsed.classpath}" when="greater"/> |
---|
[11] | 200 | </condition> |
---|
[19] | 201 | <property name="javac.fork" value="false"/> |
---|
| 202 | <property name="jar.index" value="false"/> |
---|
| 203 | <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> |
---|
[11] | 204 | </target> |
---|
| 205 | <target name="-post-init"> |
---|
| 206 | <!-- Empty placeholder for easier customization. --> |
---|
| 207 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 208 | </target> |
---|
| 209 | <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check"> |
---|
| 210 | <fail unless="src.dir">Must set src.dir</fail> |
---|
| 211 | <fail unless="test.src.dir">Must set test.src.dir</fail> |
---|
| 212 | <fail unless="build.dir">Must set build.dir</fail> |
---|
| 213 | <fail unless="dist.dir">Must set dist.dir</fail> |
---|
| 214 | <fail unless="build.classes.dir">Must set build.classes.dir</fail> |
---|
| 215 | <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> |
---|
| 216 | <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> |
---|
| 217 | <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> |
---|
| 218 | <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> |
---|
| 219 | <fail unless="dist.jar">Must set dist.jar</fail> |
---|
| 220 | </target> |
---|
| 221 | <target name="-init-macrodef-property"> |
---|
| 222 | <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> |
---|
| 223 | <attribute name="name"/> |
---|
| 224 | <attribute name="value"/> |
---|
| 225 | <sequential> |
---|
| 226 | <property name="@{name}" value="${@{value}}"/> |
---|
| 227 | </sequential> |
---|
| 228 | </macrodef> |
---|
| 229 | </target> |
---|
[19] | 230 | <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> |
---|
[11] | 231 | <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
| 232 | <attribute default="${src.dir}" name="srcdir"/> |
---|
| 233 | <attribute default="${build.classes.dir}" name="destdir"/> |
---|
| 234 | <attribute default="${javac.classpath}" name="classpath"/> |
---|
[19] | 235 | <attribute default="${javac.processorpath}" name="processorpath"/> |
---|
| 236 | <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> |
---|
[11] | 237 | <attribute default="${includes}" name="includes"/> |
---|
| 238 | <attribute default="${excludes}" name="excludes"/> |
---|
| 239 | <attribute default="${javac.debug}" name="debug"/> |
---|
[19] | 240 | <attribute default="${empty.dir}" name="sourcepath"/> |
---|
| 241 | <attribute default="${empty.dir}" name="gensrcdir"/> |
---|
[11] | 242 | <element name="customize" optional="true"/> |
---|
| 243 | <sequential> |
---|
[19] | 244 | <property location="${build.dir}/empty" name="empty.dir"/> |
---|
| 245 | <mkdir dir="${empty.dir}"/> |
---|
| 246 | <mkdir dir="@{apgeneratedsrcdir}"/> |
---|
| 247 | <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> |
---|
| 248 | <src> |
---|
| 249 | <dirset dir="@{gensrcdir}" erroronmissingdir="false"> |
---|
| 250 | <include name="*"/> |
---|
| 251 | </dirset> |
---|
| 252 | </src> |
---|
[11] | 253 | <classpath> |
---|
| 254 | <path path="@{classpath}"/> |
---|
| 255 | </classpath> |
---|
[19] | 256 | <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> |
---|
| 257 | <compilerarg line="${javac.compilerargs}"/> |
---|
| 258 | <compilerarg value="-processorpath"/> |
---|
| 259 | <compilerarg path="@{processorpath}:${empty.dir}"/> |
---|
| 260 | <compilerarg line="${ap.processors.internal}"/> |
---|
| 261 | <compilerarg line="${annotation.processing.processor.options}"/> |
---|
| 262 | <compilerarg value="-s"/> |
---|
| 263 | <compilerarg path="@{apgeneratedsrcdir}"/> |
---|
| 264 | <compilerarg line="${ap.proc.none.internal}"/> |
---|
[11] | 265 | <customize/> |
---|
| 266 | </javac> |
---|
| 267 | </sequential> |
---|
| 268 | </macrodef> |
---|
[19] | 269 | </target> |
---|
| 270 | <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> |
---|
| 271 | <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
| 272 | <attribute default="${src.dir}" name="srcdir"/> |
---|
| 273 | <attribute default="${build.classes.dir}" name="destdir"/> |
---|
| 274 | <attribute default="${javac.classpath}" name="classpath"/> |
---|
| 275 | <attribute default="${javac.processorpath}" name="processorpath"/> |
---|
| 276 | <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> |
---|
| 277 | <attribute default="${includes}" name="includes"/> |
---|
| 278 | <attribute default="${excludes}" name="excludes"/> |
---|
| 279 | <attribute default="${javac.debug}" name="debug"/> |
---|
| 280 | <attribute default="${empty.dir}" name="sourcepath"/> |
---|
| 281 | <attribute default="${empty.dir}" name="gensrcdir"/> |
---|
| 282 | <element name="customize" optional="true"/> |
---|
| 283 | <sequential> |
---|
| 284 | <property location="${build.dir}/empty" name="empty.dir"/> |
---|
| 285 | <mkdir dir="${empty.dir}"/> |
---|
| 286 | <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> |
---|
| 287 | <src> |
---|
| 288 | <dirset dir="@{gensrcdir}" erroronmissingdir="false"> |
---|
| 289 | <include name="*"/> |
---|
| 290 | </dirset> |
---|
| 291 | </src> |
---|
| 292 | <classpath> |
---|
| 293 | <path path="@{classpath}"/> |
---|
| 294 | </classpath> |
---|
| 295 | <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> |
---|
| 296 | <compilerarg line="${javac.compilerargs}"/> |
---|
| 297 | <customize/> |
---|
| 298 | </javac> |
---|
| 299 | </sequential> |
---|
| 300 | </macrodef> |
---|
| 301 | </target> |
---|
| 302 | <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> |
---|
[11] | 303 | <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
| 304 | <attribute default="${src.dir}" name="srcdir"/> |
---|
| 305 | <attribute default="${build.classes.dir}" name="destdir"/> |
---|
| 306 | <attribute default="${javac.classpath}" name="classpath"/> |
---|
| 307 | <sequential> |
---|
| 308 | <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> |
---|
| 309 | <classpath> |
---|
| 310 | <path path="@{classpath}"/> |
---|
| 311 | </classpath> |
---|
| 312 | </depend> |
---|
| 313 | </sequential> |
---|
| 314 | </macrodef> |
---|
| 315 | <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
| 316 | <attribute default="${build.classes.dir}" name="destdir"/> |
---|
| 317 | <sequential> |
---|
| 318 | <fail unless="javac.includes">Must set javac.includes</fail> |
---|
| 319 | <pathconvert pathsep="," property="javac.includes.binary"> |
---|
| 320 | <path> |
---|
| 321 | <filelist dir="@{destdir}" files="${javac.includes}"/> |
---|
| 322 | </path> |
---|
| 323 | <globmapper from="*.java" to="*.class"/> |
---|
| 324 | </pathconvert> |
---|
| 325 | <delete> |
---|
| 326 | <files includes="${javac.includes.binary}"/> |
---|
| 327 | </delete> |
---|
| 328 | </sequential> |
---|
| 329 | </macrodef> |
---|
| 330 | </target> |
---|
| 331 | <target name="-init-macrodef-junit"> |
---|
| 332 | <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
| 333 | <attribute default="${includes}" name="includes"/> |
---|
| 334 | <attribute default="${excludes}" name="excludes"/> |
---|
| 335 | <attribute default="**" name="testincludes"/> |
---|
| 336 | <sequential> |
---|
[19] | 337 | <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}"> |
---|
[11] | 338 | <batchtest todir="${build.test.results.dir}"> |
---|
| 339 | <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> |
---|
| 340 | <filename name="@{testincludes}"/> |
---|
| 341 | </fileset> |
---|
| 342 | </batchtest> |
---|
| 343 | <classpath> |
---|
| 344 | <path path="${run.test.classpath}"/> |
---|
| 345 | </classpath> |
---|
| 346 | <syspropertyset> |
---|
| 347 | <propertyref prefix="test-sys-prop."/> |
---|
| 348 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
---|
| 349 | </syspropertyset> |
---|
| 350 | <formatter type="brief" usefile="false"/> |
---|
| 351 | <formatter type="xml"/> |
---|
[19] | 352 | <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
---|
[11] | 353 | <jvmarg line="${run.jvmargs}"/> |
---|
| 354 | </junit> |
---|
| 355 | </sequential> |
---|
| 356 | </macrodef> |
---|
| 357 | </target> |
---|
| 358 | <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> |
---|
| 359 | <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> |
---|
| 360 | <attribute default="${main.class}" name="name"/> |
---|
| 361 | <attribute default="${debug.classpath}" name="classpath"/> |
---|
| 362 | <attribute default="" name="stopclassname"/> |
---|
| 363 | <sequential> |
---|
| 364 | <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> |
---|
| 365 | <classpath> |
---|
| 366 | <path path="@{classpath}"/> |
---|
| 367 | </classpath> |
---|
| 368 | </nbjpdastart> |
---|
| 369 | </sequential> |
---|
| 370 | </macrodef> |
---|
| 371 | <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> |
---|
| 372 | <attribute default="${build.classes.dir}" name="dir"/> |
---|
| 373 | <sequential> |
---|
| 374 | <nbjpdareload> |
---|
| 375 | <fileset dir="@{dir}" includes="${fix.classes}"> |
---|
| 376 | <include name="${fix.includes}*.class"/> |
---|
| 377 | </fileset> |
---|
| 378 | </nbjpdareload> |
---|
| 379 | </sequential> |
---|
| 380 | </macrodef> |
---|
| 381 | </target> |
---|
| 382 | <target name="-init-debug-args"> |
---|
| 383 | <property name="version-output" value="java version "${ant.java.version}"/> |
---|
| 384 | <condition property="have-jdk-older-than-1.4"> |
---|
| 385 | <or> |
---|
| 386 | <contains string="${version-output}" substring="java version "1.0"/> |
---|
| 387 | <contains string="${version-output}" substring="java version "1.1"/> |
---|
| 388 | <contains string="${version-output}" substring="java version "1.2"/> |
---|
| 389 | <contains string="${version-output}" substring="java version "1.3"/> |
---|
| 390 | </or> |
---|
| 391 | </condition> |
---|
| 392 | <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> |
---|
| 393 | <istrue value="${have-jdk-older-than-1.4}"/> |
---|
| 394 | </condition> |
---|
| 395 | <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> |
---|
| 396 | <os family="windows"/> |
---|
| 397 | </condition> |
---|
| 398 | <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> |
---|
| 399 | <isset property="debug.transport"/> |
---|
| 400 | </condition> |
---|
| 401 | </target> |
---|
| 402 | <target depends="-init-debug-args" name="-init-macrodef-debug"> |
---|
| 403 | <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
| 404 | <attribute default="${main.class}" name="classname"/> |
---|
| 405 | <attribute default="${debug.classpath}" name="classpath"/> |
---|
| 406 | <element name="customize" optional="true"/> |
---|
| 407 | <sequential> |
---|
| 408 | <java classname="@{classname}" dir="${work.dir}" fork="true"> |
---|
[19] | 409 | <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
---|
[11] | 410 | <jvmarg line="${debug-args-line}"/> |
---|
| 411 | <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> |
---|
[19] | 412 | <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> |
---|
| 413 | <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> |
---|
[11] | 414 | <jvmarg line="${run.jvmargs}"/> |
---|
| 415 | <classpath> |
---|
| 416 | <path path="@{classpath}"/> |
---|
| 417 | </classpath> |
---|
| 418 | <syspropertyset> |
---|
| 419 | <propertyref prefix="run-sys-prop."/> |
---|
| 420 | <mapper from="run-sys-prop.*" to="*" type="glob"/> |
---|
| 421 | </syspropertyset> |
---|
| 422 | <customize/> |
---|
| 423 | </java> |
---|
| 424 | </sequential> |
---|
| 425 | </macrodef> |
---|
| 426 | </target> |
---|
| 427 | <target name="-init-macrodef-java"> |
---|
| 428 | <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> |
---|
| 429 | <attribute default="${main.class}" name="classname"/> |
---|
[19] | 430 | <attribute default="${run.classpath}" name="classpath"/> |
---|
[11] | 431 | <element name="customize" optional="true"/> |
---|
| 432 | <sequential> |
---|
| 433 | <java classname="@{classname}" dir="${work.dir}" fork="true"> |
---|
[19] | 434 | <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
---|
| 435 | <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> |
---|
| 436 | <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> |
---|
[11] | 437 | <jvmarg line="${run.jvmargs}"/> |
---|
| 438 | <classpath> |
---|
[19] | 439 | <path path="@{classpath}"/> |
---|
[11] | 440 | </classpath> |
---|
| 441 | <syspropertyset> |
---|
| 442 | <propertyref prefix="run-sys-prop."/> |
---|
| 443 | <mapper from="run-sys-prop.*" to="*" type="glob"/> |
---|
| 444 | </syspropertyset> |
---|
| 445 | <customize/> |
---|
| 446 | </java> |
---|
| 447 | </sequential> |
---|
| 448 | </macrodef> |
---|
| 449 | </target> |
---|
[19] | 450 | <target name="-init-macrodef-copylibs"> |
---|
| 451 | <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
| 452 | <element name="customize" optional="true"/> |
---|
| 453 | <sequential> |
---|
| 454 | <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> |
---|
| 455 | <pathconvert property="run.classpath.without.build.classes.dir"> |
---|
| 456 | <path path="${run.classpath}"/> |
---|
| 457 | <map from="${build.classes.dir.resolved}" to=""/> |
---|
| 458 | </pathconvert> |
---|
| 459 | <pathconvert pathsep=" " property="jar.classpath"> |
---|
| 460 | <path path="${run.classpath.without.build.classes.dir}"/> |
---|
| 461 | <chainedmapper> |
---|
| 462 | <flattenmapper/> |
---|
| 463 | <globmapper from="*" to="lib/*"/> |
---|
| 464 | </chainedmapper> |
---|
| 465 | </pathconvert> |
---|
| 466 | <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> |
---|
| 467 | <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> |
---|
| 468 | <fileset dir="${build.classes.dir}"/> |
---|
| 469 | <manifest> |
---|
| 470 | <attribute name="Class-Path" value="${jar.classpath}"/> |
---|
| 471 | <customize/> |
---|
| 472 | </manifest> |
---|
| 473 | </copylibs> |
---|
| 474 | </sequential> |
---|
| 475 | </macrodef> |
---|
| 476 | </target> |
---|
[11] | 477 | <target name="-init-presetdef-jar"> |
---|
| 478 | <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> |
---|
[19] | 479 | <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> |
---|
[11] | 480 | <j2seproject1:fileset dir="${build.classes.dir}"/> |
---|
| 481 | </jar> |
---|
| 482 | </presetdef> |
---|
| 483 | </target> |
---|
[19] | 484 | <target name="-init-ap-cmdline-properties"> |
---|
| 485 | <property name="annotation.processing.enabled" value="true"/> |
---|
| 486 | <property name="annotation.processing.processors.list" value=""/> |
---|
| 487 | <property name="annotation.processing.processor.options" value=""/> |
---|
| 488 | <property name="annotation.processing.run.all.processors" value="true"/> |
---|
| 489 | <property name="javac.processorpath" value="${javac.classpath}"/> |
---|
| 490 | <property name="javac.test.processorpath" value="${javac.test.classpath}"/> |
---|
| 491 | <condition property="ap.supported.internal" value="true"> |
---|
| 492 | <not> |
---|
| 493 | <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> |
---|
| 494 | </not> |
---|
| 495 | </condition> |
---|
| 496 | </target> |
---|
| 497 | <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> |
---|
| 498 | <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> |
---|
| 499 | <isfalse value="${annotation.processing.run.all.processors}"/> |
---|
| 500 | </condition> |
---|
| 501 | <condition else="" property="ap.proc.none.internal" value="-proc:none"> |
---|
| 502 | <isfalse value="${annotation.processing.enabled}"/> |
---|
| 503 | </condition> |
---|
| 504 | </target> |
---|
| 505 | <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> |
---|
| 506 | <property name="ap.cmd.line.internal" value=""/> |
---|
| 507 | </target> |
---|
| 508 | <target depends="-pre-init,-init-private,-init-libraries,-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,-init-ap-cmdline" name="init"/> |
---|
[11] | 509 | <!-- |
---|
| 510 | =================== |
---|
| 511 | COMPILATION SECTION |
---|
| 512 | =================== |
---|
| 513 | --> |
---|
[19] | 514 | <target name="-deps-jar-init" unless="built-jar.properties"> |
---|
| 515 | <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> |
---|
| 516 | <delete file="${built-jar.properties}" quiet="true"/> |
---|
| 517 | </target> |
---|
| 518 | <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> |
---|
| 519 | <echo level="warn" message="Cycle detected: fmgVen was already built"/> |
---|
| 520 | </target> |
---|
| 521 | <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> |
---|
| 522 | <mkdir dir="${build.dir}"/> |
---|
| 523 | <touch file="${built-jar.properties}" verbose="false"/> |
---|
| 524 | <property file="${built-jar.properties}" prefix="already.built.jar."/> |
---|
| 525 | <antcall target="-warn-already-built-jar"/> |
---|
| 526 | <propertyfile file="${built-jar.properties}"> |
---|
| 527 | <entry key="${basedir}" value=""/> |
---|
| 528 | </propertyfile> |
---|
| 529 | </target> |
---|
[11] | 530 | <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> |
---|
| 531 | <target depends="init" name="-check-automatic-build"> |
---|
| 532 | <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> |
---|
| 533 | </target> |
---|
| 534 | <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> |
---|
| 535 | <antcall target="clean"/> |
---|
| 536 | </target> |
---|
| 537 | <target depends="init,deps-jar" name="-pre-pre-compile"> |
---|
| 538 | <mkdir dir="${build.classes.dir}"/> |
---|
| 539 | </target> |
---|
| 540 | <target name="-pre-compile"> |
---|
| 541 | <!-- Empty placeholder for easier customization. --> |
---|
| 542 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 543 | </target> |
---|
| 544 | <target if="do.depend.true" name="-compile-depend"> |
---|
[19] | 545 | <pathconvert property="build.generated.subdirs"> |
---|
| 546 | <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> |
---|
| 547 | <include name="*"/> |
---|
| 548 | </dirset> |
---|
| 549 | </pathconvert> |
---|
| 550 | <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> |
---|
[11] | 551 | </target> |
---|
[19] | 552 | <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> |
---|
| 553 | <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> |
---|
[11] | 554 | <copy todir="${build.classes.dir}"> |
---|
| 555 | <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> |
---|
| 556 | </copy> |
---|
| 557 | </target> |
---|
[19] | 558 | <target if="has.persistence.xml" name="-copy-persistence-xml"> |
---|
| 559 | <mkdir dir="${build.classes.dir}/META-INF"/> |
---|
| 560 | <copy todir="${build.classes.dir}/META-INF"> |
---|
| 561 | <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> |
---|
| 562 | </copy> |
---|
| 563 | </target> |
---|
[11] | 564 | <target name="-post-compile"> |
---|
| 565 | <!-- Empty placeholder for easier customization. --> |
---|
| 566 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 567 | </target> |
---|
| 568 | <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> |
---|
| 569 | <target name="-pre-compile-single"> |
---|
| 570 | <!-- Empty placeholder for easier customization. --> |
---|
| 571 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 572 | </target> |
---|
| 573 | <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> |
---|
| 574 | <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> |
---|
| 575 | <j2seproject3:force-recompile/> |
---|
[19] | 576 | <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> |
---|
[11] | 577 | </target> |
---|
| 578 | <target name="-post-compile-single"> |
---|
| 579 | <!-- Empty placeholder for easier customization. --> |
---|
| 580 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 581 | </target> |
---|
| 582 | <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> |
---|
| 583 | <!-- |
---|
| 584 | ==================== |
---|
| 585 | JAR BUILDING SECTION |
---|
| 586 | ==================== |
---|
| 587 | --> |
---|
| 588 | <target depends="init" name="-pre-pre-jar"> |
---|
| 589 | <dirname file="${dist.jar}" property="dist.jar.dir"/> |
---|
| 590 | <mkdir dir="${dist.jar.dir}"/> |
---|
| 591 | </target> |
---|
| 592 | <target name="-pre-jar"> |
---|
| 593 | <!-- Empty placeholder for easier customization. --> |
---|
| 594 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 595 | </target> |
---|
[19] | 596 | <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available"> |
---|
[11] | 597 | <j2seproject1:jar/> |
---|
| 598 | </target> |
---|
[19] | 599 | <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class"> |
---|
[11] | 600 | <j2seproject1:jar manifest="${manifest.file}"/> |
---|
| 601 | </target> |
---|
[19] | 602 | <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available"> |
---|
[11] | 603 | <j2seproject1:jar manifest="${manifest.file}"> |
---|
| 604 | <j2seproject1:manifest> |
---|
| 605 | <j2seproject1:attribute name="Main-Class" value="${main.class}"/> |
---|
| 606 | </j2seproject1:manifest> |
---|
| 607 | </j2seproject1:jar> |
---|
| 608 | <echo>To run this application from the command line without Ant, try:</echo> |
---|
| 609 | <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> |
---|
| 610 | <property location="${dist.jar}" name="dist.jar.resolved"/> |
---|
| 611 | <pathconvert property="run.classpath.with.dist.jar"> |
---|
| 612 | <path path="${run.classpath}"/> |
---|
| 613 | <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> |
---|
| 614 | </pathconvert> |
---|
| 615 | <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> |
---|
| 616 | </target> |
---|
[19] | 617 | <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen"> |
---|
| 618 | <basename file="${application.splash}" property="splashscreen.basename"/> |
---|
| 619 | <mkdir dir="${build.classes.dir}/META-INF"/> |
---|
| 620 | <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> |
---|
| 621 | <j2seproject3:copylibs> |
---|
| 622 | <customize> |
---|
[11] | 623 | <attribute name="Main-Class" value="${main.class}"/> |
---|
[19] | 624 | <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> |
---|
| 625 | </customize> |
---|
| 626 | </j2seproject3:copylibs> |
---|
[11] | 627 | <echo>To run this application from the command line without Ant, try:</echo> |
---|
| 628 | <property location="${dist.jar}" name="dist.jar.resolved"/> |
---|
| 629 | <echo>java -jar "${dist.jar.resolved}"</echo> |
---|
| 630 | </target> |
---|
[19] | 631 | <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available"> |
---|
| 632 | <j2seproject3:copylibs> |
---|
| 633 | <customize> |
---|
| 634 | <attribute name="Main-Class" value="${main.class}"/> |
---|
| 635 | </customize> |
---|
| 636 | </j2seproject3:copylibs> |
---|
| 637 | <echo>To run this application from the command line without Ant, try:</echo> |
---|
| 638 | <property location="${dist.jar}" name="dist.jar.resolved"/> |
---|
| 639 | <echo>java -jar "${dist.jar.resolved}"</echo> |
---|
| 640 | </target> |
---|
[11] | 641 | <target name="-post-jar"> |
---|
| 642 | <!-- Empty placeholder for easier customization. --> |
---|
| 643 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 644 | </target> |
---|
[19] | 645 | <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/> |
---|
[11] | 646 | <!-- |
---|
| 647 | ================= |
---|
| 648 | EXECUTION SECTION |
---|
| 649 | ================= |
---|
| 650 | --> |
---|
| 651 | <target depends="init,compile" description="Run a main class." name="run"> |
---|
| 652 | <j2seproject1:java> |
---|
| 653 | <customize> |
---|
| 654 | <arg line="${application.args}"/> |
---|
| 655 | </customize> |
---|
| 656 | </j2seproject1:java> |
---|
| 657 | </target> |
---|
| 658 | <target name="-do-not-recompile"> |
---|
| 659 | <property name="javac.includes.binary" value=""/> |
---|
| 660 | </target> |
---|
[19] | 661 | <target depends="init,compile-single" name="run-single"> |
---|
[11] | 662 | <fail unless="run.class">Must select one file in the IDE or set run.class</fail> |
---|
| 663 | <j2seproject1:java classname="${run.class}"/> |
---|
| 664 | </target> |
---|
[19] | 665 | <target depends="init,compile-test-single" name="run-test-with-main"> |
---|
| 666 | <fail unless="run.class">Must select one file in the IDE or set run.class</fail> |
---|
| 667 | <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> |
---|
| 668 | </target> |
---|
[11] | 669 | <!-- |
---|
| 670 | ================= |
---|
| 671 | DEBUGGING SECTION |
---|
| 672 | ================= |
---|
| 673 | --> |
---|
| 674 | <target depends="init" if="netbeans.home" name="-debug-start-debugger"> |
---|
| 675 | <j2seproject1:nbjpdastart name="${debug.class}"/> |
---|
| 676 | </target> |
---|
[19] | 677 | <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> |
---|
| 678 | <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> |
---|
| 679 | </target> |
---|
[11] | 680 | <target depends="init,compile" name="-debug-start-debuggee"> |
---|
| 681 | <j2seproject3:debug> |
---|
| 682 | <customize> |
---|
| 683 | <arg line="${application.args}"/> |
---|
| 684 | </customize> |
---|
| 685 | </j2seproject3:debug> |
---|
| 686 | </target> |
---|
| 687 | <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> |
---|
| 688 | <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> |
---|
| 689 | <j2seproject1:nbjpdastart stopclassname="${main.class}"/> |
---|
| 690 | </target> |
---|
| 691 | <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> |
---|
| 692 | <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> |
---|
| 693 | <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> |
---|
| 694 | <j2seproject3:debug classname="${debug.class}"/> |
---|
| 695 | </target> |
---|
[19] | 696 | <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> |
---|
| 697 | <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> |
---|
| 698 | <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> |
---|
| 699 | <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> |
---|
| 700 | </target> |
---|
| 701 | <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> |
---|
[11] | 702 | <target depends="init" name="-pre-debug-fix"> |
---|
| 703 | <fail unless="fix.includes">Must set fix.includes</fail> |
---|
| 704 | <property name="javac.includes" value="${fix.includes}.java"/> |
---|
| 705 | </target> |
---|
| 706 | <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> |
---|
| 707 | <j2seproject1:nbjpdareload/> |
---|
| 708 | </target> |
---|
| 709 | <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> |
---|
| 710 | <!-- |
---|
| 711 | =============== |
---|
| 712 | JAVADOC SECTION |
---|
| 713 | =============== |
---|
| 714 | --> |
---|
[19] | 715 | <target depends="init" if="have.sources" name="-javadoc-build"> |
---|
[11] | 716 | <mkdir dir="${dist.javadoc.dir}"/> |
---|
| 717 | <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}"> |
---|
| 718 | <classpath> |
---|
| 719 | <path path="${javac.classpath}"/> |
---|
| 720 | </classpath> |
---|
| 721 | <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> |
---|
| 722 | <filename name="**/*.java"/> |
---|
| 723 | </fileset> |
---|
[19] | 724 | <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> |
---|
| 725 | <include name="**/*.java"/> |
---|
| 726 | </fileset> |
---|
[11] | 727 | </javadoc> |
---|
| 728 | </target> |
---|
| 729 | <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> |
---|
| 730 | <nbbrowse file="${dist.javadoc.dir}/index.html"/> |
---|
| 731 | </target> |
---|
| 732 | <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> |
---|
| 733 | <!-- |
---|
| 734 | ========================= |
---|
| 735 | JUNIT COMPILATION SECTION |
---|
| 736 | ========================= |
---|
| 737 | --> |
---|
| 738 | <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> |
---|
| 739 | <mkdir dir="${build.test.classes.dir}"/> |
---|
| 740 | </target> |
---|
| 741 | <target name="-pre-compile-test"> |
---|
| 742 | <!-- Empty placeholder for easier customization. --> |
---|
| 743 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 744 | </target> |
---|
| 745 | <target if="do.depend.true" name="-compile-test-depend"> |
---|
| 746 | <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> |
---|
| 747 | </target> |
---|
| 748 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> |
---|
[19] | 749 | <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> |
---|
[11] | 750 | <copy todir="${build.test.classes.dir}"> |
---|
| 751 | <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> |
---|
| 752 | </copy> |
---|
| 753 | </target> |
---|
| 754 | <target name="-post-compile-test"> |
---|
| 755 | <!-- Empty placeholder for easier customization. --> |
---|
| 756 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 757 | </target> |
---|
| 758 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> |
---|
| 759 | <target name="-pre-compile-test-single"> |
---|
| 760 | <!-- Empty placeholder for easier customization. --> |
---|
| 761 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 762 | </target> |
---|
| 763 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> |
---|
| 764 | <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> |
---|
| 765 | <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> |
---|
[19] | 766 | <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> |
---|
[11] | 767 | <copy todir="${build.test.classes.dir}"> |
---|
| 768 | <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> |
---|
| 769 | </copy> |
---|
| 770 | </target> |
---|
| 771 | <target name="-post-compile-test-single"> |
---|
| 772 | <!-- Empty placeholder for easier customization. --> |
---|
| 773 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 774 | </target> |
---|
| 775 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> |
---|
| 776 | <!-- |
---|
| 777 | ======================= |
---|
| 778 | JUNIT EXECUTION SECTION |
---|
| 779 | ======================= |
---|
| 780 | --> |
---|
| 781 | <target depends="init" if="have.tests" name="-pre-test-run"> |
---|
| 782 | <mkdir dir="${build.test.results.dir}"/> |
---|
| 783 | </target> |
---|
| 784 | <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> |
---|
| 785 | <j2seproject3:junit testincludes="**/*Test.java"/> |
---|
| 786 | </target> |
---|
| 787 | <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> |
---|
[19] | 788 | <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> |
---|
[11] | 789 | </target> |
---|
| 790 | <target depends="init" if="have.tests" name="test-report"/> |
---|
| 791 | <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> |
---|
| 792 | <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> |
---|
| 793 | <target depends="init" if="have.tests" name="-pre-test-run-single"> |
---|
| 794 | <mkdir dir="${build.test.results.dir}"/> |
---|
| 795 | </target> |
---|
| 796 | <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> |
---|
| 797 | <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> |
---|
| 798 | <j2seproject3:junit excludes="" includes="${test.includes}"/> |
---|
| 799 | </target> |
---|
| 800 | <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> |
---|
[19] | 801 | <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> |
---|
[11] | 802 | </target> |
---|
[19] | 803 | <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> |
---|
[11] | 804 | <!-- |
---|
| 805 | ======================= |
---|
| 806 | JUNIT DEBUGGING SECTION |
---|
| 807 | ======================= |
---|
| 808 | --> |
---|
| 809 | <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> |
---|
| 810 | <fail unless="test.class">Must select one file in the IDE or set test.class</fail> |
---|
| 811 | <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/> |
---|
| 812 | <delete file="${test.report.file}"/> |
---|
| 813 | <mkdir dir="${build.test.results.dir}"/> |
---|
| 814 | <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}"> |
---|
| 815 | <customize> |
---|
| 816 | <syspropertyset> |
---|
| 817 | <propertyref prefix="test-sys-prop."/> |
---|
| 818 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
---|
| 819 | </syspropertyset> |
---|
| 820 | <arg value="${test.class}"/> |
---|
| 821 | <arg value="showoutput=true"/> |
---|
| 822 | <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/> |
---|
| 823 | <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/> |
---|
| 824 | </customize> |
---|
| 825 | </j2seproject3:debug> |
---|
| 826 | </target> |
---|
| 827 | <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> |
---|
| 828 | <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> |
---|
| 829 | </target> |
---|
[19] | 830 | <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> |
---|
[11] | 831 | <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> |
---|
| 832 | <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> |
---|
| 833 | </target> |
---|
| 834 | <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> |
---|
| 835 | <!-- |
---|
| 836 | ========================= |
---|
| 837 | APPLET EXECUTION SECTION |
---|
| 838 | ========================= |
---|
| 839 | --> |
---|
| 840 | <target depends="init,compile-single" name="run-applet"> |
---|
| 841 | <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> |
---|
| 842 | <j2seproject1:java classname="sun.applet.AppletViewer"> |
---|
| 843 | <customize> |
---|
| 844 | <arg value="${applet.url}"/> |
---|
| 845 | </customize> |
---|
| 846 | </j2seproject1:java> |
---|
| 847 | </target> |
---|
| 848 | <!-- |
---|
| 849 | ========================= |
---|
| 850 | APPLET DEBUGGING SECTION |
---|
| 851 | ========================= |
---|
| 852 | --> |
---|
| 853 | <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> |
---|
| 854 | <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> |
---|
| 855 | <j2seproject3:debug classname="sun.applet.AppletViewer"> |
---|
| 856 | <customize> |
---|
| 857 | <arg value="${applet.url}"/> |
---|
| 858 | </customize> |
---|
| 859 | </j2seproject3:debug> |
---|
| 860 | </target> |
---|
| 861 | <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> |
---|
| 862 | <!-- |
---|
| 863 | =============== |
---|
| 864 | CLEANUP SECTION |
---|
| 865 | =============== |
---|
| 866 | --> |
---|
[19] | 867 | <target name="-deps-clean-init" unless="built-clean.properties"> |
---|
| 868 | <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> |
---|
| 869 | <delete file="${built-clean.properties}" quiet="true"/> |
---|
| 870 | </target> |
---|
| 871 | <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> |
---|
| 872 | <echo level="warn" message="Cycle detected: fmgVen was already built"/> |
---|
| 873 | </target> |
---|
| 874 | <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> |
---|
| 875 | <mkdir dir="${build.dir}"/> |
---|
| 876 | <touch file="${built-clean.properties}" verbose="false"/> |
---|
| 877 | <property file="${built-clean.properties}" prefix="already.built.clean."/> |
---|
| 878 | <antcall target="-warn-already-built-clean"/> |
---|
| 879 | <propertyfile file="${built-clean.properties}"> |
---|
| 880 | <entry key="${basedir}" value=""/> |
---|
| 881 | </propertyfile> |
---|
| 882 | </target> |
---|
[11] | 883 | <target depends="init" name="-do-clean"> |
---|
| 884 | <delete dir="${build.dir}"/> |
---|
[19] | 885 | <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> |
---|
[11] | 886 | </target> |
---|
| 887 | <target name="-post-clean"> |
---|
| 888 | <!-- Empty placeholder for easier customization. --> |
---|
| 889 | <!-- You can override this target in the ../build.xml file. --> |
---|
| 890 | </target> |
---|
| 891 | <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> |
---|
[19] | 892 | <target name="-check-call-dep"> |
---|
| 893 | <property file="${call.built.properties}" prefix="already.built."/> |
---|
| 894 | <condition property="should.call.dep"> |
---|
| 895 | <not> |
---|
| 896 | <isset property="already.built.${call.subproject}"/> |
---|
| 897 | </not> |
---|
| 898 | </condition> |
---|
| 899 | </target> |
---|
| 900 | <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> |
---|
| 901 | <ant antfile="${call.script}" inheritall="false" target="${call.target}"> |
---|
| 902 | <propertyset> |
---|
| 903 | <propertyref prefix="transfer."/> |
---|
| 904 | <mapper from="transfer.*" to="*" type="glob"/> |
---|
| 905 | </propertyset> |
---|
| 906 | </ant> |
---|
| 907 | </target> |
---|
[11] | 908 | </project> |
---|