1.1 --- a/java/nekurak.net-lib/nbproject/build-impl.xml Sat Jan 08 20:18:27 2011 +0100
1.2 +++ b/java/nekurak.net-lib/nbproject/build-impl.xml Mon Nov 07 20:31:08 2011 +0100
1.3 @@ -55,7 +55,14 @@
1.4 </target>
1.5 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
1.6 <available file="${manifest.file}" property="manifest.available"/>
1.7 - <available file="${application.splash}" property="splashscreen.available"/>
1.8 + <condition property="splashscreen.available">
1.9 + <and>
1.10 + <not>
1.11 + <equals arg1="${application.splash}" arg2="" trim="true"/>
1.12 + </not>
1.13 + <available file="${application.splash}"/>
1.14 + </and>
1.15 + </condition>
1.16 <condition property="main.class.available">
1.17 <and>
1.18 <isset property="main.class"/>
1.19 @@ -70,8 +77,14 @@
1.20 <isset property="main.class.available"/>
1.21 </and>
1.22 </condition>
1.23 + <condition property="do.archive">
1.24 + <not>
1.25 + <istrue value="${jar.archive.disabled}"/>
1.26 + </not>
1.27 + </condition>
1.28 <condition property="do.mkdist">
1.29 <and>
1.30 + <isset property="do.archive"/>
1.31 <isset property="libs.CopyLibs.classpath"/>
1.32 <not>
1.33 <istrue value="${mkdist.disabled}"/>
1.34 @@ -84,40 +97,41 @@
1.35 <isset property="do.mkdist"/>
1.36 </and>
1.37 </condition>
1.38 - <condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
1.39 - <and>
1.40 - <istrue value="${manifest.available+main.class+mkdist.available}"/>
1.41 - <istrue value="${splashscreen.available}"/>
1.42 - </and>
1.43 - </condition>
1.44 - <condition property="do.archive">
1.45 - <not>
1.46 - <istrue value="${jar.archive.disabled}"/>
1.47 - </not>
1.48 - </condition>
1.49 <condition property="do.archive+manifest.available">
1.50 <and>
1.51 <isset property="manifest.available"/>
1.52 <istrue value="${do.archive}"/>
1.53 </and>
1.54 </condition>
1.55 + <condition property="do.archive+main.class.available">
1.56 + <and>
1.57 + <isset property="main.class.available"/>
1.58 + <istrue value="${do.archive}"/>
1.59 + </and>
1.60 + </condition>
1.61 + <condition property="do.archive+splashscreen.available">
1.62 + <and>
1.63 + <isset property="splashscreen.available"/>
1.64 + <istrue value="${do.archive}"/>
1.65 + </and>
1.66 + </condition>
1.67 <condition property="do.archive+manifest.available+main.class">
1.68 <and>
1.69 <istrue value="${manifest.available+main.class}"/>
1.70 <istrue value="${do.archive}"/>
1.71 </and>
1.72 </condition>
1.73 - <condition property="do.archive+manifest.available+main.class+mkdist.available">
1.74 - <and>
1.75 - <istrue value="${manifest.available+main.class+mkdist.available}"/>
1.76 - <istrue value="${do.archive}"/>
1.77 - </and>
1.78 + <condition property="manifest.available-mkdist.available">
1.79 + <or>
1.80 + <istrue value="${manifest.available}"/>
1.81 + <isset property="do.mkdist"/>
1.82 + </or>
1.83 </condition>
1.84 - <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available">
1.85 - <and>
1.86 - <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/>
1.87 - <istrue value="${do.archive}"/>
1.88 - </and>
1.89 + <condition property="manifest.available+main.class-mkdist.available">
1.90 + <or>
1.91 + <istrue value="${manifest.available+main.class}"/>
1.92 + <isset property="do.mkdist"/>
1.93 + </or>
1.94 </condition>
1.95 <condition property="have.tests">
1.96 <or>
1.97 @@ -173,8 +187,17 @@
1.98 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
1.99 <length length="0" string="${endorsed.classpath}" when="greater"/>
1.100 </condition>
1.101 - <property name="javac.fork" value="false"/>
1.102 + <condition else="false" property="jdkBug6558476">
1.103 + <and>
1.104 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
1.105 + <not>
1.106 + <os family="unix"/>
1.107 + </not>
1.108 + </and>
1.109 + </condition>
1.110 + <property name="javac.fork" value="${jdkBug6558476}"/>
1.111 <property name="jar.index" value="false"/>
1.112 + <property name="jar.index.metainf" value="${jar.index}"/>
1.113 <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
1.114 </target>
1.115 <target name="-post-init">
1.116 @@ -302,7 +325,9 @@
1.117 <delete>
1.118 <files includesfile="${javac.includesfile.binary}"/>
1.119 </delete>
1.120 - <delete file="${javac.includesfile.binary}"/>
1.121 + <delete>
1.122 + <fileset file="${javac.includesfile.binary}"/>
1.123 + </delete>
1.124 </sequential>
1.125 </macrodef>
1.126 </target>
1.127 @@ -312,7 +337,8 @@
1.128 <attribute default="${excludes}" name="excludes"/>
1.129 <attribute default="**" name="testincludes"/>
1.130 <sequential>
1.131 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
1.132 + <property name="junit.forkmode" value="perTest"/>
1.133 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
1.134 <batchtest todir="${build.test.results.dir}">
1.135 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
1.136 <filename name="@{testincludes}"/>
1.137 @@ -328,11 +354,56 @@
1.138 <formatter type="brief" usefile="false"/>
1.139 <formatter type="xml"/>
1.140 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.141 + <jvmarg value="-ea"/>
1.142 <jvmarg line="${run.jvmargs}"/>
1.143 </junit>
1.144 </sequential>
1.145 </macrodef>
1.146 </target>
1.147 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
1.148 + <target name="-profile-pre-init">
1.149 + <!-- Empty placeholder for easier customization. -->
1.150 + <!-- You can override this target in the ../build.xml file. -->
1.151 + </target>
1.152 + <target name="-profile-post-init">
1.153 + <!-- Empty placeholder for easier customization. -->
1.154 + <!-- You can override this target in the ../build.xml file. -->
1.155 + </target>
1.156 + <target name="-profile-init-macrodef-profile">
1.157 + <macrodef name="resolve">
1.158 + <attribute name="name"/>
1.159 + <attribute name="value"/>
1.160 + <sequential>
1.161 + <property name="@{name}" value="${env.@{value}}"/>
1.162 + </sequential>
1.163 + </macrodef>
1.164 + <macrodef name="profile">
1.165 + <attribute default="${main.class}" name="classname"/>
1.166 + <element name="customize" optional="true"/>
1.167 + <sequential>
1.168 + <property environment="env"/>
1.169 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
1.170 + <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
1.171 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
1.172 + <jvmarg line="${profiler.info.jvmargs}"/>
1.173 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1.174 + <arg line="${application.args}"/>
1.175 + <classpath>
1.176 + <path path="${run.classpath}"/>
1.177 + </classpath>
1.178 + <syspropertyset>
1.179 + <propertyref prefix="run-sys-prop."/>
1.180 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
1.181 + </syspropertyset>
1.182 + <customize/>
1.183 + </java>
1.184 + </sequential>
1.185 + </macrodef>
1.186 + </target>
1.187 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
1.188 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
1.189 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
1.190 + </target>
1.191 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
1.192 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
1.193 <attribute default="${main.class}" name="name"/>
1.194 @@ -427,6 +498,7 @@
1.195 </target>
1.196 <target name="-init-macrodef-copylibs">
1.197 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
1.198 + <attribute default="${manifest.file}" name="manifest"/>
1.199 <element name="customize" optional="true"/>
1.200 <sequential>
1.201 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1.202 @@ -442,7 +514,7 @@
1.203 </chainedmapper>
1.204 </pathconvert>
1.205 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
1.206 - <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
1.207 + <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
1.208 <fileset dir="${build.classes.dir}"/>
1.209 <manifest>
1.210 <attribute name="Class-Path" value="${jar.classpath}"/>
1.211 @@ -571,10 +643,10 @@
1.212 <!-- Empty placeholder for easier customization. -->
1.213 <!-- You can override this target in the ../build.xml file. -->
1.214 </target>
1.215 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available">
1.216 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
1.217 <j2seproject1:jar/>
1.218 </target>
1.219 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
1.220 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
1.221 <j2seproject1:jar manifest="${manifest.file}"/>
1.222 </target>
1.223 <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
1.224 @@ -583,44 +655,53 @@
1.225 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
1.226 </j2seproject1:manifest>
1.227 </j2seproject1:jar>
1.228 - <echo>To run this application from the command line without Ant, try:</echo>
1.229 + <echo level="info">To run this application from the command line without Ant, try:</echo>
1.230 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1.231 <property location="${dist.jar}" name="dist.jar.resolved"/>
1.232 <pathconvert property="run.classpath.with.dist.jar">
1.233 <path path="${run.classpath}"/>
1.234 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
1.235 </pathconvert>
1.236 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
1.237 + <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
1.238 </target>
1.239 - <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen">
1.240 + <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
1.241 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
1.242 + <touch file="${tmp.manifest.file}" verbose="false"/>
1.243 + </target>
1.244 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
1.245 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
1.246 + <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
1.247 + </target>
1.248 + <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
1.249 + <manifest file="${tmp.manifest.file}" mode="update">
1.250 + <attribute name="Main-Class" value="${main.class}"/>
1.251 + </manifest>
1.252 + </target>
1.253 + <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
1.254 <basename file="${application.splash}" property="splashscreen.basename"/>
1.255 <mkdir dir="${build.classes.dir}/META-INF"/>
1.256 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
1.257 - <j2seproject3:copylibs>
1.258 - <customize>
1.259 - <attribute name="Main-Class" value="${main.class}"/>
1.260 - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
1.261 - </customize>
1.262 - </j2seproject3:copylibs>
1.263 - <echo>To run this application from the command line without Ant, try:</echo>
1.264 + <manifest file="${tmp.manifest.file}" mode="update">
1.265 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
1.266 + </manifest>
1.267 + </target>
1.268 + <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
1.269 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
1.270 + <echo level="info">To run this application from the command line without Ant, try:</echo>
1.271 <property location="${dist.jar}" name="dist.jar.resolved"/>
1.272 - <echo>java -jar "${dist.jar.resolved}"</echo>
1.273 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
1.274 </target>
1.275 - <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available">
1.276 - <j2seproject3:copylibs>
1.277 - <customize>
1.278 - <attribute name="Main-Class" value="${main.class}"/>
1.279 - </customize>
1.280 - </j2seproject3:copylibs>
1.281 - <echo>To run this application from the command line without Ant, try:</echo>
1.282 - <property location="${dist.jar}" name="dist.jar.resolved"/>
1.283 - <echo>java -jar "${dist.jar.resolved}"</echo>
1.284 + <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
1.285 + <delete>
1.286 + <fileset file="${tmp.manifest.file}"/>
1.287 + </delete>
1.288 </target>
1.289 + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
1.290 <target name="-post-jar">
1.291 <!-- Empty placeholder for easier customization. -->
1.292 <!-- You can override this target in the ../build.xml file. -->
1.293 </target>
1.294 - <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
1.295 + <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
1.296 <!--
1.297 =================
1.298 EXECUTION SECTION
1.299 @@ -686,6 +767,72 @@
1.300 </target>
1.301 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
1.302 <!--
1.303 + =================
1.304 + PROFILING SECTION
1.305 + =================
1.306 + -->
1.307 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
1.308 + <nbprofiledirect>
1.309 + <classpath>
1.310 + <path path="${run.classpath}"/>
1.311 + </classpath>
1.312 + </nbprofiledirect>
1.313 + <profile/>
1.314 + </target>
1.315 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
1.316 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
1.317 + <nbprofiledirect>
1.318 + <classpath>
1.319 + <path path="${run.classpath}"/>
1.320 + </classpath>
1.321 + </nbprofiledirect>
1.322 + <profile classname="${profile.class}"/>
1.323 + </target>
1.324 + <!--
1.325 + =========================
1.326 + APPLET PROFILING SECTION
1.327 + =========================
1.328 + -->
1.329 + <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
1.330 + <nbprofiledirect>
1.331 + <classpath>
1.332 + <path path="${run.classpath}"/>
1.333 + </classpath>
1.334 + </nbprofiledirect>
1.335 + <profile classname="sun.applet.AppletViewer">
1.336 + <customize>
1.337 + <arg value="${applet.url}"/>
1.338 + </customize>
1.339 + </profile>
1.340 + </target>
1.341 + <!--
1.342 + =========================
1.343 + TESTS PROFILING SECTION
1.344 + =========================
1.345 + -->
1.346 + <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
1.347 + <nbprofiledirect>
1.348 + <classpath>
1.349 + <path path="${run.test.classpath}"/>
1.350 + </classpath>
1.351 + </nbprofiledirect>
1.352 + <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
1.353 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1.354 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
1.355 + <jvmarg line="${profiler.info.jvmargs}"/>
1.356 + <test name="${profile.class}"/>
1.357 + <classpath>
1.358 + <path path="${run.test.classpath}"/>
1.359 + </classpath>
1.360 + <syspropertyset>
1.361 + <propertyref prefix="test-sys-prop."/>
1.362 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
1.363 + </syspropertyset>
1.364 + <formatter type="brief" usefile="false"/>
1.365 + <formatter type="xml"/>
1.366 + </junit>
1.367 + </target>
1.368 + <!--
1.369 ===============
1.370 JAVADOC SECTION
1.371 ===============
1.372 @@ -731,7 +878,7 @@
1.373 <target if="do.depend.true" name="-compile-test-depend">
1.374 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1.375 </target>
1.376 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
1.377 + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
1.378 <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
1.379 <copy todir="${build.test.classes.dir}">
1.380 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1.381 @@ -746,7 +893,7 @@
1.382 <!-- Empty placeholder for easier customization. -->
1.383 <!-- You can override this target in the ../build.xml file. -->
1.384 </target>
1.385 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1.386 + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1.387 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1.388 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
1.389 <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>