\r
-->\r
<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="saccubus_frontend-impl">\r
+ <fail message="Please build using Ant 1.7.1 or higher.">\r
+ <condition>\r
+ <not>\r
+ <antversion atleast="1.7.1"/>\r
+ </not>\r
+ </condition>\r
+ </fail>\r
<target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>\r
<!-- \r
======================\r
</target>\r
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">\r
<available file="${manifest.file}" property="manifest.available"/>\r
- <condition property="manifest.available+main.class">\r
+ <condition property="main.class.available">\r
<and>\r
- <isset property="manifest.available"/>\r
<isset property="main.class"/>\r
<not>\r
<equals arg1="${main.class}" arg2="" trim="true"/>\r
</not>\r
</and>\r
</condition>\r
+ <condition property="manifest.available+main.class">\r
+ <and>\r
+ <isset property="manifest.available"/>\r
+ <isset property="main.class.available"/>\r
+ </and>\r
+ </condition>\r
+ <condition property="do.mkdist">\r
+ <and>\r
+ <isset property="libs.CopyLibs.classpath"/>\r
+ <not>\r
+ <istrue value="${mkdist.disabled}"/>\r
+ </not>\r
+ </and>\r
+ </condition>\r
<condition property="manifest.available+main.class+mkdist.available">\r
<and>\r
<istrue value="${manifest.available+main.class}"/>\r
- <isset property="libs.CopyLibs.classpath"/>\r
+ <isset property="do.mkdist"/>\r
</and>\r
</condition>\r
+ <condition property="manifest.available+mkdist.available">\r
+ <and>\r
+ <istrue value="${manifest.available}"/>\r
+ <isset property="do.mkdist"/>\r
+ </and>\r
+ </condition>\r
+ <condition property="manifest.available-mkdist.available">\r
+ <or>\r
+ <istrue value="${manifest.available}"/>\r
+ <isset property="do.mkdist"/>\r
+ </or>\r
+ </condition>\r
+ <condition property="manifest.available+main.class-mkdist.available">\r
+ <or>\r
+ <istrue value="${manifest.available+main.class}"/>\r
+ <isset property="do.mkdist"/>\r
+ </or>\r
+ </condition>\r
<condition property="have.tests">\r
<or>\r
<available file="${test.src.dir}"/>\r
<property name="javadoc.preview" value="true"/>\r
<property name="application.args" value=""/>\r
<property name="source.encoding" value="${file.encoding}"/>\r
+ <property name="runtime.encoding" value="${source.encoding}"/>\r
<condition property="javadoc.encoding.used" value="${javadoc.encoding}">\r
<and>\r
<isset property="javadoc.encoding"/>\r
<condition property="do.depend.true">\r
<istrue value="${do.depend}"/>\r
</condition>\r
- <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">\r
- <and>\r
- <isset property="jaxws.endorsed.dir"/>\r
- <available file="nbproject/jaxws-build.xml"/>\r
- </and>\r
+ <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>\r
+ <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">\r
+ <length length="0" string="${endorsed.classpath}" when="greater"/>\r
</condition>\r
</target>\r
<target name="-post-init">\r
<attribute default="${includes}" name="includes"/>\r
<attribute default="${excludes}" name="excludes"/>\r
<attribute default="${javac.debug}" name="debug"/>\r
- <attribute default="/does/not/exist" name="sourcepath"/>\r
+ <attribute default="${empty.dir}" name="sourcepath"/>\r
+ <attribute default="${empty.dir}" name="gensrcdir"/>\r
<element name="customize" optional="true"/>\r
<sequential>\r
+ <property location="${build.dir}/empty" name="empty.dir"/>\r
+ <mkdir dir="${empty.dir}"/>\r
<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}">\r
+ <src>\r
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">\r
+ <include name="*"/>\r
+ </dirset>\r
+ </src>\r
<classpath>\r
<path path="@{classpath}"/>\r
</classpath>\r
- <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>\r
+ <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+ <compilerarg line="${javac.compilerargs}"/>\r
<customize/>\r
</javac>\r
</sequential>\r
</syspropertyset>\r
<formatter type="brief" usefile="false"/>\r
<formatter type="xml"/>\r
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
<jvmarg line="${run.jvmargs}"/>\r
</junit>\r
</sequential>\r
<element name="customize" optional="true"/>\r
<sequential>\r
<java classname="@{classname}" dir="${work.dir}" fork="true">\r
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
<jvmarg line="${debug-args-line}"/>\r
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>\r
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>\r
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>\r
<jvmarg line="${run.jvmargs}"/>\r
<classpath>\r
<path path="@{classpath}"/>\r
<target name="-init-macrodef-java">\r
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">\r
<attribute default="${main.class}" name="classname"/>\r
+ <attribute default="${run.classpath}" name="classpath"/>\r
<element name="customize" optional="true"/>\r
<sequential>\r
<java classname="@{classname}" dir="${work.dir}" fork="true">\r
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>\r
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>\r
<jvmarg line="${run.jvmargs}"/>\r
<classpath>\r
- <path path="${run.classpath}"/>\r
+ <path path="@{classpath}"/>\r
</classpath>\r
<syspropertyset>\r
<propertyref prefix="run-sys-prop."/>\r
COMPILATION SECTION\r
===================\r
-->\r
- <target depends="init" name="deps-jar" unless="no.deps"/>\r
+ <target name="-deps-jar-init" unless="built-jar.properties">\r
+ <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>\r
+ <delete file="${built-jar.properties}" quiet="true"/>\r
+ </target>\r
+ <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">\r
+ <mkdir dir="${build.dir}"/>\r
+ <touch file="${built-jar.properties}" verbose="false"/>\r
+ <property file="${built-jar.properties}" prefix="already.built.jar."/>\r
+ <fail message="Cycle detected: saccubus_frontend was already built">\r
+ <condition>\r
+ <isset property="already.built.jar.${basedir}"/>\r
+ </condition>\r
+ </fail>\r
+ <propertyfile file="${built-jar.properties}">\r
+ <entry key="${basedir}" value=""/>\r
+ </propertyfile>\r
+ </target>\r
<target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>\r
<target depends="init" name="-check-automatic-build">\r
<available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>\r
<!-- You can override this target in the ../build.xml file. -->\r
</target>\r
<target if="do.depend.true" name="-compile-depend">\r
- <j2seproject3:depend/>\r
+ <pathconvert property="build.generated.subdirs">\r
+ <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
+ <include name="*"/>\r
+ </dirset>\r
+ </pathconvert>\r
+ <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>\r
</target>\r
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">\r
- <j2seproject3:javac/>\r
+ <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>\r
<copy todir="${build.classes.dir}">\r
<fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
</copy>\r
<target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">\r
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>\r
<j2seproject3:force-recompile/>\r
- <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>\r
+ <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>\r
</target>\r
<target name="-post-compile-single">\r
<!-- Empty placeholder for easier customization. -->\r
<!-- Empty placeholder for easier customization. -->\r
<!-- You can override this target in the ../build.xml file. -->\r
</target>\r
- <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">\r
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">\r
<j2seproject1:jar/>\r
</target>\r
- <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">\r
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">\r
<j2seproject1:jar manifest="${manifest.file}"/>\r
</target>\r
<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">\r
<property location="${dist.jar}" name="dist.jar.resolved"/>\r
<echo>java -jar "${dist.jar.resolved}"</echo>\r
</target>\r
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">\r
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
+ <pathconvert property="run.classpath.without.build.classes.dir">\r
+ <path path="${run.classpath}"/>\r
+ <map from="${build.classes.dir.resolved}" to=""/>\r
+ </pathconvert>\r
+ <pathconvert pathsep=" " property="jar.classpath">\r
+ <path path="${run.classpath.without.build.classes.dir}"/>\r
+ <chainedmapper>\r
+ <flattenmapper/>\r
+ <globmapper from="*" to="lib/*"/>\r
+ </chainedmapper>\r
+ </pathconvert>\r
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>\r
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">\r
+ <fileset dir="${build.classes.dir}"/>\r
+ <manifest>\r
+ <attribute name="Class-Path" value="${jar.classpath}"/>\r
+ </manifest>\r
+ </copylibs>\r
+ </target>\r
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">\r
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
+ <pathconvert property="run.classpath.without.build.classes.dir">\r
+ <path path="${run.classpath}"/>\r
+ <map from="${build.classes.dir.resolved}" to=""/>\r
+ </pathconvert>\r
+ <pathconvert pathsep=" " property="jar.classpath">\r
+ <path path="${run.classpath.without.build.classes.dir}"/>\r
+ <chainedmapper>\r
+ <flattenmapper/>\r
+ <globmapper from="*" to="lib/*"/>\r
+ </chainedmapper>\r
+ </pathconvert>\r
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>\r
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">\r
+ <fileset dir="${build.classes.dir}"/>\r
+ <manifest>\r
+ <attribute name="Class-Path" value="${jar.classpath}"/>\r
+ </manifest>\r
+ </copylibs>\r
+ </target>\r
<target name="-post-jar">\r
<!-- Empty placeholder for easier customization. -->\r
<!-- You can override this target in the ../build.xml file. -->\r
</target>\r
- <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"/>\r
+ <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>\r
<!--\r
=================\r
EXECUTION SECTION\r
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
<j2seproject1:java classname="${run.class}"/>\r
</target>\r
+ <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">\r
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
+ <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>\r
+ </target>\r
<!--\r
=================\r
DEBUGGING SECTION\r
<target depends="init" if="netbeans.home" name="-debug-start-debugger">\r
<j2seproject1:nbjpdastart name="${debug.class}"/>\r
</target>\r
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">\r
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>\r
+ </target>\r
<target depends="init,compile" name="-debug-start-debuggee">\r
<j2seproject3:debug>\r
<customize>\r
<j2seproject3:debug classname="${debug.class}"/>\r
</target>\r
<target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>\r
+ <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">\r
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>\r
+ <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>\r
+ </target>\r
+ <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>\r
<target depends="init" name="-pre-debug-fix">\r
<fail unless="fix.includes">Must set fix.includes</fail>\r
<property name="javac.includes" value="${fix.includes}.java"/>\r
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">\r
<filename name="**/*.java"/>\r
</fileset>\r
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
+ <include name="**/*.java"/>\r
+ </fileset>\r
</javadoc>\r
</target>\r
<target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">\r
<j2seproject3:junit testincludes="**/*Test.java"/>\r
</target>\r
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">\r
- <fail if="tests.failed">Some tests failed; see details above.</fail>\r
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>\r
</target>\r
<target depends="init" if="have.tests" name="test-report"/>\r
<target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>\r
<j2seproject3:junit excludes="" includes="${test.includes}"/>\r
</target>\r
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">\r
- <fail if="tests.failed">Some tests failed; see details above.</fail>\r
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>\r
</target>\r
<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"/>\r
<!--\r
CLEANUP SECTION\r
===============\r
-->\r
- <target depends="init" name="deps-clean" unless="no.deps"/>\r
+ <target name="-deps-clean-init" unless="built-clean.properties">\r
+ <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>\r
+ <delete file="${built-clean.properties}" quiet="true"/>\r
+ </target>\r
+ <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">\r
+ <mkdir dir="${build.dir}"/>\r
+ <touch file="${built-clean.properties}" verbose="false"/>\r
+ <property file="${built-clean.properties}" prefix="already.built.clean."/>\r
+ <fail message="Cycle detected: saccubus_frontend was already built">\r
+ <condition>\r
+ <isset property="already.built.clean.${basedir}"/>\r
+ </condition>\r
+ </fail>\r
+ <propertyfile file="${built-clean.properties}">\r
+ <entry key="${basedir}" value=""/>\r
+ </propertyfile>\r
+ </target>\r
<target depends="init" name="-do-clean">\r
<delete dir="${build.dir}"/>\r
<delete dir="${dist.dir}"/>\r
<!-- You can override this target in the ../build.xml file. -->\r
</target>\r
<target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>\r
+ <target name="-check-call-dep">\r
+ <property file="${call.built.properties}" prefix="already.built."/>\r
+ <condition property="should.call.dep">\r
+ <not>\r
+ <isset property="already.built.${call.subproject}"/>\r
+ </not>\r
+ </condition>\r
+ </target>\r
+ <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">\r
+ <ant antfile="${call.script}" inheritall="false" target="${call.target}">\r
+ <propertyset>\r
+ <propertyref prefix="transfer."/>\r
+ <mapper from="transfer.*" to="*" type="glob"/>\r
+ </propertyset>\r
+ </ant>\r
+ </target>\r
</project>\r