1.1 --- a/java/Postak/nbproject/build-impl.xml Sat Feb 28 17:57:14 2009 +0100
1.2 +++ b/java/Postak/nbproject/build-impl.xml Wed Jan 05 14:19:11 2011 +0100
1.3 @@ -20,6 +20,13 @@
1.4
1.5 -->
1.6 <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="Postak-impl">
1.7 + <fail message="Please build using Ant 1.7.1 or higher.">
1.8 + <condition>
1.9 + <not>
1.10 + <antversion atleast="1.7.1"/>
1.11 + </not>
1.12 + </condition>
1.13 + </fail>
1.14 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
1.15 <!--
1.16 ======================
1.17 @@ -48,19 +55,68 @@
1.18 </target>
1.19 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
1.20 <available file="${manifest.file}" property="manifest.available"/>
1.21 - <condition property="manifest.available+main.class">
1.22 + <available file="${application.splash}" property="splashscreen.available"/>
1.23 + <condition property="main.class.available">
1.24 <and>
1.25 - <isset property="manifest.available"/>
1.26 <isset property="main.class"/>
1.27 <not>
1.28 <equals arg1="${main.class}" arg2="" trim="true"/>
1.29 </not>
1.30 </and>
1.31 </condition>
1.32 + <condition property="manifest.available+main.class">
1.33 + <and>
1.34 + <isset property="manifest.available"/>
1.35 + <isset property="main.class.available"/>
1.36 + </and>
1.37 + </condition>
1.38 + <condition property="do.mkdist">
1.39 + <and>
1.40 + <isset property="libs.CopyLibs.classpath"/>
1.41 + <not>
1.42 + <istrue value="${mkdist.disabled}"/>
1.43 + </not>
1.44 + </and>
1.45 + </condition>
1.46 <condition property="manifest.available+main.class+mkdist.available">
1.47 <and>
1.48 <istrue value="${manifest.available+main.class}"/>
1.49 - <isset property="libs.CopyLibs.classpath"/>
1.50 + <isset property="do.mkdist"/>
1.51 + </and>
1.52 + </condition>
1.53 + <condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
1.54 + <and>
1.55 + <istrue value="${manifest.available+main.class+mkdist.available}"/>
1.56 + <istrue value="${splashscreen.available}"/>
1.57 + </and>
1.58 + </condition>
1.59 + <condition property="do.archive">
1.60 + <not>
1.61 + <istrue value="${jar.archive.disabled}"/>
1.62 + </not>
1.63 + </condition>
1.64 + <condition property="do.archive+manifest.available">
1.65 + <and>
1.66 + <isset property="manifest.available"/>
1.67 + <istrue value="${do.archive}"/>
1.68 + </and>
1.69 + </condition>
1.70 + <condition property="do.archive+manifest.available+main.class">
1.71 + <and>
1.72 + <istrue value="${manifest.available+main.class}"/>
1.73 + <istrue value="${do.archive}"/>
1.74 + </and>
1.75 + </condition>
1.76 + <condition property="do.archive+manifest.available+main.class+mkdist.available">
1.77 + <and>
1.78 + <istrue value="${manifest.available+main.class+mkdist.available}"/>
1.79 + <istrue value="${do.archive}"/>
1.80 + </and>
1.81 + </condition>
1.82 + <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available">
1.83 + <and>
1.84 + <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/>
1.85 + <istrue value="${do.archive}"/>
1.86 </and>
1.87 </condition>
1.88 <condition property="have.tests">
1.89 @@ -97,6 +153,7 @@
1.90 <property name="javadoc.preview" value="true"/>
1.91 <property name="application.args" value=""/>
1.92 <property name="source.encoding" value="${file.encoding}"/>
1.93 + <property name="runtime.encoding" value="${source.encoding}"/>
1.94 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
1.95 <and>
1.96 <isset property="javadoc.encoding"/>
1.97 @@ -112,12 +169,13 @@
1.98 <condition property="do.depend.true">
1.99 <istrue value="${do.depend}"/>
1.100 </condition>
1.101 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
1.102 - <and>
1.103 - <isset property="jaxws.endorsed.dir"/>
1.104 - <available file="nbproject/jaxws-build.xml"/>
1.105 - </and>
1.106 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
1.107 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
1.108 + <length length="0" string="${endorsed.classpath}" when="greater"/>
1.109 </condition>
1.110 + <property name="javac.fork" value="false"/>
1.111 + <property name="jar.index" value="false"/>
1.112 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
1.113 </target>
1.114 <target name="-post-init">
1.115 <!-- Empty placeholder for easier customization. -->
1.116 @@ -144,26 +202,79 @@
1.117 </sequential>
1.118 </macrodef>
1.119 </target>
1.120 - <target name="-init-macrodef-javac">
1.121 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
1.122 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
1.123 <attribute default="${src.dir}" name="srcdir"/>
1.124 <attribute default="${build.classes.dir}" name="destdir"/>
1.125 <attribute default="${javac.classpath}" name="classpath"/>
1.126 + <attribute default="${javac.processorpath}" name="processorpath"/>
1.127 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
1.128 <attribute default="${includes}" name="includes"/>
1.129 <attribute default="${excludes}" name="excludes"/>
1.130 <attribute default="${javac.debug}" name="debug"/>
1.131 - <attribute default="/does/not/exist" name="sourcepath"/>
1.132 + <attribute default="${empty.dir}" name="sourcepath"/>
1.133 + <attribute default="${empty.dir}" name="gensrcdir"/>
1.134 <element name="customize" optional="true"/>
1.135 <sequential>
1.136 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
1.137 + <property location="${build.dir}/empty" name="empty.dir"/>
1.138 + <mkdir dir="${empty.dir}"/>
1.139 + <mkdir dir="@{apgeneratedsrcdir}"/>
1.140 + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
1.141 + <src>
1.142 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
1.143 + <include name="*"/>
1.144 + </dirset>
1.145 + </src>
1.146 <classpath>
1.147 <path path="@{classpath}"/>
1.148 </classpath>
1.149 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
1.150 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
1.151 + <compilerarg line="${javac.compilerargs}"/>
1.152 + <compilerarg value="-processorpath"/>
1.153 + <compilerarg path="@{processorpath}:${empty.dir}"/>
1.154 + <compilerarg line="${ap.processors.internal}"/>
1.155 + <compilerarg line="${annotation.processing.processor.options}"/>
1.156 + <compilerarg value="-s"/>
1.157 + <compilerarg path="@{apgeneratedsrcdir}"/>
1.158 + <compilerarg line="${ap.proc.none.internal}"/>
1.159 <customize/>
1.160 </javac>
1.161 </sequential>
1.162 </macrodef>
1.163 + </target>
1.164 + <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
1.165 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
1.166 + <attribute default="${src.dir}" name="srcdir"/>
1.167 + <attribute default="${build.classes.dir}" name="destdir"/>
1.168 + <attribute default="${javac.classpath}" name="classpath"/>
1.169 + <attribute default="${javac.processorpath}" name="processorpath"/>
1.170 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
1.171 + <attribute default="${includes}" name="includes"/>
1.172 + <attribute default="${excludes}" name="excludes"/>
1.173 + <attribute default="${javac.debug}" name="debug"/>
1.174 + <attribute default="${empty.dir}" name="sourcepath"/>
1.175 + <attribute default="${empty.dir}" name="gensrcdir"/>
1.176 + <element name="customize" optional="true"/>
1.177 + <sequential>
1.178 + <property location="${build.dir}/empty" name="empty.dir"/>
1.179 + <mkdir dir="${empty.dir}"/>
1.180 + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
1.181 + <src>
1.182 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
1.183 + <include name="*"/>
1.184 + </dirset>
1.185 + </src>
1.186 + <classpath>
1.187 + <path path="@{classpath}"/>
1.188 + </classpath>
1.189 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
1.190 + <compilerarg line="${javac.compilerargs}"/>
1.191 + <customize/>
1.192 + </javac>
1.193 + </sequential>
1.194 + </macrodef>
1.195 + </target>
1.196 + <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
1.197 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
1.198 <attribute default="${src.dir}" name="srcdir"/>
1.199 <attribute default="${build.classes.dir}" name="destdir"/>
1.200 @@ -198,7 +309,7 @@
1.201 <attribute default="${excludes}" name="excludes"/>
1.202 <attribute default="**" name="testincludes"/>
1.203 <sequential>
1.204 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
1.205 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
1.206 <batchtest todir="${build.test.results.dir}">
1.207 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
1.208 <filename name="@{testincludes}"/>
1.209 @@ -213,6 +324,7 @@
1.210 </syspropertyset>
1.211 <formatter type="brief" usefile="false"/>
1.212 <formatter type="xml"/>
1.213 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.214 <jvmarg line="${run.jvmargs}"/>
1.215 </junit>
1.216 </sequential>
1.217 @@ -269,8 +381,11 @@
1.218 <element name="customize" optional="true"/>
1.219 <sequential>
1.220 <java classname="@{classname}" dir="${work.dir}" fork="true">
1.221 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.222 <jvmarg line="${debug-args-line}"/>
1.223 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
1.224 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
1.225 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
1.226 <jvmarg line="${run.jvmargs}"/>
1.227 <classpath>
1.228 <path path="@{classpath}"/>
1.229 @@ -287,12 +402,16 @@
1.230 <target name="-init-macrodef-java">
1.231 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
1.232 <attribute default="${main.class}" name="classname"/>
1.233 + <attribute default="${run.classpath}" name="classpath"/>
1.234 <element name="customize" optional="true"/>
1.235 <sequential>
1.236 <java classname="@{classname}" dir="${work.dir}" fork="true">
1.237 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.238 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
1.239 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
1.240 <jvmarg line="${run.jvmargs}"/>
1.241 <classpath>
1.242 - <path path="${run.classpath}"/>
1.243 + <path path="@{classpath}"/>
1.244 </classpath>
1.245 <syspropertyset>
1.246 <propertyref prefix="run-sys-prop."/>
1.247 @@ -303,20 +422,86 @@
1.248 </sequential>
1.249 </macrodef>
1.250 </target>
1.251 + <target name="-init-macrodef-copylibs">
1.252 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
1.253 + <element name="customize" optional="true"/>
1.254 + <sequential>
1.255 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1.256 + <pathconvert property="run.classpath.without.build.classes.dir">
1.257 + <path path="${run.classpath}"/>
1.258 + <map from="${build.classes.dir.resolved}" to=""/>
1.259 + </pathconvert>
1.260 + <pathconvert pathsep=" " property="jar.classpath">
1.261 + <path path="${run.classpath.without.build.classes.dir}"/>
1.262 + <chainedmapper>
1.263 + <flattenmapper/>
1.264 + <globmapper from="*" to="lib/*"/>
1.265 + </chainedmapper>
1.266 + </pathconvert>
1.267 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
1.268 + <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
1.269 + <fileset dir="${build.classes.dir}"/>
1.270 + <manifest>
1.271 + <attribute name="Class-Path" value="${jar.classpath}"/>
1.272 + <customize/>
1.273 + </manifest>
1.274 + </copylibs>
1.275 + </sequential>
1.276 + </macrodef>
1.277 + </target>
1.278 <target name="-init-presetdef-jar">
1.279 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
1.280 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
1.281 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
1.282 <j2seproject1:fileset dir="${build.classes.dir}"/>
1.283 </jar>
1.284 </presetdef>
1.285 </target>
1.286 - <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-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
1.287 + <target name="-init-ap-cmdline-properties">
1.288 + <property name="annotation.processing.enabled" value="true"/>
1.289 + <property name="annotation.processing.processors.list" value=""/>
1.290 + <property name="annotation.processing.processor.options" value=""/>
1.291 + <property name="annotation.processing.run.all.processors" value="true"/>
1.292 + <property name="javac.processorpath" value="${javac.classpath}"/>
1.293 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
1.294 + <condition property="ap.supported.internal" value="true">
1.295 + <not>
1.296 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
1.297 + </not>
1.298 + </condition>
1.299 + </target>
1.300 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
1.301 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
1.302 + <isfalse value="${annotation.processing.run.all.processors}"/>
1.303 + </condition>
1.304 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
1.305 + <isfalse value="${annotation.processing.enabled}"/>
1.306 + </condition>
1.307 + </target>
1.308 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
1.309 + <property name="ap.cmd.line.internal" value=""/>
1.310 + </target>
1.311 + <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-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
1.312 <!--
1.313 ===================
1.314 COMPILATION SECTION
1.315 ===================
1.316 -->
1.317 - <target depends="init" name="deps-jar" unless="no.deps"/>
1.318 + <target name="-deps-jar-init" unless="built-jar.properties">
1.319 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
1.320 + <delete file="${built-jar.properties}" quiet="true"/>
1.321 + </target>
1.322 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
1.323 + <echo level="warn" message="Cycle detected: Postak was already built"/>
1.324 + </target>
1.325 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
1.326 + <mkdir dir="${build.dir}"/>
1.327 + <touch file="${built-jar.properties}" verbose="false"/>
1.328 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
1.329 + <antcall target="-warn-already-built-jar"/>
1.330 + <propertyfile file="${built-jar.properties}">
1.331 + <entry key="${basedir}" value=""/>
1.332 + </propertyfile>
1.333 + </target>
1.334 <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
1.335 <target depends="init" name="-check-automatic-build">
1.336 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
1.337 @@ -332,14 +517,25 @@
1.338 <!-- You can override this target in the ../build.xml file. -->
1.339 </target>
1.340 <target if="do.depend.true" name="-compile-depend">
1.341 - <j2seproject3:depend/>
1.342 + <pathconvert property="build.generated.subdirs">
1.343 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1.344 + <include name="*"/>
1.345 + </dirset>
1.346 + </pathconvert>
1.347 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
1.348 </target>
1.349 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
1.350 - <j2seproject3:javac/>
1.351 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
1.352 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
1.353 <copy todir="${build.classes.dir}">
1.354 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1.355 </copy>
1.356 </target>
1.357 + <target if="has.persistence.xml" name="-copy-persistence-xml">
1.358 + <mkdir dir="${build.classes.dir}/META-INF"/>
1.359 + <copy todir="${build.classes.dir}/META-INF">
1.360 + <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
1.361 + </copy>
1.362 + </target>
1.363 <target name="-post-compile">
1.364 <!-- Empty placeholder for easier customization. -->
1.365 <!-- You can override this target in the ../build.xml file. -->
1.366 @@ -352,7 +548,7 @@
1.367 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
1.368 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1.369 <j2seproject3:force-recompile/>
1.370 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
1.371 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
1.372 </target>
1.373 <target name="-post-compile-single">
1.374 <!-- Empty placeholder for easier customization. -->
1.375 @@ -372,13 +568,13 @@
1.376 <!-- Empty placeholder for easier customization. -->
1.377 <!-- You can override this target in the ../build.xml file. -->
1.378 </target>
1.379 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
1.380 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available">
1.381 <j2seproject1:jar/>
1.382 </target>
1.383 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
1.384 + <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.385 <j2seproject1:jar manifest="${manifest.file}"/>
1.386 </target>
1.387 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
1.388 + <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.389 <j2seproject1:jar manifest="${manifest.file}">
1.390 <j2seproject1:manifest>
1.391 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
1.392 @@ -393,27 +589,26 @@
1.393 </pathconvert>
1.394 <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
1.395 </target>
1.396 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
1.397 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1.398 - <pathconvert property="run.classpath.without.build.classes.dir">
1.399 - <path path="${run.classpath}"/>
1.400 - <map from="${build.classes.dir.resolved}" to=""/>
1.401 - </pathconvert>
1.402 - <pathconvert pathsep=" " property="jar.classpath">
1.403 - <path path="${run.classpath.without.build.classes.dir}"/>
1.404 - <chainedmapper>
1.405 - <flattenmapper/>
1.406 - <globmapper from="*" to="lib/*"/>
1.407 - </chainedmapper>
1.408 - </pathconvert>
1.409 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
1.410 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
1.411 - <fileset dir="${build.classes.dir}"/>
1.412 - <manifest>
1.413 + <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.414 + <basename file="${application.splash}" property="splashscreen.basename"/>
1.415 + <mkdir dir="${build.classes.dir}/META-INF"/>
1.416 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
1.417 + <j2seproject3:copylibs>
1.418 + <customize>
1.419 <attribute name="Main-Class" value="${main.class}"/>
1.420 - <attribute name="Class-Path" value="${jar.classpath}"/>
1.421 - </manifest>
1.422 - </copylibs>
1.423 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
1.424 + </customize>
1.425 + </j2seproject3:copylibs>
1.426 + <echo>To run this application from the command line without Ant, try:</echo>
1.427 + <property location="${dist.jar}" name="dist.jar.resolved"/>
1.428 + <echo>java -jar "${dist.jar.resolved}"</echo>
1.429 + </target>
1.430 + <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.431 + <j2seproject3:copylibs>
1.432 + <customize>
1.433 + <attribute name="Main-Class" value="${main.class}"/>
1.434 + </customize>
1.435 + </j2seproject3:copylibs>
1.436 <echo>To run this application from the command line without Ant, try:</echo>
1.437 <property location="${dist.jar}" name="dist.jar.resolved"/>
1.438 <echo>java -jar "${dist.jar.resolved}"</echo>
1.439 @@ -422,7 +617,7 @@
1.440 <!-- Empty placeholder for easier customization. -->
1.441 <!-- You can override this target in the ../build.xml file. -->
1.442 </target>
1.443 - <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.444 + <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.445 <!--
1.446 =================
1.447 EXECUTION SECTION
1.448 @@ -438,10 +633,14 @@
1.449 <target name="-do-not-recompile">
1.450 <property name="javac.includes.binary" value=""/>
1.451 </target>
1.452 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
1.453 + <target depends="init,compile-single" name="run-single">
1.454 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1.455 <j2seproject1:java classname="${run.class}"/>
1.456 </target>
1.457 + <target depends="init,compile-test-single" name="run-test-with-main">
1.458 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1.459 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
1.460 + </target>
1.461 <!--
1.462 =================
1.463 DEBUGGING SECTION
1.464 @@ -450,6 +649,9 @@
1.465 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
1.466 <j2seproject1:nbjpdastart name="${debug.class}"/>
1.467 </target>
1.468 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
1.469 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
1.470 + </target>
1.471 <target depends="init,compile" name="-debug-start-debuggee">
1.472 <j2seproject3:debug>
1.473 <customize>
1.474 @@ -466,7 +668,12 @@
1.475 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1.476 <j2seproject3:debug classname="${debug.class}"/>
1.477 </target>
1.478 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
1.479 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
1.480 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
1.481 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1.482 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
1.483 + </target>
1.484 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
1.485 <target depends="init" name="-pre-debug-fix">
1.486 <fail unless="fix.includes">Must set fix.includes</fail>
1.487 <property name="javac.includes" value="${fix.includes}.java"/>
1.488 @@ -480,7 +687,7 @@
1.489 JAVADOC SECTION
1.490 ===============
1.491 -->
1.492 - <target depends="init" name="-javadoc-build">
1.493 + <target depends="init" if="have.sources" name="-javadoc-build">
1.494 <mkdir dir="${dist.javadoc.dir}"/>
1.495 <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}">
1.496 <classpath>
1.497 @@ -489,7 +696,18 @@
1.498 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1.499 <filename name="**/*.java"/>
1.500 </fileset>
1.501 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1.502 + <include name="**/*.java"/>
1.503 + </fileset>
1.504 </javadoc>
1.505 + <copy todir="${dist.javadoc.dir}">
1.506 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1.507 + <filename name="**/doc-files/**"/>
1.508 + </fileset>
1.509 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1.510 + <include name="**/doc-files/**"/>
1.511 + </fileset>
1.512 + </copy>
1.513 </target>
1.514 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
1.515 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
1.516 @@ -511,7 +729,7 @@
1.517 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1.518 </target>
1.519 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
1.520 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1.521 + <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.522 <copy todir="${build.test.classes.dir}">
1.523 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1.524 </copy>
1.525 @@ -528,7 +746,7 @@
1.526 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1.527 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1.528 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
1.529 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
1.530 + <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}"/>
1.531 <copy todir="${build.test.classes.dir}">
1.532 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1.533 </copy>
1.534 @@ -550,7 +768,7 @@
1.535 <j2seproject3:junit testincludes="**/*Test.java"/>
1.536 </target>
1.537 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
1.538 - <fail if="tests.failed">Some tests failed; see details above.</fail>
1.539 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1.540 </target>
1.541 <target depends="init" if="have.tests" name="test-report"/>
1.542 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
1.543 @@ -563,9 +781,9 @@
1.544 <j2seproject3:junit excludes="" includes="${test.includes}"/>
1.545 </target>
1.546 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
1.547 - <fail if="tests.failed">Some tests failed; see details above.</fail>
1.548 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1.549 </target>
1.550 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
1.551 + <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"/>
1.552 <!--
1.553 =======================
1.554 JUNIT DEBUGGING SECTION
1.555 @@ -592,7 +810,7 @@
1.556 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
1.557 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
1.558 </target>
1.559 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1.560 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1.561 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
1.562 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
1.563 </target>
1.564 @@ -629,14 +847,45 @@
1.565 CLEANUP SECTION
1.566 ===============
1.567 -->
1.568 - <target depends="init" name="deps-clean" unless="no.deps"/>
1.569 + <target name="-deps-clean-init" unless="built-clean.properties">
1.570 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
1.571 + <delete file="${built-clean.properties}" quiet="true"/>
1.572 + </target>
1.573 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
1.574 + <echo level="warn" message="Cycle detected: Postak was already built"/>
1.575 + </target>
1.576 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
1.577 + <mkdir dir="${build.dir}"/>
1.578 + <touch file="${built-clean.properties}" verbose="false"/>
1.579 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
1.580 + <antcall target="-warn-already-built-clean"/>
1.581 + <propertyfile file="${built-clean.properties}">
1.582 + <entry key="${basedir}" value=""/>
1.583 + </propertyfile>
1.584 + </target>
1.585 <target depends="init" name="-do-clean">
1.586 <delete dir="${build.dir}"/>
1.587 - <delete dir="${dist.dir}"/>
1.588 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
1.589 </target>
1.590 <target name="-post-clean">
1.591 <!-- Empty placeholder for easier customization. -->
1.592 <!-- You can override this target in the ../build.xml file. -->
1.593 </target>
1.594 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
1.595 + <target name="-check-call-dep">
1.596 + <property file="${call.built.properties}" prefix="already.built."/>
1.597 + <condition property="should.call.dep">
1.598 + <not>
1.599 + <isset property="already.built.${call.subproject}"/>
1.600 + </not>
1.601 + </condition>
1.602 + </target>
1.603 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
1.604 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
1.605 + <propertyset>
1.606 + <propertyref prefix="transfer."/>
1.607 + <mapper from="transfer.*" to="*" type="glob"/>
1.608 + </propertyset>
1.609 + </ant>
1.610 + </target>
1.611 </project>