Changeset 79:aa8c8f51b0cc for java/sql-vyuka/nbproject/build-impl.xml
- Timestamp:
- 02/08/12 13:16:13 (12 years ago)
- Branch:
- default
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
java/sql-vyuka/nbproject/build-impl.xml
r74 r79 174 174 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> 175 175 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> 176 <length length="0" string="${endorsed.classpath}" when="greater"/> 177 </condition> 176 <and> 177 <isset property="endorsed.classpath"/> 178 <length length="0" string="${endorsed.classpath}" when="greater"/> 179 </and> 180 </condition> 181 <condition else="false" property="jdkBug6558476"> 182 <and> 183 <matches pattern="1\.[56]" string="${java.specification.version}"/> 184 <not> 185 <os family="unix"/> 186 </not> 187 </and> 188 </condition> 189 <property name="javac.fork" value="${jdkBug6558476}"/> 178 190 </target> 179 191 <target depends="init" name="-init-cos" unless="deploy.on.save"> 180 192 <condition property="deploy.on.save" value="true"> 181 <istrue value="${j2ee.deploy.on.save}"/> 193 <or> 194 <istrue value="${j2ee.deploy.on.save}"/> 195 <istrue value="${j2ee.compile.on.save}"/> 196 </or> 182 197 </condition> 183 198 </target> … … 199 214 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> 200 215 <fail unless="dist.war">Must set dist.war</fail> 216 <condition property="missing.j2ee.server.home"> 217 <and> 218 <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/> 219 <not> 220 <isset property="j2ee.server.home"/> 221 </not> 222 </and> 223 </condition> 224 <fail if="missing.j2ee.server.home"> 225 The Java EE server classpath is not correctly set up - server home directory is missing. 226 Either open the project in the IDE and assign the server or setup the server classpath manually. 227 For example like this: 228 ant -Dj2ee.server.home=<app_server_installation_directory> 229 </fail> 201 230 <fail unless="j2ee.platform.classpath"> 202 231 The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. … … 216 245 </macrodef> 217 246 </target> 218 <target name="-init-macrodef-javac">247 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> 219 248 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2"> 220 249 <attribute default="${src.dir}" name="srcdir"/> 221 250 <attribute default="${build.classes.dir}" name="destdir"/> 222 251 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> 252 <attribute default="${javac.processorpath}" name="processorpath"/> 253 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> 254 <attribute default="${includes}" name="includes"/> 255 <attribute default="${excludes}" name="excludes"/> 256 <attribute default="${javac.debug}" name="debug"/> 257 <attribute default="${empty.dir}" name="gensrcdir"/> 258 <element name="customize" optional="true"/> 259 <sequential> 260 <property location="${build.dir}/empty" name="empty.dir"/> 261 <mkdir dir="${empty.dir}"/> 262 <mkdir dir="@{apgeneratedsrcdir}"/> 263 <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}"> 264 <src> 265 <dirset dir="@{gensrcdir}" erroronmissingdir="false"> 266 <include name="*"/> 267 </dirset> 268 </src> 269 <classpath> 270 <path path="@{classpath}"/> 271 </classpath> 272 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> 273 <compilerarg line="${javac.compilerargs}"/> 274 <compilerarg value="-processorpath"/> 275 <compilerarg path="@{processorpath}:${empty.dir}"/> 276 <compilerarg line="${ap.processors.internal}"/> 277 <compilerarg value="-s"/> 278 <compilerarg path="@{apgeneratedsrcdir}"/> 279 <compilerarg line="${ap.proc.none.internal}"/> 280 <customize/> 281 </javac> 282 </sequential> 283 </macrodef> 284 </target> 285 <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> 286 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2"> 287 <attribute default="${src.dir}" name="srcdir"/> 288 <attribute default="${build.classes.dir}" name="destdir"/> 289 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> 290 <attribute default="${javac.processorpath}" name="processorpath"/> 291 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> 223 292 <attribute default="${includes}" name="includes"/> 224 293 <attribute default="${excludes}" name="excludes"/> … … 242 311 <customize/> 243 312 </javac> 313 </sequential> 314 </macrodef> 315 </target> 316 <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> 317 <macrodef name="depend" uri="http://www.netbeans.org/ns/web-project/2"> 318 <attribute default="${src.dir}" name="srcdir"/> 319 <attribute default="${build.classes.dir}" name="destdir"/> 320 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> 321 <sequential> 322 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> 323 <classpath> 324 <path path="@{classpath}"/> 325 </classpath> 326 </depend> 327 </sequential> 328 </macrodef> 329 <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2"> 330 <attribute default="${build.classes.dir}" name="destdir"/> 331 <sequential> 332 <fail unless="javac.includes">Must set javac.includes</fail> 333 <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> 334 <path> 335 <filelist dir="@{destdir}" files="${javac.includes}"/> 336 </path> 337 <globmapper from="*.java" to="*.class"/> 338 </pathconvert> 339 <tempfile deleteonexit="true" property="javac.includesfile.binary"/> 340 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> 341 <delete> 342 <files includesfile="${javac.includesfile.binary}"/> 343 </delete> 344 <delete file="${javac.includesfile.binary}"/> 244 345 </sequential> 245 346 </macrodef> … … 267 368 <formatter type="xml"/> 268 369 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 370 <jvmarg value="-ea"/> 269 371 <jvmarg line="${runmain.jvmargs}"/> 270 372 </junit> … … 387 489 <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/> 388 490 </target> 389 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs" name="init"/> 491 <target name="-init-ap-cmdline-properties"> 492 <property name="annotation.processing.enabled" value="true"/> 493 <property name="annotation.processing.processors.list" value=""/> 494 <property name="annotation.processing.run.all.processors" value="true"/> 495 <property name="javac.processorpath" value="${javac.classpath}"/> 496 <property name="javac.test.processorpath" value="${javac.test.classpath}"/> 497 <condition property="ap.supported.internal" value="true"> 498 <not> 499 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> 500 </not> 501 </condition> 502 </target> 503 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> 504 <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> 505 <isfalse value="${annotation.processing.run.all.processors}"/> 506 </condition> 507 <condition else="" property="ap.proc.none.internal" value="-proc:none"> 508 <isfalse value="${annotation.processing.enabled}"/> 509 </condition> 510 </target> 511 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> 512 <property name="ap.cmd.line.internal" value=""/> 513 </target> 514 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/> 515 <target name="-profile-pre-init"> 516 <!-- Empty placeholder for easier customization. --> 517 <!-- You can override this target in the ../build.xml file. --> 518 </target> 519 <target name="-profile-post-init"> 520 <!-- Empty placeholder for easier customization. --> 521 <!-- You can override this target in the ../build.xml file. --> 522 </target> 523 <target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check"> 524 <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> 525 <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> 526 </target> 527 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/> 390 528 <!-- 391 529 COMPILATION SECTION … … 456 594 </target> 457 595 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> 596 <property name="jspc.schemas" value="/resources/schemas/"/> 597 <property name="jspc.dtds" value="/resources/dtds/"/> 458 598 <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps"> 459 599 <mkdir dir="${build.generated.dir}/src"/> … … 464 604 <arg file="${basedir}/${build.generated.dir}/src"/> 465 605 <arg value="-die1"/> 606 <arg value="-schemas ${jspc.schemas}"/> 607 <arg value="-dtds ${jspc.dtds}"/> 466 608 <arg value="-compilerSourceVM ${javac.source}"/> 467 609 <arg value="-compilerTargetVM ${javac.target}"/> 468 610 <arg value="-javaEncoding ${source.encoding}"/> 469 <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/> 611 <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/> 612 <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/> 470 613 </java> 471 614 <mkdir dir="${build.generated.dir}/classes"/> 472 <webproject2:javac classpath="${ j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>615 <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"/> 473 616 </target> 474 617 <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp"> … … 481 624 <arg file="${basedir}/${build.generated.dir}/src"/> 482 625 <arg value="-die1"/> 626 <arg value="-schemas ${jspc.schemas}"/> 627 <arg value="-dtds ${jspc.dtds}"/> 628 <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/> 483 629 <arg value="-jspc.files"/> 484 630 <arg path="${jsp.includes}"/> … … 486 632 <arg value="-compilerTargetVM ${javac.target}"/> 487 633 <arg value="-javaEncoding ${source.encoding}"/> 488 <classpath path="${java.home}/../lib/tools.jar:${ jspctask.classpath}:${jspcompilation.classpath}"/>634 <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/> 489 635 </java> 490 636 <mkdir dir="${build.generated.dir}/classes"/> 491 <webproject2:javac classpath="${ j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">637 <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"> 492 638 <customize> 493 639 <patternset includes="${javac.jsp.includes}"/> … … 510 656 <mkdir dir="${dist.jar.dir}"/> 511 657 <jar compress="${jar.compress}" jarfile="${dist.war}"> 512 <fileset dir="${build.web.dir}" />658 <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/> 513 659 </jar> 514 660 </target> … … 517 663 <mkdir dir="${dist.jar.dir}"/> 518 664 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF"> 519 <fileset dir="${build.web.dir}" />665 <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/> 520 666 </jar> 521 667 </target> … … 524 670 <mkdir dir="${dist.jar.dir}"/> 525 671 <jar compress="${jar.compress}" jarfile="${dist.war}"> 526 <fileset dir="${build.web.dir}" />672 <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/> 527 673 </jar> 528 674 </target> … … 531 677 <mkdir dir="${dist.jar.dir}"/> 532 678 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF"> 533 <fileset dir="${build.web.dir}" />679 <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/> 534 680 </jar> 535 681 </target> … … 550 696 <mkdir dir="${dist.jar.dir}"/> 551 697 <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF"> 552 <fileset dir="${build.web.dir}" />698 <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/> 553 699 </jar> 554 700 </target> … … 582 728 <!-- Task to deploy to the Access Manager runtime. --> 583 729 </target> 584 <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" name="run-deploy"> 585 <nbjpdaappreloaded/> 586 </target> 730 <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"/> 587 731 <target if="netbeans.home" name="-run-deploy-nb"> 588 732 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/> … … 670 814 <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> 671 815 </target> 816 <target depends="init" if="netbeans.home" name="-do-update-breakpoints"> 817 <webproject1:nbjpdaappreloaded/> 818 </target> 672 819 <!-- 673 820 DEBUGGING SECTION … … 722 869 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> 723 870 <!-- 871 ================= 872 PROFILING SECTION 873 ================= 874 --> 875 <target description="Profile a J2EE project in the IDE." name="profile"> 876 <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs"> 877 <isset property="profiler.info.jvmargs.extra"/> 878 </condition> 879 <antcall target="${profiler.startserver.target}"/> 880 <antcall target="run"/> 881 <antcall target="start-loadgen"/> 882 </target> 883 <target name="start-profiled-server"> 884 <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}"> 885 <jvmarg value="${profiler.info.jvmargs.agent}"/> 886 <jvmarg value="${profiler.j2ee.agentID}"/> 887 </nbstartprofiledserver> 888 </target> 889 <target name="start-profiled-server-extraargs"> 890 <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}"> 891 <jvmarg value="${profiler.info.jvmargs.extra}"/> 892 <jvmarg value="${profiler.info.jvmargs.agent}"/> 893 <jvmarg value="${profiler.j2ee.agentID}"/> 894 </nbstartprofiledserver> 895 </target> 896 <target if="profiler.loadgen.path" name="start-loadgen"> 897 <loadgenstart path="${profiler.loadgen.path}"/> 898 </target> 899 <!-- 724 900 JAVADOC SECTION 725 901 --> 726 <target depends="init" name="javadoc-build">902 <target depends="init" if="have.sources" name="javadoc-build"> 727 903 <mkdir dir="${dist.javadoc.dir}"/> 728 904 <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}"> … … 737 913 </fileset> 738 914 </javadoc> 915 <copy todir="${dist.javadoc.dir}"> 916 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> 917 <filename name="**/doc-files/**"/> 918 </fileset> 919 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> 920 <include name="**/doc-files/**"/> 921 </fileset> 922 </copy> 739 923 </target> 740 924 <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview"> … … 835 1019 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> 836 1020 <!-- 1021 ========================= 1022 TESTS PROFILING SECTION 1023 ========================= 1024 --> 1025 <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> 1026 <nbprofiledirect> 1027 <classpath> 1028 <path path="${run.test.classpath}"/> 1029 <path path="${j2ee.platform.classpath}"/> 1030 </classpath> 1031 </nbprofiledirect> 1032 <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> 1033 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> 1034 <jvmarg value="${profiler.info.jvmargs.agent}"/> 1035 <jvmarg line="${profiler.info.jvmargs}"/> 1036 <test name="${profile.class}"/> 1037 <classpath> 1038 <path path="${run.test.classpath}"/> 1039 <path path="${j2ee.platform.classpath}"/> 1040 </classpath> 1041 <syspropertyset> 1042 <propertyref prefix="test-sys-prop."/> 1043 <mapper from="test-sys-prop.*" to="*" type="glob"/> 1044 </syspropertyset> 1045 <formatter type="brief" usefile="false"/> 1046 <formatter type="xml"/> 1047 </junit> 1048 </target> 1049 <!-- 837 1050 838 1051 CLEANUP SECTION 839 1052 --> 840 <target depends="init" if="no.dist.ear.dir"name="deps-clean" unless="no.deps">1053 <target depends="init" name="deps-clean" unless="no.deps"> 841 1054 <ant antfile="${project.SuperDAO}/build.xml" inheritall="false" target="clean"/> 842 1055 </target>