/nbproject/build-impl.xml
XML | 1442 lines | 1335 code | 0 blank | 107 comment | 0 complexity | 44dda88e141a7cd3df205d675fcc283b MD5 | raw file
Large files files are truncated, but you can click here to view the full file
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 - initialization 9 - compilation 10 - dist 11 - execution 12 - debugging 13 - javadoc 14 - test compilation 15 - test execution 16 - test debugging 17 - cleanup 18 19 --> 20<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="Server3-impl"> 21 <import file="ant-deploy.xml"/> 22 <fail message="Please build using Ant 1.7.1 or higher."> 23 <condition> 24 <not> 25 <antversion atleast="1.7.1"/> 26 </not> 27 </condition> 28 </fail> 29 <target depends="dist,javadoc" description="Build whole project." name="default"/> 30 <!-- 31 INITIALIZATION SECTION 32 --> 33 <target name="-pre-init"> 34 <!-- Empty placeholder for easier customization. --> 35 <!-- You can override this target in the ../build.xml file. --> 36 </target> 37 <target depends="-pre-init" name="-init-private"> 38 <property file="nbproject/private/private.properties"/> 39 </target> 40 <target depends="-pre-init,-init-private" name="-init-user"> 41 <property file="${user.properties.file}"/> 42 <!-- The two properties below are usually overridden --> 43 <!-- by the active platform. Just a fallback. --> 44 <property name="default.javac.source" value="1.4"/> 45 <property name="default.javac.target" value="1.4"/> 46 </target> 47 <target depends="-pre-init,-init-private,-init-user" name="-init-project"> 48 <property file="nbproject/project.properties"/> 49 </target> 50 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/> 51 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> 52 <condition property="have.tests"> 53 <or> 54 <available file="${test.src.dir}"/> 55 </or> 56 </condition> 57 <condition property="have.sources"> 58 <or> 59 <available file="${src.dir}"/> 60 </or> 61 </condition> 62 <condition property="netbeans.home+have.tests"> 63 <and> 64 <isset property="netbeans.home"/> 65 <isset property="have.tests"/> 66 </and> 67 </condition> 68 <condition property="no.javadoc.preview"> 69 <isfalse value="${javadoc.preview}"/> 70 </condition> 71 <property name="javac.compilerargs" value=""/> 72 <condition property="no.deps"> 73 <and> 74 <istrue value="${no.dependencies}"/> 75 </and> 76 </condition> 77 <condition property="no.dist.ear.dir"> 78 <not> 79 <isset property="dist.ear.dir"/> 80 </not> 81 </condition> 82 <property name="build.web.excludes" value="${build.classes.excludes}"/> 83 <condition property="do.compile.jsps"> 84 <istrue value="${compile.jsps}"/> 85 </condition> 86 <condition property="do.debug.server"> 87 <or> 88 <not> 89 <isset property="debug.server"/> 90 </not> 91 <istrue value="${debug.server}"/> 92 <and> 93 <not> 94 <istrue value="${debug.server}"/> 95 </not> 96 <not> 97 <istrue value="${debug.client}"/> 98 </not> 99 </and> 100 </or> 101 </condition> 102 <condition property="do.debug.client"> 103 <istrue value="${debug.client}"/> 104 </condition> 105 <condition property="do.display.browser"> 106 <istrue value="${display.browser}"/> 107 </condition> 108 <condition property="do.display.browser.debug"> 109 <and> 110 <isset property="do.display.browser"/> 111 <not> 112 <isset property="do.debug.client"/> 113 </not> 114 </and> 115 </condition> 116 <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/> 117 <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/> 118 <condition property="do.war.package.with.custom.manifest"> 119 <isset property="has.custom.manifest"/> 120 </condition> 121 <condition property="do.war.package.without.custom.manifest"> 122 <not> 123 <isset property="has.custom.manifest"/> 124 </not> 125 </condition> 126 <condition property="do.tmp.war.package.with.custom.manifest"> 127 <and> 128 <isset property="has.custom.manifest"/> 129 <or> 130 <isfalse value="${directory.deployment.supported}"/> 131 <isset property="dist.ear.dir"/> 132 </or> 133 </and> 134 </condition> 135 <condition property="do.tmp.war.package.without.custom.manifest"> 136 <and> 137 <not> 138 <isset property="has.custom.manifest"/> 139 </not> 140 <or> 141 <isfalse value="${directory.deployment.supported}"/> 142 <isset property="dist.ear.dir"/> 143 </or> 144 </and> 145 </condition> 146 <condition property="do.tmp.war.package"> 147 <or> 148 <isfalse value="${directory.deployment.supported}"/> 149 <isset property="dist.ear.dir"/> 150 </or> 151 </condition> 152 <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/> 153 <condition else="" property="application.args.param" value="${application.args}"> 154 <and> 155 <isset property="application.args"/> 156 <not> 157 <equals arg1="${application.args}" arg2="" trim="true"/> 158 </not> 159 </and> 160 </condition> 161 <property name="source.encoding" value="${file.encoding}"/> 162 <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> 163 <and> 164 <isset property="javadoc.encoding"/> 165 <not> 166 <equals arg1="${javadoc.encoding}" arg2=""/> 167 </not> 168 </and> 169 </condition> 170 <property name="javadoc.encoding.used" value="${source.encoding}"/> 171 <property name="includes" value="**"/> 172 <property name="excludes" value=""/> 173 <property name="runmain.jvmargs" value=""/> 174 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> 175 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> 176 <and> 177 <isset property="endorsed.classpath"/> 178 <length length="0" string="${endorsed.classpath}" when="greater"/> 179 </and> 180 </condition> 181 <condition else="false" property="jdkBug6558476"> 182 <and> 183 <matches pattern="1\.[56]" string="${java.specification.version}"/> 184 <not> 185 <os family="unix"/> 186 </not> 187 </and> 188 </condition> 189 <property name="javac.fork" value="${jdkBug6558476}"/> 190 <condition property="junit.available"> 191 <or> 192 <available classname="org.junit.Test" classpath="${run.test.classpath}"/> 193 <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> 194 </or> 195 </condition> 196 <condition property="testng.available"> 197 <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> 198 </condition> 199 <condition property="junit+testng.available"> 200 <and> 201 <istrue value="${junit.available}"/> 202 <istrue value="${testng.available}"/> 203 </and> 204 </condition> 205 <condition else="testng" property="testng.mode" value="mixed"> 206 <istrue value="${junit+testng.available}"/> 207 </condition> 208 <condition else="" property="testng.debug.mode" value="-mixed"> 209 <istrue value="${junit+testng.available}"/> 210 </condition> 211 </target> 212 <target depends="init" name="-init-cos" unless="deploy.on.save"> 213 <condition property="deploy.on.save" value="true"> 214 <or> 215 <istrue value="${j2ee.deploy.on.save}"/> 216 <istrue value="${j2ee.compile.on.save}"/> 217 </or> 218 </condition> 219 </target> 220 <target name="-post-init"> 221 <!-- Empty placeholder for easier customization. --> 222 <!-- You can override this target in the ../build.xml file. --> 223 </target> 224 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> 225 <fail unless="src.dir">Must set src.dir</fail> 226 <fail unless="test.src.dir">Must set test.src.dir</fail> 227 <fail unless="build.dir">Must set build.dir</fail> 228 <fail unless="build.web.dir">Must set build.web.dir</fail> 229 <fail unless="build.generated.dir">Must set build.generated.dir</fail> 230 <fail unless="dist.dir">Must set dist.dir</fail> 231 <fail unless="build.classes.dir">Must set build.classes.dir</fail> 232 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> 233 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> 234 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> 235 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> 236 <fail unless="dist.war">Must set dist.war</fail> 237 <condition property="missing.j2ee.server.home"> 238 <and> 239 <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/> 240 <not> 241 <isset property="j2ee.server.home"/> 242 </not> 243 </and> 244 </condition> 245 <fail if="missing.j2ee.server.home"> 246The Java EE server classpath is not correctly set up - server home directory is missing. 247Either open the project in the IDE and assign the server or setup the server classpath manually. 248For example like this: 249 ant -Dj2ee.server.home=<app_server_installation_directory> 250 </fail> 251 <fail unless="j2ee.platform.classpath"> 252The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. 253Either open the project in the IDE and assign the server or setup the server classpath manually. 254For example like this: 255 ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) 256or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) 257 </fail> 258 </target> 259 <target name="-init-macrodef-property"> 260 <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1"> 261 <attribute name="name"/> 262 <attribute name="value"/> 263 <sequential> 264 <property name="@{name}" value="${@{value}}"/> 265 </sequential> 266 </macrodef> 267 </target> 268 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> 269 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2"> 270 <attribute default="${src.dir}" name="srcdir"/> 271 <attribute default="${build.classes.dir}" name="destdir"/> 272 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> 273 <attribute default="${javac.processorpath}" name="processorpath"/> 274 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> 275 <attribute default="${includes}" name="includes"/> 276 <attribute default="${excludes}" name="excludes"/> 277 <attribute default="${javac.debug}" name="debug"/> 278 <attribute default="${empty.dir}" name="gensrcdir"/> 279 <element name="customize" optional="true"/> 280 <sequential> 281 <property location="${build.dir}/empty" name="empty.dir"/> 282 <mkdir dir="${empty.dir}"/> 283 <mkdir dir="@{apgeneratedsrcdir}"/> 284 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}"> 285 <src> 286 <dirset dir="@{gensrcdir}" erroronmissingdir="false"> 287 <include name="*"/> 288 </dirset> 289 </src> 290 <classpath> 291 <path path="@{classpath}"/> 292 </classpath> 293 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> 294 <compilerarg line="${javac.compilerargs}"/> 295 <compilerarg value="-processorpath"/> 296 <compilerarg path="@{processorpath}:${empty.dir}"/> 297 <compilerarg line="${ap.processors.internal}"/> 298 <compilerarg value="-s"/> 299 <compilerarg path="@{apgeneratedsrcdir}"/> 300 <compilerarg line="${ap.proc.none.internal}"/> 301 <customize/> 302 </javac> 303 </sequential> 304 </macrodef> 305 </target> 306 <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> 307 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2"> 308 <attribute default="${src.dir}" name="srcdir"/> 309 <attribute default="${build.classes.dir}" name="destdir"/> 310 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> 311 <attribute default="${javac.processorpath}" name="processorpath"/> 312 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> 313 <attribute default="${includes}" name="includes"/> 314 <attribute default="${excludes}" name="excludes"/> 315 <attribute default="${javac.debug}" name="debug"/> 316 <attribute default="${empty.dir}" name="gensrcdir"/> 317 <element name="customize" optional="true"/> 318 <sequential> 319 <property location="${build.dir}/empty" name="empty.dir"/> 320 <mkdir dir="${empty.dir}"/> 321 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}"> 322 <src> 323 <dirset dir="@{gensrcdir}" erroronmissingdir="false"> 324 <include name="*"/> 325 </dirset> 326 </src> 327 <classpath> 328 <path path="@{classpath}"/> 329 </classpath> 330 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> 331 <compilerarg line="${javac.compilerargs}"/> 332 <customize/> 333 </javac> 334 </sequential> 335 </macrodef> 336 </target> 337 <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> 338 <macrodef name="depend" uri="http://www.netbeans.org/ns/web-project/2"> 339 <attribute default="${src.dir}" name="srcdir"/> 340 <attribute default="${build.classes.dir}" name="destdir"/> 341 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> 342 <sequential> 343 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> 344 <classpath> 345 <path path="@{classpath}"/> 346 </classpath> 347 </depend> 348 </sequential> 349 </macrodef> 350 <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2"> 351 <attribute default="${build.classes.dir}" name="destdir"/> 352 <sequential> 353 <fail unless="javac.includes">Must set javac.includes</fail> 354 <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> 355 <path> 356 <filelist dir="@{destdir}" files="${javac.includes}"/> 357 </path> 358 <globmapper from="*.java" to="*.class"/> 359 </pathconvert> 360 <tempfile deleteonexit="true" property="javac.includesfile.binary"/> 361 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> 362 <delete> 363 <files includesfile="${javac.includesfile.binary}"/> 364 </delete> 365 <delete file="${javac.includesfile.binary}"/> 366 </sequential> 367 </macrodef> 368 </target> 369 <target if="${junit.available}" name="-init-macrodef-junit-init"> 370 <condition else="false" property="nb.junit.batch" value="true"> 371 <and> 372 <istrue value="${junit.available}"/> 373 <not> 374 <isset property="test.method"/> 375 </not> 376 </and> 377 </condition> 378 <condition else="false" property="nb.junit.single" value="true"> 379 <and> 380 <istrue value="${junit.available}"/> 381 <isset property="test.method"/> 382 </and> 383 </condition> 384 </target> 385 <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> 386 <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2"> 387 <attribute default="${includes}" name="includes"/> 388 <attribute default="${excludes}" name="excludes"/> 389 <attribute default="**" name="testincludes"/> 390 <attribute default="" name="testmethods"/> 391 <element name="customize" optional="true"/> 392 <sequential> 393 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}"> 394 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> 395 <syspropertyset> 396 <propertyref prefix="test-sys-prop."/> 397 <mapper from="test-sys-prop.*" to="*" type="glob"/> 398 </syspropertyset> 399 <formatter type="brief" usefile="false"/> 400 <formatter type="xml"/> 401 <jvmarg value="-ea"/> 402 <customize/> 403 </junit> 404 </sequential> 405 </macrodef> 406 </target> 407 <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> 408 <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2"> 409 <attribute default="${includes}" name="includes"/> 410 <attribute default="${excludes}" name="excludes"/> 411 <attribute default="**" name="testincludes"/> 412 <attribute default="" name="testmethods"/> 413 <element name="customize" optional="true"/> 414 <sequential> 415 <property name="run.jvmargs.ide" value=""/> 416 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}"> 417 <batchtest todir="${build.test.results.dir}"> 418 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> 419 <filename name="@{testincludes}"/> 420 </fileset> 421 </batchtest> 422 <syspropertyset> 423 <propertyref prefix="test-sys-prop."/> 424 <mapper from="test-sys-prop.*" to="*" type="glob"/> 425 </syspropertyset> 426 <formatter type="brief" usefile="false"/> 427 <formatter type="xml"/> 428 <jvmarg value="-ea"/> 429 <jvmarg line="${run.jvmargs.ide}"/> 430 <customize/> 431 </junit> 432 </sequential> 433 </macrodef> 434 </target> 435 <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> 436 <target if="${testng.available}" name="-init-macrodef-testng"> 437 <macrodef name="testng" uri="http://www.netbeans.org/ns/web-project/2"> 438 <attribute default="${includes}" name="includes"/> 439 <attribute default="${excludes}" name="excludes"/> 440 <attribute default="**" name="testincludes"/> 441 <attribute default="" name="testmethods"/> 442 <element name="customize" optional="true"/> 443 <sequential> 444 <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> 445 <isset property="test.method"/> 446 </condition> 447 <union id="test.set"> 448 <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> 449 <filename name="@{testincludes}"/> 450 </fileset> 451 </union> 452 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> 453 <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="Server3" testname="TestNG tests" workingDir="${basedir}"> 454 <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> 455 <propertyset> 456 <propertyref prefix="test-sys-prop."/> 457 <mapper from="test-sys-prop.*" to="*" type="glob"/> 458 </propertyset> 459 <customize/> 460 </testng> 461 </sequential> 462 </macrodef> 463 </target> 464 <target name="-init-macrodef-test-impl"> 465 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2"> 466 <attribute default="${includes}" name="includes"/> 467 <attribute default="${excludes}" name="excludes"/> 468 <attribute default="**" name="testincludes"/> 469 <attribute default="" name="testmethods"/> 470 <element implicit="true" name="customize" optional="true"/> 471 <sequential> 472 <echo>No tests executed.</echo> 473 </sequential> 474 </macrodef> 475 </target> 476 <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> 477 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2"> 478 <attribute default="${includes}" name="includes"/> 479 <attribute default="${excludes}" name="excludes"/> 480 <attribute default="**" name="testincludes"/> 481 <attribute default="" name="testmethods"/> 482 <element implicit="true" name="customize" optional="true"/> 483 <sequential> 484 <webproject2:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> 485 <customize/> 486 </webproject2:junit> 487 </sequential> 488 </macrodef> 489 </target> 490 <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> 491 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2"> 492 <attribute default="${includes}" name="includes"/> 493 <attribute default="${excludes}" name="excludes"/> 494 <attribute default="**" name="testincludes"/> 495 <attribute default="" name="testmethods"/> 496 <element implicit="true" name="customize" optional="true"/> 497 <sequential> 498 <webproject2:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> 499 <customize/> 500 </webproject2:testng> 501 </sequential> 502 </macrodef> 503 </target> 504 <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> 505 <macrodef name="test" uri="http://www.netbeans.org/ns/web-project/2"> 506 <attribute default="${includes}" name="includes"/> 507 <attribute default="${excludes}" name="excludes"/> 508 <attribute default="**" name="testincludes"/> 509 <attribute default="" name="testmethods"/> 510 <sequential> 511 <webproject2:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> 512 <customize> 513 <classpath> 514 <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/> 515 </classpath> 516 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 517 <jvmarg line="${runmain.jvmargs}"/> 518 </customize> 519 </webproject2:test-impl> 520 </sequential> 521 </macrodef> 522 </target> 523 <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> 524 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2"> 525 <attribute default="${includes}" name="includes"/> 526 <attribute default="${excludes}" name="excludes"/> 527 <attribute default="**" name="testincludes"/> 528 <attribute default="" name="testmethods"/> 529 <element name="customize" optional="true"/> 530 <sequential> 531 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}"> 532 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> 533 <syspropertyset> 534 <propertyref prefix="test-sys-prop."/> 535 <mapper from="test-sys-prop.*" to="*" type="glob"/> 536 </syspropertyset> 537 <formatter type="brief" usefile="false"/> 538 <formatter type="xml"/> 539 <jvmarg value="-ea"/> 540 <jvmarg line="${debug-args-line}"/> 541 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> 542 <customize/> 543 </junit> 544 </sequential> 545 </macrodef> 546 </target> 547 <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> 548 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2"> 549 <attribute default="${includes}" name="includes"/> 550 <attribute default="${excludes}" name="excludes"/> 551 <attribute default="**" name="testincludes"/> 552 <attribute default="" name="testmethods"/> 553 <element name="customize" optional="true"/> 554 <sequential> 555 <property name="run.jvmargs.ide" value=""/> 556 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}"> 557 <batchtest todir="${build.test.results.dir}"> 558 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> 559 <filename name="@{testincludes}"/> 560 </fileset> 561 </batchtest> 562 <syspropertyset> 563 <propertyref prefix="test-sys-prop."/> 564 <mapper from="test-sys-prop.*" to="*" type="glob"/> 565 </syspropertyset> 566 <formatter type="brief" usefile="false"/> 567 <formatter type="xml"/> 568 <jvmarg value="-ea"/> 569 <jvmarg line="${run.jvmargs.ide}"/> 570 <jvmarg line="${debug-args-line}"/> 571 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> 572 <customize/> 573 </junit> 574 </sequential> 575 </macrodef> 576 </target> 577 <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> 578 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/web-project/2"> 579 <attribute default="${includes}" name="includes"/> 580 <attribute default="${excludes}" name="excludes"/> 581 <attribute default="**" name="testincludes"/> 582 <attribute default="" name="testmethods"/> 583 <element implicit="true" name="customize" optional="true"/> 584 <sequential> 585 <webproject2:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> 586 <customize/> 587 </webproject2:junit-debug> 588 </sequential> 589 </macrodef> 590 </target> 591 <target if="${testng.available}" name="-init-macrodef-testng-debug"> 592 <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/web-project/2"> 593 <attribute default="${main.class}" name="testClass"/> 594 <attribute default="" name="testMethod"/> 595 <element name="customize2" optional="true"/> 596 <sequential> 597 <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> 598 <isset property="test.method"/> 599 </condition> 600 <condition else="-suitename Server3 -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> 601 <matches pattern=".*\.xml" string="@{testClass}"/> 602 </condition> 603 <delete dir="${build.test.results.dir}" quiet="true"/> 604 <mkdir dir="${build.test.results.dir}"/> 605 <webproject1:debug args="${testng.cmd.args}" classname="org.testng.TestNG" classpath="${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}"> 606 <customize> 607 <customize2/> 608 <jvmarg value="-ea"/> 609 <arg line="${testng.debug.mode}"/> 610 <arg line="-d ${build.test.results.dir}"/> 611 <arg line="-listener org.testng.reporters.VerboseReporter"/> 612 </customize> 613 </webproject1:debug> 614 </sequential> 615 </macrodef> 616 </target> 617 <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> 618 <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/web-project/2"> 619 <attribute default="${main.class}" name="testClass"/> 620 <attribute default="" name="testMethod"/> 621 <element implicit="true" name="customize2" optional="true"/> 622 <sequential> 623 <webproject2:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> 624 <customize2/> 625 </webproject2:testng-debug> 626 </sequential> 627 </macrodef> 628 </target> 629 <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> 630 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2"> 631 <attribute default="${includes}" name="includes"/> 632 <attribute default="${excludes}" name="excludes"/> 633 <attribute default="**" name="testincludes"/> 634 <attribute default="" name="testmethods"/> 635 <attribute default="${main.class}" name="testClass"/> 636 <attribute default="" name="testMethod"/> 637 <sequential> 638 <webproject2:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> 639 <customize> 640 <classpath> 641 <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/> 642 </classpath> 643 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 644 <jvmarg line="${runmain.jvmargs}"/> 645 </customize> 646 </webproject2:test-debug-impl> 647 </sequential> 648 </macrodef> 649 </target> 650 <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> 651 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2"> 652 <attribute default="${includes}" name="includes"/> 653 <attribute default="${excludes}" name="excludes"/> 654 <attribute default="**" name="testincludes"/> 655 <attribute default="" name="testmethods"/> 656 <attribute default="${main.class}" name="testClass"/> 657 <attribute default="" name="testMethod"/> 658 <sequential> 659 <webproject2:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> 660 <customize2> 661 <syspropertyset> 662 <propertyref prefix="test-sys-prop."/> 663 <mapper from="test-sys-prop.*" to="*" type="glob"/> 664 </syspropertyset> 665 </customize2> 666 </webproject2:testng-debug-impl> 667 </sequential> 668 </macrodef> 669 </target> 670 <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> 671 <target name="-init-macrodef-java"> 672 <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1"> 673 <attribute default="${main.class}" name="classname"/> 674 <attribute default="${debug.classpath}" name="classpath"/> 675 <element name="customize" optional="true"/> 676 <sequential> 677 <java classname="@{classname}" fork="true"> 678 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 679 <jvmarg line="${runmain.jvmargs}"/> 680 <classpath> 681 <path path="@{classpath}:${j2ee.platform.classpath}"/> 682 </classpath> 683 <syspropertyset> 684 <propertyref prefix="run-sys-prop."/> 685 <mapper from="run-sys-prop.*" to="*" type="glob"/> 686 </syspropertyset> 687 <customize/> 688 </java> 689 </sequential> 690 </macrodef> 691 </target> 692 <target name="-init-macrodef-nbjsdebug"> 693 <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1"> 694 <attribute default="${client.url}" name="webUrl"/> 695 <sequential> 696 <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/> 697 </sequential> 698 </macrodef> 699 </target> 700 <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> 701 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1"> 702 <attribute default="${main.class}" name="name"/> 703 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/> 704 <sequential> 705 <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}"> 706 <classpath> 707 <path path="@{classpath}"/> 708 </classpath> 709 </nbjpdastart> 710 </sequential> 711 </macrodef> 712 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1"> 713 <attribute default="${build.classes.dir}" name="dir"/> 714 <sequential> 715 <nbjpdareload> 716 <fileset dir="@{dir}" includes="${fix.classes}"> 717 <include name="${fix.includes}*.class"/> 718 </fileset> 719 </nbjpdareload> 720 </sequential> 721 </macrodef> 722 <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1"> 723 <sequential> 724 <nbjpdaappreloaded/> 725 </sequential> 726 </macrodef> 727 </target> 728 <target name="-init-debug-args"> 729 <property name="version-output" value="java version "${ant.java.version}"/> 730 <condition property="have-jdk-older-than-1.4"> 731 <or> 732 <contains string="${version-output}" substring="java version "1.0"/> 733 <contains string="${version-output}" substring="java version "1.1"/> 734 <contains string="${version-output}" substring="java version "1.2"/> 735 <contains string="${version-output}" substring="java version "1.3"/> 736 </or> 737 </condition> 738 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> 739 <istrue value="${have-jdk-older-than-1.4}"/> 740 </condition> 741 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> 742 <os family="windows"/> 743 </condition> 744 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> 745 <isset property="debug.transport"/> 746 </condition> 747 </target> 748 <target depends="-init-debug-args" name="-init-macrodef-debug"> 749 <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1"> 750 <attribute default="${main.class}" name="classname"/> 751 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/> 752 <attribute default="${application.args.param}" name="args"/> 753 <element name="customize" optional="true"/> 754 <sequential> 755 <java classname="@{classname}" fork="true"> 756 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 757 <jvmarg line="${debug-args-line}"/> 758 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> 759 <jvmarg line="${runmain.jvmargs}"/> 760 <classpath> 761 <path path="@{classpath}"/> 762 </classpath> 763 <syspropertyset> 764 <propertyref prefix="run-sys-prop."/> 765 <mapper from="run-sys-prop.*" to="*" type="glob"/> 766 </syspropertyset> 767 <arg line="@{args}"/> 768 <customize/> 769 </java> 770 </sequential> 771 </macrodef> 772 </target> 773 <target name="-init-taskdefs"> 774 <fail unless="libs.CopyLibs.classpath"> 775The libs.CopyLibs.classpath property is not set up. 776This property must point to 777org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part 778of NetBeans IDE installation and is usually located at 779<netbeans_installation>/java<version>/ant/extra folder. 780Either open the project in the IDE and make sure CopyLibs library 781exists or setup the property manually. For example like this: 782 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar 783 </fail> 784 <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/> 785 </target> 786 <target name="-init-ap-cmdline-properties"> 787 <property name="annotation.processing.enabled" value="true"/> 788 <property name="annotation.processing.processors.list" value=""/> 789 <property name="annotation.processing.run.all.processors" value="true"/> 790 <property name="javac.processorpath" value="${javac.classpath}"/> 791 <property name="javac.test.processorpath" value="${javac.test.classpath}"/> 792 <condition property="ap.supported.internal" value="true"> 793 <not> 794 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> 795 </not> 796 </condition> 797 </target> 798 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> 799 <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> 800 <isfalse value="${annotation.processing.run.all.processors}"/> 801 </condition> 802 <condition else="" property="ap.proc.none.internal" value="-proc:none"> 803 <isfalse value="${annotation.processing.enabled}"/> 804 </condition> 805 </target> 806 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> 807 <property name="ap.cmd.line.internal" value=""/> 808 </target> 809 <!-- 810 pre NB7.2 profiling section; consider it deprecated 811 --> 812 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> 813 <target name="-profile-pre-init"> 814 <!-- Empty placeholder for easier customization. --> 815 <!-- You can override this target in the ../build.xml file. --> 816 </target> 817 <target name="-profile-post-init"> 818 <!-- Empty placeholder for easier customization. --> 819 <!-- You can override this target in the ../build.xml file. --> 820 </target> 821 <target depends="-profile-pre-init, init, -profile-post-init" if="profiler.info.jvmargs.agent" name="-profile-init-check"> 822 <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> 823 <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> 824 </target> 825 <!-- 826 end of pre NB7.2 profiling section 827 --> 828 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/> 829 <!-- 830 COMPILATION SECTION 831 --> 832 <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/> 833 <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/> 834 <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/> 835 <target depends="init,deps-jar" name="-pre-pre-compile"> 836 <mkdir dir="${build.classes.dir}"/> 837 </target> 838 <target name="-pre-compile"> 839 <!-- Empty placeholder for easier customization. --> 840 <!-- You can override this target in the ../build.xml file. --> 841 </target> 842 <target name="-copy-webdir"> 843 <copy todir="${build.web.dir}"> 844 <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/> 845 </copy> 846 <copy todir="${build.web.dir}/WEB-INF"> 847 <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/> 848 </copy> 849 </target> 850 <target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest" if="have.sources" name="-do-compile"> 851 <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/> 852 <copy todir="${build.classes.dir}"> 853 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> 854 </copy> 855 </target> 856 <target if="has.custom.manifest" name="-copy-manifest"> 857 <mkdir dir="${build.meta.inf.dir}"/> 858 <copy todir="${build.meta.inf.dir}"> 859 <fileset dir="${conf.dir}" includes="MANIFEST.MF"/> 860 </copy> 861 </target> 862 <target if="has.persistence.xml" name="-copy-persistence-xml"> 863 <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/> 864 <copy todir="${build.web.dir}/WEB-INF/classes/META-INF"> 865 <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/> 866 </copy> 867 </target> 868 <target name="-post-compile"> 869 <!-- Empty placeholder for easier customization. --> 870 <!-- You can override this target in the ../build.xml file. --> 871 </target> 872 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> 873 <target name="-pre-compile-single"> 874 <!-- Empty placeholder for easier customization. --> 875 <!-- You can override this target in the ../build.xml file. --> 876 </target> 877 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> 878 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> 879 <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/> 880 <copy todir="${build.classes.dir}"> 881 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> 882 </copy> 883 </target> 884 <target name="-post-compile-single"> 885 <!-- Empty placeholder for easier customization. --> 886 <!-- You can override this target in the ../build.xml file. --> 887 </target> 888 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> 889 <property name="jspc.schemas" value="/resources/schemas/"/> 890 <property name="jspc.dtds" value="/resources/dtds/"/> 891 <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps"> 892 <mkdir dir="${build.generated.dir}/src"/> 893 <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true"> 894 <arg value="-uriroot"/> 895 <arg file="${basedir}/${build.web.dir}"/> 896 <arg value="-d"/> 897 <arg file="${basedir}/${build.generated.dir}/src"/> 898 <arg value="-die1"/> 899 <arg value="-schemas ${jspc.schemas}"/> 900 <arg value="-dtds ${jspc.dtds}"/> 901 <arg value="-compilerSourceVM ${javac.source}"/> 902 <arg value="-compilerTargetVM ${javac.target}"/> 903 <arg value="-javaEncoding ${source.encoding}"/> 904 <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/> 905 <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/> 906 </java> 907 <mkdir dir="${build.generated.dir}/classes"/> 908 <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/> 909 </target> 910 <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp"> 911 <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail> 912 <mkdir dir="${build.generated.dir}/src"/> 913 <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true"> 914 <arg value="-uriroot"/> 915 <arg file="${basedir}/${build.web.dir}"/> 916 <arg value="-d"/> 917 <arg file="${basedir}/${build.generated.dir}/src"/> 918 <arg value="-die1"/> 919 <arg value="-schemas ${jspc.schemas}"/> 920 <arg value="-dtds ${jspc.dtds}"/> 921 <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/> 922 <arg value="-jspc.files"/> 923 <arg path="${jsp.includes}"/> 924 <arg value="-c…
Large files files are truncated, but you can click here to view the full file