Sun, 01 Apr 2018 18:16:47 +0200
adds first part of a module manager UI
universe@0 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
universe@0 | 2 | <!-- |
universe@0 | 3 | *** GENERATED FROM project.xml - DO NOT EDIT *** |
universe@0 | 4 | *** EDIT ../build.xml INSTEAD *** |
universe@0 | 5 | |
universe@0 | 6 | For the purpose of easier reading the script |
universe@0 | 7 | is divided into following sections: |
universe@0 | 8 | - initialization |
universe@0 | 9 | - compilation |
universe@0 | 10 | - dist |
universe@0 | 11 | - execution |
universe@0 | 12 | - debugging |
universe@0 | 13 | - javadoc |
universe@0 | 14 | - test compilation |
universe@0 | 15 | - test execution |
universe@0 | 16 | - test debugging |
universe@0 | 17 | - cleanup |
universe@0 | 18 | |
universe@0 | 19 | --> |
universe@0 | 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="LightPIT-impl"> |
universe@0 | 21 | <import file="ant-deploy.xml"/> |
universe@0 | 22 | <fail message="Please build using Ant 1.7.1 or higher."> |
universe@0 | 23 | <condition> |
universe@0 | 24 | <not> |
universe@0 | 25 | <antversion atleast="1.7.1"/> |
universe@0 | 26 | </not> |
universe@0 | 27 | </condition> |
universe@0 | 28 | </fail> |
universe@0 | 29 | <target depends="dist,javadoc" description="Build whole project." name="default"/> |
universe@0 | 30 | <!-- |
universe@0 | 31 | INITIALIZATION SECTION |
universe@0 | 32 | --> |
universe@0 | 33 | <target name="-pre-init"> |
universe@0 | 34 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 35 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 36 | </target> |
universe@0 | 37 | <target depends="-pre-init" name="-init-private"> |
universe@0 | 38 | <property file="nbproject/private/private.properties"/> |
universe@0 | 39 | </target> |
universe@0 | 40 | <target depends="-pre-init,-init-private" name="-init-user"> |
universe@0 | 41 | <property file="${user.properties.file}"/> |
universe@0 | 42 | <!-- The two properties below are usually overridden --> |
universe@0 | 43 | <!-- by the active platform. Just a fallback. --> |
universe@0 | 44 | <property name="default.javac.source" value="1.4"/> |
universe@0 | 45 | <property name="default.javac.target" value="1.4"/> |
universe@0 | 46 | </target> |
universe@0 | 47 | <target depends="-pre-init,-init-private,-init-user" name="-init-project"> |
universe@0 | 48 | <property file="nbproject/project.properties"/> |
universe@0 | 49 | </target> |
universe@0 | 50 | <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/> |
universe@0 | 51 | <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> |
universe@0 | 52 | <condition property="have.tests"> |
universe@0 | 53 | <or> |
universe@0 | 54 | <available file="${test.src.dir}"/> |
universe@0 | 55 | </or> |
universe@0 | 56 | </condition> |
universe@0 | 57 | <condition property="have.sources"> |
universe@0 | 58 | <or> |
universe@0 | 59 | <available file="${src.dir}"/> |
universe@0 | 60 | </or> |
universe@0 | 61 | </condition> |
universe@0 | 62 | <condition property="netbeans.home+have.tests"> |
universe@0 | 63 | <and> |
universe@0 | 64 | <isset property="netbeans.home"/> |
universe@0 | 65 | <isset property="have.tests"/> |
universe@0 | 66 | </and> |
universe@0 | 67 | </condition> |
universe@0 | 68 | <condition property="no.javadoc.preview"> |
universe@0 | 69 | <isfalse value="${javadoc.preview}"/> |
universe@0 | 70 | </condition> |
universe@0 | 71 | <property name="javac.compilerargs" value=""/> |
universe@0 | 72 | <condition property="no.deps"> |
universe@0 | 73 | <and> |
universe@0 | 74 | <istrue value="${no.dependencies}"/> |
universe@0 | 75 | </and> |
universe@0 | 76 | </condition> |
universe@0 | 77 | <condition property="no.dist.ear.dir"> |
universe@0 | 78 | <not> |
universe@0 | 79 | <isset property="dist.ear.dir"/> |
universe@0 | 80 | </not> |
universe@0 | 81 | </condition> |
universe@0 | 82 | <property name="build.web.excludes" value="${build.classes.excludes}"/> |
universe@0 | 83 | <condition property="do.compile.jsps"> |
universe@0 | 84 | <istrue value="${compile.jsps}"/> |
universe@0 | 85 | </condition> |
universe@0 | 86 | <condition property="do.debug.server"> |
universe@0 | 87 | <or> |
universe@0 | 88 | <not> |
universe@0 | 89 | <isset property="debug.server"/> |
universe@0 | 90 | </not> |
universe@0 | 91 | <istrue value="${debug.server}"/> |
universe@0 | 92 | <and> |
universe@0 | 93 | <not> |
universe@0 | 94 | <istrue value="${debug.server}"/> |
universe@0 | 95 | </not> |
universe@0 | 96 | <not> |
universe@0 | 97 | <istrue value="${debug.client}"/> |
universe@0 | 98 | </not> |
universe@0 | 99 | </and> |
universe@0 | 100 | </or> |
universe@0 | 101 | </condition> |
universe@0 | 102 | <condition property="do.debug.client"> |
universe@0 | 103 | <istrue value="${debug.client}"/> |
universe@0 | 104 | </condition> |
universe@0 | 105 | <condition property="do.display.browser"> |
universe@0 | 106 | <istrue value="${display.browser}"/> |
universe@0 | 107 | </condition> |
universe@0 | 108 | <condition property="do.display.browser.debug.old"> |
universe@0 | 109 | <and> |
universe@0 | 110 | <isset property="do.display.browser"/> |
universe@0 | 111 | <not> |
universe@0 | 112 | <isset property="do.debug.client"/> |
universe@0 | 113 | </not> |
universe@0 | 114 | <not> |
universe@0 | 115 | <isset property="browser.context"/> |
universe@0 | 116 | </not> |
universe@0 | 117 | </and> |
universe@0 | 118 | </condition> |
universe@0 | 119 | <condition property="do.display.browser.debug"> |
universe@0 | 120 | <and> |
universe@0 | 121 | <isset property="do.display.browser"/> |
universe@0 | 122 | <not> |
universe@0 | 123 | <isset property="do.debug.client"/> |
universe@0 | 124 | </not> |
universe@0 | 125 | <isset property="browser.context"/> |
universe@0 | 126 | </and> |
universe@0 | 127 | </condition> |
universe@0 | 128 | <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/> |
universe@0 | 129 | <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/> |
universe@0 | 130 | <condition property="do.war.package.with.custom.manifest"> |
universe@0 | 131 | <isset property="has.custom.manifest"/> |
universe@0 | 132 | </condition> |
universe@0 | 133 | <condition property="do.war.package.without.custom.manifest"> |
universe@0 | 134 | <not> |
universe@0 | 135 | <isset property="has.custom.manifest"/> |
universe@0 | 136 | </not> |
universe@0 | 137 | </condition> |
universe@0 | 138 | <condition property="do.tmp.war.package.with.custom.manifest"> |
universe@0 | 139 | <and> |
universe@0 | 140 | <isset property="has.custom.manifest"/> |
universe@0 | 141 | <or> |
universe@0 | 142 | <isfalse value="${directory.deployment.supported}"/> |
universe@0 | 143 | <isset property="dist.ear.dir"/> |
universe@0 | 144 | </or> |
universe@0 | 145 | </and> |
universe@0 | 146 | </condition> |
universe@0 | 147 | <condition property="do.tmp.war.package.without.custom.manifest"> |
universe@0 | 148 | <and> |
universe@0 | 149 | <not> |
universe@0 | 150 | <isset property="has.custom.manifest"/> |
universe@0 | 151 | </not> |
universe@0 | 152 | <or> |
universe@0 | 153 | <isfalse value="${directory.deployment.supported}"/> |
universe@0 | 154 | <isset property="dist.ear.dir"/> |
universe@0 | 155 | </or> |
universe@0 | 156 | </and> |
universe@0 | 157 | </condition> |
universe@0 | 158 | <condition property="do.tmp.war.package"> |
universe@0 | 159 | <or> |
universe@0 | 160 | <isfalse value="${directory.deployment.supported}"/> |
universe@0 | 161 | <isset property="dist.ear.dir"/> |
universe@0 | 162 | </or> |
universe@0 | 163 | </condition> |
universe@0 | 164 | <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/> |
universe@0 | 165 | <condition else="" property="application.args.param" value="${application.args}"> |
universe@0 | 166 | <and> |
universe@0 | 167 | <isset property="application.args"/> |
universe@0 | 168 | <not> |
universe@0 | 169 | <equals arg1="${application.args}" arg2="" trim="true"/> |
universe@0 | 170 | </not> |
universe@0 | 171 | </and> |
universe@0 | 172 | </condition> |
universe@0 | 173 | <property name="source.encoding" value="${file.encoding}"/> |
universe@0 | 174 | <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> |
universe@0 | 175 | <and> |
universe@0 | 176 | <isset property="javadoc.encoding"/> |
universe@0 | 177 | <not> |
universe@0 | 178 | <equals arg1="${javadoc.encoding}" arg2=""/> |
universe@0 | 179 | </not> |
universe@0 | 180 | </and> |
universe@0 | 181 | </condition> |
universe@0 | 182 | <property name="javadoc.encoding.used" value="${source.encoding}"/> |
universe@0 | 183 | <property name="includes" value="**"/> |
universe@0 | 184 | <property name="excludes" value=""/> |
universe@0 | 185 | <property name="runmain.jvmargs" value=""/> |
universe@0 | 186 | <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> |
universe@0 | 187 | <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> |
universe@0 | 188 | <and> |
universe@0 | 189 | <isset property="endorsed.classpath"/> |
universe@0 | 190 | <length length="0" string="${endorsed.classpath}" when="greater"/> |
universe@0 | 191 | </and> |
universe@0 | 192 | </condition> |
universe@0 | 193 | <condition else="false" property="jdkBug6558476"> |
universe@0 | 194 | <and> |
universe@0 | 195 | <matches pattern="1\.[56]" string="${java.specification.version}"/> |
universe@0 | 196 | <not> |
universe@0 | 197 | <os family="unix"/> |
universe@0 | 198 | </not> |
universe@0 | 199 | </and> |
universe@0 | 200 | </condition> |
universe@0 | 201 | <property name="javac.fork" value="${jdkBug6558476}"/> |
universe@0 | 202 | <condition property="junit.available"> |
universe@0 | 203 | <or> |
universe@0 | 204 | <available classname="org.junit.Test" classpath="${run.test.classpath}"/> |
universe@0 | 205 | <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> |
universe@0 | 206 | </or> |
universe@0 | 207 | </condition> |
universe@0 | 208 | <condition property="testng.available"> |
universe@0 | 209 | <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> |
universe@0 | 210 | </condition> |
universe@0 | 211 | <condition property="junit+testng.available"> |
universe@0 | 212 | <and> |
universe@0 | 213 | <istrue value="${junit.available}"/> |
universe@0 | 214 | <istrue value="${testng.available}"/> |
universe@0 | 215 | </and> |
universe@0 | 216 | </condition> |
universe@0 | 217 | <condition else="testng" property="testng.mode" value="mixed"> |
universe@0 | 218 | <istrue value="${junit+testng.available}"/> |
universe@0 | 219 | </condition> |
universe@0 | 220 | <condition else="" property="testng.debug.mode" value="-mixed"> |
universe@0 | 221 | <istrue value="${junit+testng.available}"/> |
universe@0 | 222 | </condition> |
universe@0 | 223 | </target> |
universe@0 | 224 | <target depends="init" name="-init-cos" unless="deploy.on.save"> |
universe@0 | 225 | <condition property="deploy.on.save" value="true"> |
universe@0 | 226 | <or> |
universe@0 | 227 | <istrue value="${j2ee.deploy.on.save}"/> |
universe@0 | 228 | <istrue value="${j2ee.compile.on.save}"/> |
universe@0 | 229 | </or> |
universe@0 | 230 | </condition> |
universe@0 | 231 | </target> |
universe@0 | 232 | <target name="-post-init"> |
universe@0 | 233 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 234 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 235 | </target> |
universe@0 | 236 | <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> |
universe@0 | 237 | <fail unless="src.dir">Must set src.dir</fail> |
universe@0 | 238 | <fail unless="test.src.dir">Must set test.src.dir</fail> |
universe@0 | 239 | <fail unless="build.dir">Must set build.dir</fail> |
universe@0 | 240 | <fail unless="build.web.dir">Must set build.web.dir</fail> |
universe@0 | 241 | <fail unless="build.generated.dir">Must set build.generated.dir</fail> |
universe@0 | 242 | <fail unless="dist.dir">Must set dist.dir</fail> |
universe@0 | 243 | <fail unless="build.classes.dir">Must set build.classes.dir</fail> |
universe@0 | 244 | <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> |
universe@0 | 245 | <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> |
universe@0 | 246 | <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> |
universe@0 | 247 | <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> |
universe@0 | 248 | <fail unless="dist.war">Must set dist.war</fail> |
universe@0 | 249 | <condition property="missing.j2ee.server.home"> |
universe@0 | 250 | <and> |
universe@0 | 251 | <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/> |
universe@0 | 252 | <not> |
universe@0 | 253 | <isset property="j2ee.server.home"/> |
universe@0 | 254 | </not> |
universe@0 | 255 | </and> |
universe@0 | 256 | </condition> |
universe@0 | 257 | <fail if="missing.j2ee.server.home"> |
universe@0 | 258 | The Java EE server classpath is not correctly set up - server home directory is missing. |
universe@0 | 259 | Either open the project in the IDE and assign the server or setup the server classpath manually. |
universe@0 | 260 | For example like this: |
universe@0 | 261 | ant -Dj2ee.server.home=<app_server_installation_directory> |
universe@0 | 262 | </fail> |
universe@0 | 263 | <fail unless="j2ee.platform.classpath"> |
universe@0 | 264 | The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. |
universe@0 | 265 | Either open the project in the IDE and assign the server or setup the server classpath manually. |
universe@0 | 266 | For example like this: |
universe@0 | 267 | ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) |
universe@0 | 268 | or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) |
universe@0 | 269 | </fail> |
universe@0 | 270 | </target> |
universe@0 | 271 | <target name="-init-macrodef-property"> |
universe@0 | 272 | <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1"> |
universe@0 | 273 | <attribute name="name"/> |
universe@0 | 274 | <attribute name="value"/> |
universe@0 | 275 | <sequential> |
universe@0 | 276 | <property name="@{name}" value="${@{value}}"/> |
universe@0 | 277 | </sequential> |
universe@0 | 278 | </macrodef> |
universe@0 | 279 | </target> |
universe@0 | 280 | <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> |
universe@0 | 281 | <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 282 | <attribute default="${src.dir}" name="srcdir"/> |
universe@0 | 283 | <attribute default="${build.classes.dir}" name="destdir"/> |
universe@0 | 284 | <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> |
universe@0 | 285 | <attribute default="${javac.processorpath}" name="processorpath"/> |
universe@0 | 286 | <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> |
universe@0 | 287 | <attribute default="${includes}" name="includes"/> |
universe@0 | 288 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 289 | <attribute default="${javac.debug}" name="debug"/> |
universe@0 | 290 | <attribute default="${empty.dir}" name="gensrcdir"/> |
universe@0 | 291 | <element name="customize" optional="true"/> |
universe@0 | 292 | <sequential> |
universe@0 | 293 | <property location="${build.dir}/empty" name="empty.dir"/> |
universe@0 | 294 | <mkdir dir="${empty.dir}"/> |
universe@0 | 295 | <mkdir dir="@{apgeneratedsrcdir}"/> |
universe@0 | 296 | <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}"> |
universe@0 | 297 | <src> |
universe@0 | 298 | <dirset dir="@{gensrcdir}" erroronmissingdir="false"> |
universe@0 | 299 | <include name="*"/> |
universe@0 | 300 | </dirset> |
universe@0 | 301 | </src> |
universe@0 | 302 | <classpath> |
universe@0 | 303 | <path path="@{classpath}"/> |
universe@0 | 304 | </classpath> |
universe@0 | 305 | <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> |
universe@0 | 306 | <compilerarg line="${javac.compilerargs}"/> |
universe@0 | 307 | <compilerarg value="-processorpath"/> |
universe@0 | 308 | <compilerarg path="@{processorpath}:${empty.dir}"/> |
universe@0 | 309 | <compilerarg line="${ap.processors.internal}"/> |
universe@0 | 310 | <compilerarg value="-s"/> |
universe@0 | 311 | <compilerarg path="@{apgeneratedsrcdir}"/> |
universe@0 | 312 | <compilerarg line="${ap.proc.none.internal}"/> |
universe@0 | 313 | <customize/> |
universe@0 | 314 | </javac> |
universe@0 | 315 | </sequential> |
universe@0 | 316 | </macrodef> |
universe@0 | 317 | </target> |
universe@0 | 318 | <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> |
universe@0 | 319 | <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 320 | <attribute default="${src.dir}" name="srcdir"/> |
universe@0 | 321 | <attribute default="${build.classes.dir}" name="destdir"/> |
universe@0 | 322 | <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> |
universe@0 | 323 | <attribute default="${javac.processorpath}" name="processorpath"/> |
universe@0 | 324 | <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> |
universe@0 | 325 | <attribute default="${includes}" name="includes"/> |
universe@0 | 326 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 327 | <attribute default="${javac.debug}" name="debug"/> |
universe@0 | 328 | <attribute default="${empty.dir}" name="gensrcdir"/> |
universe@0 | 329 | <element name="customize" optional="true"/> |
universe@0 | 330 | <sequential> |
universe@0 | 331 | <property location="${build.dir}/empty" name="empty.dir"/> |
universe@0 | 332 | <mkdir dir="${empty.dir}"/> |
universe@0 | 333 | <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}"> |
universe@0 | 334 | <src> |
universe@0 | 335 | <dirset dir="@{gensrcdir}" erroronmissingdir="false"> |
universe@0 | 336 | <include name="*"/> |
universe@0 | 337 | </dirset> |
universe@0 | 338 | </src> |
universe@0 | 339 | <classpath> |
universe@0 | 340 | <path path="@{classpath}"/> |
universe@0 | 341 | </classpath> |
universe@0 | 342 | <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> |
universe@0 | 343 | <compilerarg line="${javac.compilerargs}"/> |
universe@0 | 344 | <customize/> |
universe@0 | 345 | </javac> |
universe@0 | 346 | </sequential> |
universe@0 | 347 | </macrodef> |
universe@0 | 348 | </target> |
universe@0 | 349 | <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> |
universe@0 | 350 | <macrodef name="depend" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 351 | <attribute default="${src.dir}" name="srcdir"/> |
universe@0 | 352 | <attribute default="${build.classes.dir}" name="destdir"/> |
universe@0 | 353 | <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> |
universe@0 | 354 | <sequential> |
universe@0 | 355 | <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> |
universe@0 | 356 | <classpath> |
universe@0 | 357 | <path path="@{classpath}"/> |
universe@0 | 358 | </classpath> |
universe@0 | 359 | </depend> |
universe@0 | 360 | </sequential> |
universe@0 | 361 | </macrodef> |
universe@0 | 362 | <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 363 | <attribute default="${build.classes.dir}" name="destdir"/> |
universe@0 | 364 | <sequential> |
universe@0 | 365 | <fail unless="javac.includes">Must set javac.includes</fail> |
universe@0 | 366 | <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> |
universe@0 | 367 | <path> |
universe@0 | 368 | <filelist dir="@{destdir}" files="${javac.includes}"/> |
universe@0 | 369 | </path> |
universe@0 | 370 | <globmapper from="*.java" to="*.class"/> |
universe@0 | 371 | </pathconvert> |
universe@0 | 372 | <tempfile deleteonexit="true" property="javac.includesfile.binary"/> |
universe@0 | 373 | <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> |
universe@0 | 374 | <delete> |
universe@0 | 375 | <files includesfile="${javac.includesfile.binary}"/> |
universe@0 | 376 | </delete> |
universe@0 | 377 | <delete file="${javac.includesfile.binary}"/> |
universe@0 | 378 | </sequential> |
universe@0 | 379 | </macrodef> |
universe@0 | 380 | </target> |
universe@0 | 381 | <target if="${junit.available}" name="-init-macrodef-junit-init"> |
universe@0 | 382 | <condition else="false" property="nb.junit.batch" value="true"> |
universe@0 | 383 | <and> |
universe@0 | 384 | <istrue value="${junit.available}"/> |
universe@0 | 385 | <not> |
universe@0 | 386 | <isset property="test.method"/> |
universe@0 | 387 | </not> |
universe@0 | 388 | </and> |
universe@0 | 389 | </condition> |
universe@0 | 390 | <condition else="false" property="nb.junit.single" value="true"> |
universe@0 | 391 | <and> |
universe@0 | 392 | <istrue value="${junit.available}"/> |
universe@0 | 393 | <isset property="test.method"/> |
universe@0 | 394 | </and> |
universe@0 | 395 | </condition> |
universe@0 | 396 | </target> |
universe@0 | 397 | <target name="-init-test-properties"> |
universe@0 | 398 | <property name="test.binaryincludes" value="<nothing>"/> |
universe@0 | 399 | <property name="test.binarytestincludes" value=""/> |
universe@0 | 400 | <property name="test.binaryexcludes" value=""/> |
universe@0 | 401 | </target> |
universe@0 | 402 | <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> |
universe@0 | 403 | <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 404 | <attribute default="${includes}" name="includes"/> |
universe@0 | 405 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 406 | <attribute default="**" name="testincludes"/> |
universe@0 | 407 | <attribute default="" name="testmethods"/> |
universe@0 | 408 | <element name="customize" optional="true"/> |
universe@0 | 409 | <sequential> |
universe@0 | 410 | <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}"> |
universe@0 | 411 | <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> |
universe@0 | 412 | <syspropertyset> |
universe@0 | 413 | <propertyref prefix="test-sys-prop."/> |
universe@0 | 414 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
universe@0 | 415 | </syspropertyset> |
universe@0 | 416 | <formatter type="brief" usefile="false"/> |
universe@0 | 417 | <formatter type="xml"/> |
universe@0 | 418 | <jvmarg value="-ea"/> |
universe@0 | 419 | <customize/> |
universe@0 | 420 | </junit> |
universe@0 | 421 | </sequential> |
universe@0 | 422 | </macrodef> |
universe@0 | 423 | </target> |
universe@0 | 424 | <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> |
universe@0 | 425 | <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 426 | <attribute default="${includes}" name="includes"/> |
universe@0 | 427 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 428 | <attribute default="**" name="testincludes"/> |
universe@0 | 429 | <attribute default="" name="testmethods"/> |
universe@0 | 430 | <element name="customize" optional="true"/> |
universe@0 | 431 | <sequential> |
universe@0 | 432 | <property name="run.jvmargs.ide" value=""/> |
universe@0 | 433 | <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}"> |
universe@0 | 434 | <batchtest todir="${build.test.results.dir}"> |
universe@0 | 435 | <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> |
universe@0 | 436 | <filename name="@{testincludes}"/> |
universe@0 | 437 | </fileset> |
universe@0 | 438 | <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> |
universe@0 | 439 | <filename name="${test.binarytestincludes}"/> |
universe@0 | 440 | </fileset> |
universe@0 | 441 | </batchtest> |
universe@0 | 442 | <syspropertyset> |
universe@0 | 443 | <propertyref prefix="test-sys-prop."/> |
universe@0 | 444 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
universe@0 | 445 | </syspropertyset> |
universe@0 | 446 | <formatter type="brief" usefile="false"/> |
universe@0 | 447 | <formatter type="xml"/> |
universe@0 | 448 | <jvmarg value="-ea"/> |
universe@0 | 449 | <jvmarg line="${run.jvmargs.ide}"/> |
universe@0 | 450 | <customize/> |
universe@0 | 451 | </junit> |
universe@0 | 452 | </sequential> |
universe@0 | 453 | </macrodef> |
universe@0 | 454 | </target> |
universe@0 | 455 | <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> |
universe@0 | 456 | <target if="${testng.available}" name="-init-macrodef-testng"> |
universe@0 | 457 | <macrodef name="testng" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 458 | <attribute default="${includes}" name="includes"/> |
universe@0 | 459 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 460 | <attribute default="**" name="testincludes"/> |
universe@0 | 461 | <attribute default="" name="testmethods"/> |
universe@0 | 462 | <element name="customize" optional="true"/> |
universe@0 | 463 | <sequential> |
universe@0 | 464 | <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> |
universe@0 | 465 | <isset property="test.method"/> |
universe@0 | 466 | </condition> |
universe@0 | 467 | <union id="test.set"> |
universe@0 | 468 | <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> |
universe@0 | 469 | <filename name="@{testincludes}"/> |
universe@0 | 470 | </fileset> |
universe@0 | 471 | </union> |
universe@0 | 472 | <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> |
universe@0 | 473 | <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="LightPIT" testname="TestNG tests" workingDir="${basedir}"> |
universe@0 | 474 | <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> |
universe@0 | 475 | <propertyset> |
universe@0 | 476 | <propertyref prefix="test-sys-prop."/> |
universe@0 | 477 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
universe@0 | 478 | </propertyset> |
universe@0 | 479 | <customize/> |
universe@0 | 480 | </testng> |
universe@0 | 481 | </sequential> |
universe@0 | 482 | </macrodef> |
universe@0 | 483 | </target> |
universe@0 | 484 | <target name="-init-macrodef-test-impl"> |
universe@0 | 485 | <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 486 | <attribute default="${includes}" name="includes"/> |
universe@0 | 487 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 488 | <attribute default="**" name="testincludes"/> |
universe@0 | 489 | <attribute default="" name="testmethods"/> |
universe@0 | 490 | <element implicit="true" name="customize" optional="true"/> |
universe@0 | 491 | <sequential> |
universe@0 | 492 | <echo>No tests executed.</echo> |
universe@0 | 493 | </sequential> |
universe@0 | 494 | </macrodef> |
universe@0 | 495 | </target> |
universe@0 | 496 | <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> |
universe@0 | 497 | <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 498 | <attribute default="${includes}" name="includes"/> |
universe@0 | 499 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 500 | <attribute default="**" name="testincludes"/> |
universe@0 | 501 | <attribute default="" name="testmethods"/> |
universe@0 | 502 | <element implicit="true" name="customize" optional="true"/> |
universe@0 | 503 | <sequential> |
universe@0 | 504 | <webproject2:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> |
universe@0 | 505 | <customize/> |
universe@0 | 506 | </webproject2:junit> |
universe@0 | 507 | </sequential> |
universe@0 | 508 | </macrodef> |
universe@0 | 509 | </target> |
universe@0 | 510 | <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> |
universe@0 | 511 | <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 512 | <attribute default="${includes}" name="includes"/> |
universe@0 | 513 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 514 | <attribute default="**" name="testincludes"/> |
universe@0 | 515 | <attribute default="" name="testmethods"/> |
universe@0 | 516 | <element implicit="true" name="customize" optional="true"/> |
universe@0 | 517 | <sequential> |
universe@0 | 518 | <webproject2:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> |
universe@0 | 519 | <customize/> |
universe@0 | 520 | </webproject2:testng> |
universe@0 | 521 | </sequential> |
universe@0 | 522 | </macrodef> |
universe@0 | 523 | </target> |
universe@0 | 524 | <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> |
universe@0 | 525 | <macrodef name="test" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 526 | <attribute default="${includes}" name="includes"/> |
universe@0 | 527 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 528 | <attribute default="**" name="testincludes"/> |
universe@0 | 529 | <attribute default="" name="testmethods"/> |
universe@0 | 530 | <sequential> |
universe@0 | 531 | <webproject2:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> |
universe@0 | 532 | <customize> |
universe@0 | 533 | <classpath> |
universe@0 | 534 | <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/> |
universe@0 | 535 | </classpath> |
universe@0 | 536 | <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
universe@0 | 537 | <jvmarg line="${runmain.jvmargs}"/> |
universe@0 | 538 | </customize> |
universe@0 | 539 | </webproject2:test-impl> |
universe@0 | 540 | </sequential> |
universe@0 | 541 | </macrodef> |
universe@0 | 542 | </target> |
universe@0 | 543 | <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> |
universe@0 | 544 | <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 545 | <attribute default="${includes}" name="includes"/> |
universe@0 | 546 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 547 | <attribute default="**" name="testincludes"/> |
universe@0 | 548 | <attribute default="" name="testmethods"/> |
universe@0 | 549 | <element name="customize" optional="true"/> |
universe@0 | 550 | <sequential> |
universe@0 | 551 | <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}"> |
universe@0 | 552 | <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> |
universe@0 | 553 | <syspropertyset> |
universe@0 | 554 | <propertyref prefix="test-sys-prop."/> |
universe@0 | 555 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
universe@0 | 556 | </syspropertyset> |
universe@0 | 557 | <formatter type="brief" usefile="false"/> |
universe@0 | 558 | <formatter type="xml"/> |
universe@0 | 559 | <jvmarg value="-ea"/> |
universe@0 | 560 | <jvmarg line="${debug-args-line}"/> |
universe@0 | 561 | <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> |
universe@0 | 562 | <customize/> |
universe@0 | 563 | </junit> |
universe@0 | 564 | </sequential> |
universe@0 | 565 | </macrodef> |
universe@0 | 566 | </target> |
universe@0 | 567 | <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> |
universe@0 | 568 | <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 569 | <attribute default="${includes}" name="includes"/> |
universe@0 | 570 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 571 | <attribute default="**" name="testincludes"/> |
universe@0 | 572 | <attribute default="" name="testmethods"/> |
universe@0 | 573 | <element name="customize" optional="true"/> |
universe@0 | 574 | <sequential> |
universe@0 | 575 | <property name="run.jvmargs.ide" value=""/> |
universe@0 | 576 | <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}"> |
universe@0 | 577 | <batchtest todir="${build.test.results.dir}"> |
universe@0 | 578 | <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> |
universe@0 | 579 | <filename name="@{testincludes}"/> |
universe@0 | 580 | </fileset> |
universe@0 | 581 | <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> |
universe@0 | 582 | <filename name="${test.binarytestincludes}"/> |
universe@0 | 583 | </fileset> |
universe@0 | 584 | </batchtest> |
universe@0 | 585 | <syspropertyset> |
universe@0 | 586 | <propertyref prefix="test-sys-prop."/> |
universe@0 | 587 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
universe@0 | 588 | </syspropertyset> |
universe@0 | 589 | <formatter type="brief" usefile="false"/> |
universe@0 | 590 | <formatter type="xml"/> |
universe@0 | 591 | <jvmarg value="-ea"/> |
universe@0 | 592 | <jvmarg line="${run.jvmargs.ide}"/> |
universe@0 | 593 | <jvmarg line="${debug-args-line}"/> |
universe@0 | 594 | <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> |
universe@0 | 595 | <customize/> |
universe@0 | 596 | </junit> |
universe@0 | 597 | </sequential> |
universe@0 | 598 | </macrodef> |
universe@0 | 599 | </target> |
universe@0 | 600 | <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> |
universe@0 | 601 | <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 602 | <attribute default="${includes}" name="includes"/> |
universe@0 | 603 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 604 | <attribute default="**" name="testincludes"/> |
universe@0 | 605 | <attribute default="" name="testmethods"/> |
universe@0 | 606 | <element implicit="true" name="customize" optional="true"/> |
universe@0 | 607 | <sequential> |
universe@0 | 608 | <webproject2:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> |
universe@0 | 609 | <customize/> |
universe@0 | 610 | </webproject2:junit-debug> |
universe@0 | 611 | </sequential> |
universe@0 | 612 | </macrodef> |
universe@0 | 613 | </target> |
universe@0 | 614 | <target if="${testng.available}" name="-init-macrodef-testng-debug"> |
universe@0 | 615 | <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 616 | <attribute default="${main.class}" name="testClass"/> |
universe@0 | 617 | <attribute default="" name="testMethod"/> |
universe@0 | 618 | <element name="customize2" optional="true"/> |
universe@0 | 619 | <sequential> |
universe@0 | 620 | <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> |
universe@0 | 621 | <isset property="test.method"/> |
universe@0 | 622 | </condition> |
universe@0 | 623 | <condition else="-suitename LightPIT -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> |
universe@0 | 624 | <matches pattern=".*\.xml" string="@{testClass}"/> |
universe@0 | 625 | </condition> |
universe@0 | 626 | <delete dir="${build.test.results.dir}" quiet="true"/> |
universe@0 | 627 | <mkdir dir="${build.test.results.dir}"/> |
universe@0 | 628 | <webproject1:debug args="${testng.cmd.args}" classname="org.testng.TestNG" classpath="${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}"> |
universe@0 | 629 | <customize> |
universe@0 | 630 | <customize2/> |
universe@0 | 631 | <jvmarg value="-ea"/> |
universe@0 | 632 | <arg line="${testng.debug.mode}"/> |
universe@0 | 633 | <arg line="-d ${build.test.results.dir}"/> |
universe@0 | 634 | <arg line="-listener org.testng.reporters.VerboseReporter"/> |
universe@0 | 635 | </customize> |
universe@0 | 636 | </webproject1:debug> |
universe@0 | 637 | </sequential> |
universe@0 | 638 | </macrodef> |
universe@0 | 639 | </target> |
universe@0 | 640 | <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> |
universe@0 | 641 | <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 642 | <attribute default="${main.class}" name="testClass"/> |
universe@0 | 643 | <attribute default="" name="testMethod"/> |
universe@0 | 644 | <element implicit="true" name="customize2" optional="true"/> |
universe@0 | 645 | <sequential> |
universe@0 | 646 | <webproject2:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> |
universe@0 | 647 | <customize2/> |
universe@0 | 648 | </webproject2:testng-debug> |
universe@0 | 649 | </sequential> |
universe@0 | 650 | </macrodef> |
universe@0 | 651 | </target> |
universe@0 | 652 | <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> |
universe@0 | 653 | <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 654 | <attribute default="${includes}" name="includes"/> |
universe@0 | 655 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 656 | <attribute default="**" name="testincludes"/> |
universe@0 | 657 | <attribute default="" name="testmethods"/> |
universe@0 | 658 | <attribute default="${main.class}" name="testClass"/> |
universe@0 | 659 | <attribute default="" name="testMethod"/> |
universe@0 | 660 | <sequential> |
universe@0 | 661 | <webproject2:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> |
universe@0 | 662 | <customize> |
universe@0 | 663 | <classpath> |
universe@0 | 664 | <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/> |
universe@0 | 665 | </classpath> |
universe@0 | 666 | <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
universe@0 | 667 | <jvmarg line="${runmain.jvmargs}"/> |
universe@0 | 668 | </customize> |
universe@0 | 669 | </webproject2:test-debug-impl> |
universe@0 | 670 | </sequential> |
universe@0 | 671 | </macrodef> |
universe@0 | 672 | </target> |
universe@0 | 673 | <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> |
universe@0 | 674 | <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2"> |
universe@0 | 675 | <attribute default="${includes}" name="includes"/> |
universe@0 | 676 | <attribute default="${excludes}" name="excludes"/> |
universe@0 | 677 | <attribute default="**" name="testincludes"/> |
universe@0 | 678 | <attribute default="" name="testmethods"/> |
universe@0 | 679 | <attribute default="${main.class}" name="testClass"/> |
universe@0 | 680 | <attribute default="" name="testMethod"/> |
universe@0 | 681 | <sequential> |
universe@0 | 682 | <webproject2:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> |
universe@0 | 683 | <customize2> |
universe@0 | 684 | <syspropertyset> |
universe@0 | 685 | <propertyref prefix="test-sys-prop."/> |
universe@0 | 686 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
universe@0 | 687 | </syspropertyset> |
universe@0 | 688 | </customize2> |
universe@0 | 689 | </webproject2:testng-debug-impl> |
universe@0 | 690 | </sequential> |
universe@0 | 691 | </macrodef> |
universe@0 | 692 | </target> |
universe@0 | 693 | <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> |
universe@0 | 694 | <target name="-init-macrodef-java"> |
universe@0 | 695 | <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1"> |
universe@0 | 696 | <attribute default="${main.class}" name="classname"/> |
universe@0 | 697 | <attribute default="${debug.classpath}" name="classpath"/> |
universe@0 | 698 | <element name="customize" optional="true"/> |
universe@0 | 699 | <sequential> |
universe@0 | 700 | <java classname="@{classname}" fork="true"> |
universe@0 | 701 | <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
universe@0 | 702 | <jvmarg line="${runmain.jvmargs}"/> |
universe@0 | 703 | <classpath> |
universe@0 | 704 | <path path="@{classpath}:${j2ee.platform.classpath}"/> |
universe@0 | 705 | </classpath> |
universe@0 | 706 | <syspropertyset> |
universe@0 | 707 | <propertyref prefix="run-sys-prop."/> |
universe@0 | 708 | <mapper from="run-sys-prop.*" to="*" type="glob"/> |
universe@0 | 709 | </syspropertyset> |
universe@0 | 710 | <customize/> |
universe@0 | 711 | </java> |
universe@0 | 712 | </sequential> |
universe@0 | 713 | </macrodef> |
universe@0 | 714 | </target> |
universe@0 | 715 | <target name="-init-macrodef-nbjsdebug"> |
universe@0 | 716 | <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1"> |
universe@0 | 717 | <attribute default="${client.url}" name="webUrl"/> |
universe@0 | 718 | <sequential> |
universe@0 | 719 | <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/> |
universe@0 | 720 | </sequential> |
universe@0 | 721 | </macrodef> |
universe@0 | 722 | </target> |
universe@0 | 723 | <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> |
universe@0 | 724 | <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1"> |
universe@0 | 725 | <attribute default="${main.class}" name="name"/> |
universe@0 | 726 | <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/> |
universe@0 | 727 | <sequential> |
universe@0 | 728 | <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}"> |
universe@0 | 729 | <classpath> |
universe@0 | 730 | <path path="@{classpath}"/> |
universe@0 | 731 | </classpath> |
universe@0 | 732 | </nbjpdastart> |
universe@0 | 733 | </sequential> |
universe@0 | 734 | </macrodef> |
universe@0 | 735 | <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1"> |
universe@0 | 736 | <attribute default="${build.classes.dir}" name="dir"/> |
universe@0 | 737 | <sequential> |
universe@0 | 738 | <nbjpdareload> |
universe@0 | 739 | <fileset dir="@{dir}" includes="${fix.classes}"> |
universe@0 | 740 | <include name="${fix.includes}*.class"/> |
universe@0 | 741 | </fileset> |
universe@0 | 742 | </nbjpdareload> |
universe@0 | 743 | </sequential> |
universe@0 | 744 | </macrodef> |
universe@0 | 745 | <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1"> |
universe@0 | 746 | <sequential> |
universe@0 | 747 | <nbjpdaappreloaded/> |
universe@0 | 748 | </sequential> |
universe@0 | 749 | </macrodef> |
universe@0 | 750 | </target> |
universe@0 | 751 | <target name="-init-debug-args"> |
universe@0 | 752 | <property name="version-output" value="java version "${ant.java.version}"/> |
universe@0 | 753 | <condition property="have-jdk-older-than-1.4"> |
universe@0 | 754 | <or> |
universe@0 | 755 | <contains string="${version-output}" substring="java version "1.0"/> |
universe@0 | 756 | <contains string="${version-output}" substring="java version "1.1"/> |
universe@0 | 757 | <contains string="${version-output}" substring="java version "1.2"/> |
universe@0 | 758 | <contains string="${version-output}" substring="java version "1.3"/> |
universe@0 | 759 | </or> |
universe@0 | 760 | </condition> |
universe@0 | 761 | <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> |
universe@0 | 762 | <istrue value="${have-jdk-older-than-1.4}"/> |
universe@0 | 763 | </condition> |
universe@0 | 764 | <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> |
universe@0 | 765 | <os family="windows"/> |
universe@0 | 766 | </condition> |
universe@0 | 767 | <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> |
universe@0 | 768 | <isset property="debug.transport"/> |
universe@0 | 769 | </condition> |
universe@0 | 770 | </target> |
universe@0 | 771 | <target depends="-init-debug-args" name="-init-macrodef-debug"> |
universe@0 | 772 | <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1"> |
universe@0 | 773 | <attribute default="${main.class}" name="classname"/> |
universe@0 | 774 | <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/> |
universe@0 | 775 | <attribute default="${application.args.param}" name="args"/> |
universe@0 | 776 | <element name="customize" optional="true"/> |
universe@0 | 777 | <sequential> |
universe@0 | 778 | <java classname="@{classname}" fork="true"> |
universe@0 | 779 | <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
universe@0 | 780 | <jvmarg line="${debug-args-line}"/> |
universe@0 | 781 | <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> |
universe@0 | 782 | <jvmarg line="${runmain.jvmargs}"/> |
universe@0 | 783 | <classpath> |
universe@0 | 784 | <path path="@{classpath}"/> |
universe@0 | 785 | </classpath> |
universe@0 | 786 | <syspropertyset> |
universe@0 | 787 | <propertyref prefix="run-sys-prop."/> |
universe@0 | 788 | <mapper from="run-sys-prop.*" to="*" type="glob"/> |
universe@0 | 789 | </syspropertyset> |
universe@0 | 790 | <arg line="@{args}"/> |
universe@0 | 791 | <customize/> |
universe@0 | 792 | </java> |
universe@0 | 793 | </sequential> |
universe@0 | 794 | </macrodef> |
universe@0 | 795 | </target> |
universe@0 | 796 | <target name="-init-taskdefs"> |
universe@0 | 797 | <fail unless="libs.CopyLibs.classpath"> |
universe@0 | 798 | The libs.CopyLibs.classpath property is not set up. |
universe@0 | 799 | This property must point to |
universe@0 | 800 | org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part |
universe@0 | 801 | of NetBeans IDE installation and is usually located at |
universe@0 | 802 | <netbeans_installation>/java<version>/ant/extra folder. |
universe@0 | 803 | Either open the project in the IDE and make sure CopyLibs library |
universe@0 | 804 | exists or setup the property manually. For example like this: |
universe@0 | 805 | ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar |
universe@0 | 806 | </fail> |
universe@0 | 807 | <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/> |
universe@0 | 808 | </target> |
universe@0 | 809 | <target name="-init-ap-cmdline-properties"> |
universe@0 | 810 | <property name="annotation.processing.enabled" value="true"/> |
universe@0 | 811 | <property name="annotation.processing.processors.list" value=""/> |
universe@0 | 812 | <property name="annotation.processing.run.all.processors" value="true"/> |
universe@0 | 813 | <property name="javac.processorpath" value="${javac.classpath}"/> |
universe@0 | 814 | <property name="javac.test.processorpath" value="${javac.test.classpath}"/> |
universe@0 | 815 | <condition property="ap.supported.internal" value="true"> |
universe@0 | 816 | <not> |
universe@0 | 817 | <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> |
universe@0 | 818 | </not> |
universe@0 | 819 | </condition> |
universe@0 | 820 | </target> |
universe@0 | 821 | <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> |
universe@0 | 822 | <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> |
universe@0 | 823 | <isfalse value="${annotation.processing.run.all.processors}"/> |
universe@0 | 824 | </condition> |
universe@0 | 825 | <condition else="" property="ap.proc.none.internal" value="-proc:none"> |
universe@0 | 826 | <isfalse value="${annotation.processing.enabled}"/> |
universe@0 | 827 | </condition> |
universe@0 | 828 | </target> |
universe@0 | 829 | <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> |
universe@0 | 830 | <property name="ap.cmd.line.internal" value=""/> |
universe@0 | 831 | </target> |
universe@0 | 832 | <!-- |
universe@0 | 833 | pre NB7.2 profiling section; consider it deprecated |
universe@0 | 834 | --> |
universe@0 | 835 | <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> |
universe@0 | 836 | <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> |
universe@0 | 837 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 838 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 839 | </target> |
universe@0 | 840 | <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> |
universe@0 | 841 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 842 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 843 | </target> |
universe@0 | 844 | <target depends="-profile-pre-init, init, -profile-post-init" if="profiler.info.jvmargs.agent" name="-profile-init-check"> |
universe@0 | 845 | <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> |
universe@0 | 846 | <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> |
universe@0 | 847 | </target> |
universe@0 | 848 | <!-- |
universe@0 | 849 | end of pre NB7.2 profiling section |
universe@0 | 850 | --> |
universe@0 | 851 | <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"/> |
universe@0 | 852 | <!-- |
universe@0 | 853 | COMPILATION SECTION |
universe@0 | 854 | --> |
universe@0 | 855 | <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/> |
universe@0 | 856 | <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/> |
universe@0 | 857 | <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/> |
universe@0 | 858 | <target depends="init,deps-jar" name="-pre-pre-compile"> |
universe@0 | 859 | <mkdir dir="${build.classes.dir}"/> |
universe@0 | 860 | </target> |
universe@0 | 861 | <target name="-pre-compile"> |
universe@0 | 862 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 863 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 864 | </target> |
universe@0 | 865 | <target name="-copy-webdir"> |
universe@0 | 866 | <copy todir="${build.web.dir}"> |
universe@0 | 867 | <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/> |
universe@0 | 868 | </copy> |
universe@0 | 869 | <copy todir="${build.web.dir}/WEB-INF"> |
universe@0 | 870 | <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/> |
universe@0 | 871 | </copy> |
universe@0 | 872 | </target> |
universe@0 | 873 | <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"> |
universe@0 | 874 | <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/> |
universe@0 | 875 | <copy todir="${build.classes.dir}"> |
universe@0 | 876 | <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> |
universe@0 | 877 | </copy> |
universe@0 | 878 | </target> |
universe@0 | 879 | <target if="has.custom.manifest" name="-copy-manifest"> |
universe@0 | 880 | <mkdir dir="${build.meta.inf.dir}"/> |
universe@0 | 881 | <copy todir="${build.meta.inf.dir}"> |
universe@0 | 882 | <fileset dir="${conf.dir}" includes="MANIFEST.MF"/> |
universe@0 | 883 | </copy> |
universe@0 | 884 | </target> |
universe@0 | 885 | <target if="has.persistence.xml" name="-copy-persistence-xml"> |
universe@0 | 886 | <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/> |
universe@0 | 887 | <copy todir="${build.web.dir}/WEB-INF/classes/META-INF"> |
universe@0 | 888 | <fileset dir="${persistence.xml.dir}" includes="persistence.xml orm.xml"/> |
universe@0 | 889 | </copy> |
universe@0 | 890 | </target> |
universe@0 | 891 | <target name="-post-compile"> |
universe@0 | 892 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 893 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 894 | </target> |
universe@0 | 895 | <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> |
universe@0 | 896 | <target name="-pre-compile-single"> |
universe@0 | 897 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 898 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 899 | </target> |
universe@0 | 900 | <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> |
universe@0 | 901 | <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> |
universe@0 | 902 | <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/> |
universe@0 | 903 | <copy todir="${build.classes.dir}"> |
universe@0 | 904 | <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> |
universe@0 | 905 | </copy> |
universe@0 | 906 | </target> |
universe@0 | 907 | <target name="-post-compile-single"> |
universe@0 | 908 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 909 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 910 | </target> |
universe@0 | 911 | <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> |
universe@0 | 912 | <property name="jspc.schemas" value="/resources/schemas/"/> |
universe@0 | 913 | <property name="jspc.dtds" value="/resources/dtds/"/> |
universe@0 | 914 | <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps"> |
universe@0 | 915 | <mkdir dir="${build.generated.dir}/src"/> |
universe@0 | 916 | <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true"> |
universe@0 | 917 | <arg value="-uriroot"/> |
universe@0 | 918 | <arg file="${basedir}/${build.web.dir}"/> |
universe@0 | 919 | <arg value="-d"/> |
universe@0 | 920 | <arg file="${basedir}/${build.generated.dir}/src"/> |
universe@0 | 921 | <arg value="-die1"/> |
universe@0 | 922 | <arg value="-schemas ${jspc.schemas}"/> |
universe@0 | 923 | <arg value="-dtds ${jspc.dtds}"/> |
universe@0 | 924 | <arg value="-compilerSourceVM ${javac.source}"/> |
universe@0 | 925 | <arg value="-compilerTargetVM ${javac.target}"/> |
universe@0 | 926 | <arg value="-javaEncoding ${source.encoding}"/> |
universe@0 | 927 | <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/> |
universe@0 | 928 | <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/> |
universe@0 | 929 | </java> |
universe@0 | 930 | <mkdir dir="${build.generated.dir}/classes"/> |
universe@0 | 931 | <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"/> |
universe@0 | 932 | </target> |
universe@0 | 933 | <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp"> |
universe@0 | 934 | <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail> |
universe@0 | 935 | <mkdir dir="${build.generated.dir}/src"/> |
universe@0 | 936 | <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true"> |
universe@0 | 937 | <arg value="-uriroot"/> |
universe@0 | 938 | <arg file="${basedir}/${build.web.dir}"/> |
universe@0 | 939 | <arg value="-d"/> |
universe@0 | 940 | <arg file="${basedir}/${build.generated.dir}/src"/> |
universe@0 | 941 | <arg value="-die1"/> |
universe@0 | 942 | <arg value="-schemas ${jspc.schemas}"/> |
universe@0 | 943 | <arg value="-dtds ${jspc.dtds}"/> |
universe@0 | 944 | <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/> |
universe@0 | 945 | <arg value="-jspc.files"/> |
universe@0 | 946 | <arg path="${jsp.includes}"/> |
universe@0 | 947 | <arg value="-compilerSourceVM ${javac.source}"/> |
universe@0 | 948 | <arg value="-compilerTargetVM ${javac.target}"/> |
universe@0 | 949 | <arg value="-javaEncoding ${source.encoding}"/> |
universe@0 | 950 | <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/> |
universe@0 | 951 | </java> |
universe@0 | 952 | <mkdir dir="${build.generated.dir}/classes"/> |
universe@0 | 953 | <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"> |
universe@0 | 954 | <customize> |
universe@0 | 955 | <patternset includes="${javac.jsp.includes}"/> |
universe@0 | 956 | </customize> |
universe@0 | 957 | </webproject2:javac> |
universe@0 | 958 | </target> |
universe@0 | 959 | <target name="compile-single-jsp"> |
universe@0 | 960 | <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail> |
universe@0 | 961 | <antcall target="-do-compile-single-jsp"/> |
universe@0 | 962 | </target> |
universe@0 | 963 | <!-- |
universe@0 | 964 | DIST BUILDING SECTION |
universe@0 | 965 | --> |
universe@0 | 966 | <target name="-pre-dist"> |
universe@0 | 967 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 968 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 969 | </target> |
universe@0 | 970 | <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest"> |
universe@0 | 971 | <dirname file="${dist.war}" property="dist.jar.dir"/> |
universe@0 | 972 | <mkdir dir="${dist.jar.dir}"/> |
universe@0 | 973 | <jar compress="${jar.compress}" jarfile="${dist.war}"> |
universe@0 | 974 | <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/> |
universe@0 | 975 | </jar> |
universe@0 | 976 | </target> |
universe@0 | 977 | <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest"> |
universe@0 | 978 | <dirname file="${dist.war}" property="dist.jar.dir"/> |
universe@0 | 979 | <mkdir dir="${dist.jar.dir}"/> |
universe@0 | 980 | <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF"> |
universe@0 | 981 | <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/> |
universe@0 | 982 | </jar> |
universe@0 | 983 | </target> |
universe@0 | 984 | <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest"> |
universe@0 | 985 | <dirname file="${dist.war}" property="dist.jar.dir"/> |
universe@0 | 986 | <mkdir dir="${dist.jar.dir}"/> |
universe@0 | 987 | <jar compress="${jar.compress}" jarfile="${dist.war}"> |
universe@0 | 988 | <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/> |
universe@0 | 989 | </jar> |
universe@0 | 990 | </target> |
universe@0 | 991 | <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest"> |
universe@0 | 992 | <dirname file="${dist.war}" property="dist.jar.dir"/> |
universe@0 | 993 | <mkdir dir="${dist.jar.dir}"/> |
universe@0 | 994 | <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF"> |
universe@0 | 995 | <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/> |
universe@0 | 996 | </jar> |
universe@0 | 997 | </target> |
universe@0 | 998 | <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/> |
universe@0 | 999 | <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest"> |
universe@4 | 1000 | <copyfiles files="${libs.jstl.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> |
universe@14 | 1001 | <copyfiles files="${libs.SLF4J-LOG4J2.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> |
universe@14 | 1002 | <copyfiles files="${libs.LOG4J2-WEB.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> |
universe@0 | 1003 | <mkdir dir="${build.web.dir}/META-INF"/> |
universe@0 | 1004 | <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/> |
universe@0 | 1005 | </target> |
universe@4 | 1006 | <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir"> |
universe@4 | 1007 | <copyfiles files="${libs.jstl.classpath}" todir="${build.web.dir}/WEB-INF/lib"/> |
universe@14 | 1008 | <copyfiles files="${libs.SLF4J-LOG4J2.classpath}" todir="${build.web.dir}/WEB-INF/lib"/> |
universe@14 | 1009 | <copyfiles files="${libs.LOG4J2-WEB.classpath}" todir="${build.web.dir}/WEB-INF/lib"/> |
universe@4 | 1010 | </target> |
universe@0 | 1011 | <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib"> |
universe@0 | 1012 | <delete dir="${build.web.dir}/WEB-INF/lib"/> |
universe@0 | 1013 | </target> |
universe@0 | 1014 | <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist"> |
universe@0 | 1015 | <dirname file="${dist.ear.war}" property="dist.jar.dir"/> |
universe@0 | 1016 | <mkdir dir="${dist.jar.dir}"/> |
universe@0 | 1017 | <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF"> |
universe@0 | 1018 | <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/> |
universe@0 | 1019 | </jar> |
universe@0 | 1020 | </target> |
universe@0 | 1021 | <target name="-post-dist"> |
universe@0 | 1022 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 1023 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 1024 | </target> |
universe@0 | 1025 | <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/> |
universe@0 | 1026 | <target depends="init,-clean-webinf-lib,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/> |
universe@0 | 1027 | <!-- |
universe@0 | 1028 | EXECUTION SECTION |
universe@0 | 1029 | --> |
universe@0 | 1030 | <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/> |
universe@0 | 1031 | <target name="-pre-run-deploy"> |
universe@0 | 1032 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 1033 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 1034 | </target> |
universe@0 | 1035 | <target name="-post-run-deploy"> |
universe@0 | 1036 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 1037 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 1038 | </target> |
universe@0 | 1039 | <target name="-pre-nbmodule-run-deploy"> |
universe@0 | 1040 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 1041 | <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. --> |
universe@0 | 1042 | </target> |
universe@0 | 1043 | <target name="-post-nbmodule-run-deploy"> |
universe@0 | 1044 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 1045 | <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. --> |
universe@0 | 1046 | </target> |
universe@0 | 1047 | <target name="-run-deploy-am"> |
universe@0 | 1048 | <!-- Task to deploy to the Access Manager runtime. --> |
universe@0 | 1049 | </target> |
universe@0 | 1050 | <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy,-do-update-breakpoints" name="run-deploy"/> |
universe@0 | 1051 | <target if="netbeans.home" name="-run-deploy-nb"> |
universe@0 | 1052 | <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/> |
universe@0 | 1053 | </target> |
universe@0 | 1054 | <target name="-init-deploy-ant" unless="netbeans.home"> |
universe@0 | 1055 | <property name="deploy.ant.archive" value="${dist.war}"/> |
universe@0 | 1056 | <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/> |
universe@0 | 1057 | <property name="deploy.ant.resource.dir" value="${resource.dir}"/> |
universe@0 | 1058 | <property name="deploy.ant.enabled" value="true"/> |
universe@0 | 1059 | </target> |
universe@0 | 1060 | <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/> |
universe@0 | 1061 | <target if="netbeans.home" name="-run-undeploy-nb"> |
universe@0 | 1062 | <fail message="Undeploy is not supported from within the IDE"/> |
universe@0 | 1063 | </target> |
universe@0 | 1064 | <target depends="init,-pre-dist,dist,-post-dist" name="verify"> |
universe@0 | 1065 | <nbverify file="${dist.war}"/> |
universe@0 | 1066 | </target> |
universe@0 | 1067 | <target depends="run-deploy,-init-display-browser,-display-browser-nb-old,-display-browser-nb,-display-browser-cl" name="run-display-browser"/> |
universe@0 | 1068 | <target if="do.display.browser" name="-init-display-browser"> |
universe@0 | 1069 | <condition property="do.display.browser.nb.old"> |
universe@0 | 1070 | <and> |
universe@0 | 1071 | <isset property="netbeans.home"/> |
universe@0 | 1072 | <not> |
universe@0 | 1073 | <isset property="browser.context"/> |
universe@0 | 1074 | </not> |
universe@0 | 1075 | </and> |
universe@0 | 1076 | </condition> |
universe@0 | 1077 | <condition property="do.display.browser.nb"> |
universe@0 | 1078 | <and> |
universe@0 | 1079 | <isset property="netbeans.home"/> |
universe@0 | 1080 | <isset property="browser.context"/> |
universe@0 | 1081 | </and> |
universe@0 | 1082 | </condition> |
universe@0 | 1083 | <condition property="do.display.browser.cl"> |
universe@0 | 1084 | <isset property="deploy.ant.enabled"/> |
universe@0 | 1085 | </condition> |
universe@0 | 1086 | </target> |
universe@0 | 1087 | <target if="do.display.browser.nb.old" name="-display-browser-nb-old"> |
universe@0 | 1088 | <nbbrowse url="${client.url}"/> |
universe@0 | 1089 | </target> |
universe@0 | 1090 | <target if="do.display.browser.nb" name="-display-browser-nb"> |
universe@0 | 1091 | <nbbrowse context="${browser.context}" url="${client.url}" urlPath="${client.urlPart}"/> |
universe@0 | 1092 | </target> |
universe@0 | 1093 | <target if="do.display.browser.cl" name="-get-browser" unless="browser"> |
universe@0 | 1094 | <condition property="browser" value="rundll32"> |
universe@0 | 1095 | <os family="windows"/> |
universe@0 | 1096 | </condition> |
universe@0 | 1097 | <condition else="" property="browser.args" value="url.dll,FileProtocolHandler"> |
universe@0 | 1098 | <os family="windows"/> |
universe@0 | 1099 | </condition> |
universe@0 | 1100 | <condition property="browser" value="/usr/bin/open"> |
universe@0 | 1101 | <os family="mac"/> |
universe@0 | 1102 | </condition> |
universe@0 | 1103 | <property environment="env"/> |
universe@0 | 1104 | <condition property="browser" value="${env.BROWSER}"> |
universe@0 | 1105 | <isset property="env.BROWSER"/> |
universe@0 | 1106 | </condition> |
universe@0 | 1107 | <condition property="browser" value="/usr/bin/firefox"> |
universe@0 | 1108 | <available file="/usr/bin/firefox"/> |
universe@0 | 1109 | </condition> |
universe@0 | 1110 | <condition property="browser" value="/usr/local/firefox/firefox"> |
universe@0 | 1111 | <available file="/usr/local/firefox/firefox"/> |
universe@0 | 1112 | </condition> |
universe@0 | 1113 | <condition property="browser" value="/usr/bin/mozilla"> |
universe@0 | 1114 | <available file="/usr/bin/mozilla"/> |
universe@0 | 1115 | </condition> |
universe@0 | 1116 | <condition property="browser" value="/usr/local/mozilla/mozilla"> |
universe@0 | 1117 | <available file="/usr/local/mozilla/mozilla"/> |
universe@0 | 1118 | </condition> |
universe@0 | 1119 | <condition property="browser" value="/usr/sfw/lib/firefox/firefox"> |
universe@0 | 1120 | <available file="/usr/sfw/lib/firefox/firefox"/> |
universe@0 | 1121 | </condition> |
universe@0 | 1122 | <condition property="browser" value="/opt/csw/bin/firefox"> |
universe@0 | 1123 | <available file="/opt/csw/bin/firefox"/> |
universe@0 | 1124 | </condition> |
universe@0 | 1125 | <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla"> |
universe@0 | 1126 | <available file="/usr/sfw/lib/mozilla/mozilla"/> |
universe@0 | 1127 | </condition> |
universe@0 | 1128 | <condition property="browser" value="/opt/csw/bin/mozilla"> |
universe@0 | 1129 | <available file="/opt/csw/bin/mozilla"/> |
universe@0 | 1130 | </condition> |
universe@0 | 1131 | </target> |
universe@0 | 1132 | <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl"> |
universe@0 | 1133 | <fail unless="browser"> |
universe@0 | 1134 | Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. |
universe@0 | 1135 | </fail> |
universe@0 | 1136 | <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/> |
universe@0 | 1137 | <echo>Launching ${browse.url}</echo> |
universe@0 | 1138 | <exec executable="${browser}" spawn="true"> |
universe@0 | 1139 | <arg line="${browser.args} ${browse.url}"/> |
universe@0 | 1140 | </exec> |
universe@0 | 1141 | </target> |
universe@0 | 1142 | <target depends="init,-init-cos,compile-single" name="run-main"> |
universe@0 | 1143 | <fail unless="run.class">Must select one file in the IDE or set run.class</fail> |
universe@0 | 1144 | <webproject1:java classname="${run.class}"/> |
universe@0 | 1145 | </target> |
universe@0 | 1146 | <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main"> |
universe@0 | 1147 | <fail unless="run.class">Must select one file in the IDE or set run.class</fail> |
universe@0 | 1148 | <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> |
universe@0 | 1149 | </target> |
universe@0 | 1150 | <target depends="init" if="netbeans.home" name="-do-update-breakpoints"> |
universe@0 | 1151 | <webproject1:nbjpdaappreloaded/> |
universe@0 | 1152 | </target> |
universe@0 | 1153 | <!-- |
universe@0 | 1154 | DEBUGGING SECTION |
universe@0 | 1155 | --> |
universe@0 | 1156 | <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug"> |
universe@0 | 1157 | <nbstartserver debugmode="true"/> |
universe@0 | 1158 | <antcall target="connect-debugger"/> |
universe@0 | 1159 | <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/> |
universe@0 | 1160 | <antcall target="debug-display-browser-old"/> |
universe@0 | 1161 | <antcall target="debug-display-browser"/> |
universe@0 | 1162 | <antcall target="connect-client-debugger"/> |
universe@0 | 1163 | </target> |
universe@0 | 1164 | <target if="do.debug.server" name="connect-debugger" unless="is.debugged"> |
universe@0 | 1165 | <condition property="listeningcp" value="sourcepath"> |
universe@0 | 1166 | <istrue value="${j2ee.compile.on.save}"/> |
universe@0 | 1167 | </condition> |
universe@0 | 1168 | <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" listeningcp="${listeningcp}" name="${name}" transport="${jpda.transport}"> |
universe@0 | 1169 | <classpath> |
universe@0 | 1170 | <path path="${debug.classpath}:${j2ee.platform.classpath}"/> |
universe@0 | 1171 | </classpath> |
universe@0 | 1172 | <sourcepath> |
universe@0 | 1173 | <path path="${web.docbase.dir}"/> |
universe@0 | 1174 | </sourcepath> |
universe@0 | 1175 | </nbjpdaconnect> |
universe@0 | 1176 | </target> |
universe@0 | 1177 | <target if="do.display.browser.debug.old" name="debug-display-browser-old"> |
universe@0 | 1178 | <nbbrowse url="${client.url}"/> |
universe@0 | 1179 | </target> |
universe@0 | 1180 | <target if="do.display.browser.debug" name="debug-display-browser"> |
universe@0 | 1181 | <nbbrowse context="${browser.context}" url="${client.url}" urlPath="${client.urlPart}"/> |
universe@0 | 1182 | </target> |
universe@0 | 1183 | <target if="do.debug.client" name="connect-client-debugger"> |
universe@0 | 1184 | <webproject1:nbjsdebugstart webUrl="${client.url}"/> |
universe@0 | 1185 | </target> |
universe@0 | 1186 | <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> |
universe@0 | 1187 | <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> |
universe@0 | 1188 | <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> |
universe@0 | 1189 | </target> |
universe@0 | 1190 | <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> |
universe@0 | 1191 | <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/> |
universe@0 | 1192 | <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> |
universe@0 | 1193 | <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> |
universe@0 | 1194 | </target> |
universe@0 | 1195 | <target depends="init" if="netbeans.home" name="-debug-start-debugger"> |
universe@0 | 1196 | <webproject1:nbjpdastart name="${debug.class}"/> |
universe@0 | 1197 | </target> |
universe@0 | 1198 | <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> |
universe@0 | 1199 | <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> |
universe@0 | 1200 | <webproject1:debug classname="${debug.class}"/> |
universe@0 | 1201 | </target> |
universe@0 | 1202 | <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/> |
universe@0 | 1203 | <target depends="init" name="-pre-debug-fix"> |
universe@0 | 1204 | <fail unless="fix.includes">Must set fix.includes</fail> |
universe@0 | 1205 | <property name="javac.includes" value="${fix.includes}.java"/> |
universe@0 | 1206 | </target> |
universe@0 | 1207 | <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> |
universe@0 | 1208 | <webproject1:nbjpdareload/> |
universe@0 | 1209 | </target> |
universe@0 | 1210 | <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> |
universe@0 | 1211 | <!-- |
universe@0 | 1212 | ================= |
universe@0 | 1213 | PROFILING SECTION |
universe@0 | 1214 | ================= |
universe@0 | 1215 | --> |
universe@0 | 1216 | <!-- |
universe@0 | 1217 | pre NB7.2 profiling section; consider it deprecated |
universe@0 | 1218 | --> |
universe@0 | 1219 | <target description="Profile a J2EE project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> |
universe@0 | 1220 | <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs"> |
universe@0 | 1221 | <isset property="profiler.info.jvmargs.extra"/> |
universe@0 | 1222 | </condition> |
universe@0 | 1223 | <antcall target="${profiler.startserver.target}"/> |
universe@0 | 1224 | <antcall target="run"/> |
universe@0 | 1225 | <antcall target="-profile-start-loadgen"/> |
universe@0 | 1226 | </target> |
universe@0 | 1227 | <target if="profiler.info.jvmargs.agent" name="start-profiled-server"> |
universe@0 | 1228 | <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}"> |
universe@0 | 1229 | <jvmarg value="${profiler.info.jvmargs.agent}"/> |
universe@0 | 1230 | <jvmarg value="${profiler.j2ee.agentID}"/> |
universe@0 | 1231 | </nbstartprofiledserver> |
universe@0 | 1232 | </target> |
universe@0 | 1233 | <target if="profiler.info.jvmargs.agent" name="start-profiled-server-extraargs"> |
universe@0 | 1234 | <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}"> |
universe@0 | 1235 | <jvmarg value="${profiler.info.jvmargs.extra}"/> |
universe@0 | 1236 | <jvmarg value="${profiler.info.jvmargs.agent}"/> |
universe@0 | 1237 | <jvmarg value="${profiler.j2ee.agentID}"/> |
universe@0 | 1238 | </nbstartprofiledserver> |
universe@0 | 1239 | </target> |
universe@0 | 1240 | <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> |
universe@0 | 1241 | <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> |
universe@0 | 1242 | <nbprofiledirect> |
universe@0 | 1243 | <classpath> |
universe@0 | 1244 | <path path="${run.test.classpath}"/> |
universe@0 | 1245 | <path path="${j2ee.platform.classpath}"/> |
universe@0 | 1246 | </classpath> |
universe@0 | 1247 | </nbprofiledirect> |
universe@0 | 1248 | <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> |
universe@0 | 1249 | <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> |
universe@0 | 1250 | <jvmarg value="${profiler.info.jvmargs.agent}"/> |
universe@0 | 1251 | <jvmarg line="${profiler.info.jvmargs}"/> |
universe@0 | 1252 | <test name="${profile.class}"/> |
universe@0 | 1253 | <classpath> |
universe@0 | 1254 | <path path="${run.test.classpath}"/> |
universe@0 | 1255 | <path path="${j2ee.platform.classpath}"/> |
universe@0 | 1256 | </classpath> |
universe@0 | 1257 | <syspropertyset> |
universe@0 | 1258 | <propertyref prefix="test-sys-prop."/> |
universe@0 | 1259 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
universe@0 | 1260 | </syspropertyset> |
universe@0 | 1261 | <formatter type="brief" usefile="false"/> |
universe@0 | 1262 | <formatter type="xml"/> |
universe@0 | 1263 | </junit> |
universe@0 | 1264 | </target> |
universe@0 | 1265 | <target if="netbeans.home" name="-profile-check"> |
universe@0 | 1266 | <condition property="profiler.configured"> |
universe@0 | 1267 | <or> |
universe@0 | 1268 | <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> |
universe@0 | 1269 | <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> |
universe@0 | 1270 | </or> |
universe@0 | 1271 | </condition> |
universe@0 | 1272 | </target> |
universe@0 | 1273 | <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" name="-do-profile"> |
universe@0 | 1274 | <startprofiler/> |
universe@0 | 1275 | <nbstartserver profilemode="true"/> |
universe@0 | 1276 | <nbdeploy clientUrlPart="${client.urlPart}" forceRedeploy="true" profilemode="true"/> |
universe@0 | 1277 | <antcall target="debug-display-browser-old"/> |
universe@0 | 1278 | <antcall target="debug-display-browser"/> |
universe@0 | 1279 | <antcall target="-profile-start-loadgen"/> |
universe@0 | 1280 | </target> |
universe@0 | 1281 | <target depends="-profile-check,-profile-pre72" description="Profile a J2EE project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> |
universe@0 | 1282 | <antcall target="-do-profile"/> |
universe@0 | 1283 | </target> |
universe@0 | 1284 | <target depends="-profile-test-single-pre72" name="profile-test-single"/> |
universe@0 | 1285 | <target depends="-profile-check" if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs.agent"> |
universe@0 | 1286 | <startprofiler/> |
universe@0 | 1287 | <antcall target="test-single"/> |
universe@0 | 1288 | </target> |
universe@0 | 1289 | <target if="profiler.loadgen.path" name="-profile-start-loadgen"> |
universe@0 | 1290 | <loadgenstart path="${profiler.loadgen.path}"/> |
universe@0 | 1291 | </target> |
universe@0 | 1292 | <!-- |
universe@0 | 1293 | JAVADOC SECTION |
universe@0 | 1294 | --> |
universe@0 | 1295 | <target depends="init" if="have.sources" name="javadoc-build"> |
universe@0 | 1296 | <mkdir dir="${dist.javadoc.dir}"/> |
universe@0 | 1297 | <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}"> |
universe@0 | 1298 | <classpath> |
universe@0 | 1299 | <path path="${javac.classpath}:${j2ee.platform.classpath}"/> |
universe@0 | 1300 | </classpath> |
universe@0 | 1301 | <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> |
universe@0 | 1302 | <filename name="**/*.java"/> |
universe@0 | 1303 | </fileset> |
universe@0 | 1304 | <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> |
universe@0 | 1305 | <include name="**/*.java"/> |
universe@0 | 1306 | </fileset> |
universe@0 | 1307 | </javadoc> |
universe@0 | 1308 | <copy todir="${dist.javadoc.dir}"> |
universe@0 | 1309 | <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> |
universe@0 | 1310 | <filename name="**/doc-files/**"/> |
universe@0 | 1311 | </fileset> |
universe@0 | 1312 | <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> |
universe@0 | 1313 | <include name="**/doc-files/**"/> |
universe@0 | 1314 | </fileset> |
universe@0 | 1315 | </copy> |
universe@0 | 1316 | </target> |
universe@0 | 1317 | <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview"> |
universe@0 | 1318 | <nbbrowse file="${dist.javadoc.dir}/index.html"/> |
universe@0 | 1319 | </target> |
universe@0 | 1320 | <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/> |
universe@0 | 1321 | <!-- |
universe@0 | 1322 | |
universe@0 | 1323 | TEST COMPILATION SECTION |
universe@0 | 1324 | --> |
universe@0 | 1325 | <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> |
universe@0 | 1326 | <mkdir dir="${build.test.classes.dir}"/> |
universe@0 | 1327 | <property name="j2ee.platform.embeddableejb.classpath" value=""/> |
universe@0 | 1328 | </target> |
universe@0 | 1329 | <target name="-pre-compile-test"> |
universe@0 | 1330 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 1331 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 1332 | </target> |
universe@0 | 1333 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test"> |
universe@0 | 1334 | <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> |
universe@0 | 1335 | <copy todir="${build.test.classes.dir}"> |
universe@0 | 1336 | <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> |
universe@0 | 1337 | </copy> |
universe@0 | 1338 | </target> |
universe@0 | 1339 | <target name="-post-compile-test"> |
universe@0 | 1340 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 1341 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 1342 | </target> |
universe@0 | 1343 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> |
universe@0 | 1344 | <target name="-pre-compile-test-single"> |
universe@0 | 1345 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 1346 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 1347 | </target> |
universe@0 | 1348 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> |
universe@0 | 1349 | <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> |
universe@0 | 1350 | <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/> |
universe@0 | 1351 | <copy todir="${build.test.classes.dir}"> |
universe@0 | 1352 | <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> |
universe@0 | 1353 | </copy> |
universe@0 | 1354 | </target> |
universe@0 | 1355 | <target name="-post-compile-test-single"> |
universe@0 | 1356 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 1357 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 1358 | </target> |
universe@0 | 1359 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> |
universe@0 | 1360 | <!-- |
universe@0 | 1361 | |
universe@0 | 1362 | TEST EXECUTION SECTION |
universe@0 | 1363 | --> |
universe@0 | 1364 | <target depends="init" if="have.tests" name="-pre-test-run"> |
universe@0 | 1365 | <mkdir dir="${build.test.results.dir}"/> |
universe@0 | 1366 | </target> |
universe@0 | 1367 | <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> |
universe@0 | 1368 | <webproject2:test includes="${includes}" testincludes="**/*Test.java"/> |
universe@0 | 1369 | </target> |
universe@0 | 1370 | <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> |
universe@0 | 1371 | <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> |
universe@0 | 1372 | </target> |
universe@0 | 1373 | <target depends="init" if="have.tests" name="test-report"/> |
universe@0 | 1374 | <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> |
universe@0 | 1375 | <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> |
universe@0 | 1376 | <target depends="init" if="have.tests" name="-pre-test-run-single"> |
universe@0 | 1377 | <mkdir dir="${build.test.results.dir}"/> |
universe@0 | 1378 | </target> |
universe@0 | 1379 | <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> |
universe@0 | 1380 | <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> |
universe@0 | 1381 | <webproject2:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> |
universe@0 | 1382 | </target> |
universe@0 | 1383 | <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> |
universe@0 | 1384 | <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> |
universe@0 | 1385 | </target> |
universe@0 | 1386 | <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"/> |
universe@0 | 1387 | <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> |
universe@0 | 1388 | <fail unless="test.class">Must select some files in the IDE or set test.class</fail> |
universe@0 | 1389 | <fail unless="test.method">Must select some method in the IDE or set test.method</fail> |
universe@0 | 1390 | <webproject2:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> |
universe@0 | 1391 | </target> |
universe@0 | 1392 | <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> |
universe@0 | 1393 | <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> |
universe@0 | 1394 | </target> |
universe@0 | 1395 | <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> |
universe@0 | 1396 | <!-- |
universe@0 | 1397 | |
universe@0 | 1398 | TEST DEBUGGING SECTION |
universe@0 | 1399 | --> |
universe@0 | 1400 | <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> |
universe@0 | 1401 | <fail unless="test.class">Must select one file in the IDE or set test.class</fail> |
universe@0 | 1402 | <webproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> |
universe@0 | 1403 | </target> |
universe@0 | 1404 | <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> |
universe@0 | 1405 | <fail unless="test.class">Must select one file in the IDE or set test.class</fail> |
universe@0 | 1406 | <fail unless="test.method">Must select some method in the IDE or set test.method</fail> |
universe@0 | 1407 | <webproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> |
universe@0 | 1408 | </target> |
universe@0 | 1409 | <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> |
universe@0 | 1410 | <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> |
universe@0 | 1411 | </target> |
universe@0 | 1412 | <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> |
universe@0 | 1413 | <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> |
universe@0 | 1414 | <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> |
universe@0 | 1415 | <webproject1:nbjpdareload dir="${build.test.classes.dir}"/> |
universe@0 | 1416 | </target> |
universe@0 | 1417 | <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> |
universe@0 | 1418 | <!-- |
universe@0 | 1419 | |
universe@0 | 1420 | CLEANUP SECTION |
universe@0 | 1421 | --> |
universe@0 | 1422 | <target depends="init" name="deps-clean" unless="no.deps"/> |
universe@0 | 1423 | <target depends="init" name="do-clean"> |
universe@0 | 1424 | <condition property="build.dir.to.clean" value="${build.web.dir}"> |
universe@0 | 1425 | <isset property="dist.ear.dir"/> |
universe@0 | 1426 | </condition> |
universe@0 | 1427 | <property name="build.dir.to.clean" value="${build.web.dir}"/> |
universe@0 | 1428 | <delete includeEmptyDirs="true" quiet="true"> |
universe@0 | 1429 | <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/> |
universe@0 | 1430 | </delete> |
universe@0 | 1431 | <delete dir="${build.dir}"/> |
universe@0 | 1432 | <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/> |
universe@0 | 1433 | <delete dir="${dist.dir}"/> |
universe@0 | 1434 | </target> |
universe@0 | 1435 | <target depends="do-clean" if="status.clean-failed" name="check-clean"> |
universe@0 | 1436 | <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/> |
universe@0 | 1437 | <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/> |
universe@0 | 1438 | </target> |
universe@0 | 1439 | <target depends="init" if="netbeans.home" name="undeploy-clean"> |
universe@0 | 1440 | <nbundeploy failOnError="false" startServer="false"/> |
universe@0 | 1441 | </target> |
universe@0 | 1442 | <target name="-post-clean"> |
universe@0 | 1443 | <!-- Empty placeholder for easier customization. --> |
universe@0 | 1444 | <!-- You can override this target in the ../build.xml file. --> |
universe@0 | 1445 | </target> |
universe@0 | 1446 | <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/> |
universe@0 | 1447 | <target depends="clean" description="Clean build products." name="clean-ear"/> |
universe@0 | 1448 | </project> |