\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="NicoBrowser-impl">\r
- <import file="jnlp-impl.xml"/>\r
<import file="groovy-build.xml"/>\r
+ <import file="jnlp-impl.xml"/>\r
<fail message="Please build using Ant 1.7.1 or higher.">\r
<condition>\r
<not>\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
<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=${source.encoding}"/>\r
- <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>\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
<element name="customize" optional="true"/>\r
<sequential>\r
<java classname="@{classname}" dir="${work.dir}" fork="true">\r
- <jvmarg value="-Dfile.encoding=${source.encoding}"/>\r
- <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>\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="@{classpath}"/>\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: NicoBrowser 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
<!-- 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="libs.CopyLibs.classpath" name="-do-jar-with-libraries-without-manifest" unless="manifest.available+main.class">\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
<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,-do-jar-with-libraries-without-manifest,-post-jar,jnlp" 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,jnlp" description="Build JAR." name="jar"/>\r
<!--\r
=================\r
EXECUTION SECTION\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: NicoBrowser 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