|
|
|
|
@@ -44,36 +44,6 @@ is divided into following sections:
|
|
|
|
|
<property file="nbproject/project.properties"/>
|
|
|
|
|
</target>
|
|
|
|
|
<target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
|
|
|
|
|
<j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/>
|
|
|
|
|
<j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/>
|
|
|
|
|
<j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/>
|
|
|
|
|
<j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/>
|
|
|
|
|
<condition property="platform.javac" value="${platform.home}/bin/javac">
|
|
|
|
|
<equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/>
|
|
|
|
|
</condition>
|
|
|
|
|
<property name="platform.javac" value="${platform.javac.tmp}"/>
|
|
|
|
|
<j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/>
|
|
|
|
|
<condition property="platform.java" value="${platform.home}/bin/java">
|
|
|
|
|
<equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/>
|
|
|
|
|
</condition>
|
|
|
|
|
<property name="platform.java" value="${platform.java.tmp}"/>
|
|
|
|
|
<j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/>
|
|
|
|
|
<condition property="platform.javadoc" value="${platform.home}/bin/javadoc">
|
|
|
|
|
<equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/>
|
|
|
|
|
</condition>
|
|
|
|
|
<property name="platform.javadoc" value="${platform.javadoc.tmp}"/>
|
|
|
|
|
<condition property="platform.invalid" value="true">
|
|
|
|
|
<or>
|
|
|
|
|
<contains string="${platform.javac}" substring="$${platforms."/>
|
|
|
|
|
<contains string="${platform.java}" substring="$${platforms."/>
|
|
|
|
|
<contains string="${platform.javadoc}" substring="$${platforms."/>
|
|
|
|
|
</or>
|
|
|
|
|
</condition>
|
|
|
|
|
<fail unless="platform.home">Must set platform.home</fail>
|
|
|
|
|
<fail unless="platform.bootcp">Must set platform.bootcp</fail>
|
|
|
|
|
<fail unless="platform.java">Must set platform.java</fail>
|
|
|
|
|
<fail unless="platform.javac">Must set platform.javac</fail>
|
|
|
|
|
<fail if="platform.invalid">Platform is not correctly set up</fail>
|
|
|
|
|
<available file="${manifest.file}" property="manifest.available"/>
|
|
|
|
|
<condition property="manifest.available+main.class">
|
|
|
|
|
<and>
|
|
|
|
|
@@ -95,6 +65,7 @@ is divided into following sections:
|
|
|
|
|
</condition>
|
|
|
|
|
<condition property="have.sources">
|
|
|
|
|
<or>
|
|
|
|
|
<available file="${src.classes.dir}"/>
|
|
|
|
|
<available file="${src.EmptyMainClass.dir}"/>
|
|
|
|
|
<available file="${src.java.dir}"/>
|
|
|
|
|
<available file="${src.java2.dir}"/>
|
|
|
|
|
@@ -125,6 +96,7 @@ is divided into following sections:
|
|
|
|
|
<!-- You can override this target in the ../build.xml file. -->
|
|
|
|
|
</target>
|
|
|
|
|
<target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
|
|
|
|
|
<fail unless="src.classes.dir">Must set src.classes.dir</fail>
|
|
|
|
|
<fail unless="src.EmptyMainClass.dir">Must set src.EmptyMainClass.dir</fail>
|
|
|
|
|
<fail unless="src.java.dir">Must set src.java.dir</fail>
|
|
|
|
|
<fail unless="src.java2.dir">Must set src.java2.dir</fail>
|
|
|
|
|
@@ -148,13 +120,13 @@ is divided into following sections:
|
|
|
|
|
</target>
|
|
|
|
|
<target name="-init-macrodef-javac">
|
|
|
|
|
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
|
|
|
|
|
<attribute name="srcdir" default="${src.EmptyMainClass.dir}:${src.java.dir}:${src.java2.dir}"/>
|
|
|
|
|
<attribute name="srcdir" default="${src.classes.dir}:${src.EmptyMainClass.dir}:${src.java.dir}:${src.java2.dir}"/>
|
|
|
|
|
<attribute name="destdir" default="${build.classes.dir}"/>
|
|
|
|
|
<attribute name="classpath" default="${javac.classpath}"/>
|
|
|
|
|
<attribute name="debug" default="${javac.debug}"/>
|
|
|
|
|
<element name="customize" optional="true"/>
|
|
|
|
|
<sequential>
|
|
|
|
|
<javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" fork="yes" executable="${platform.javac}" tempdir="${java.io.tmpdir}" includeantruntime="false">
|
|
|
|
|
<javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
|
|
|
|
|
<classpath>
|
|
|
|
|
<path path="@{classpath}"/>
|
|
|
|
|
</classpath>
|
|
|
|
|
@@ -168,7 +140,7 @@ is divided into following sections:
|
|
|
|
|
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
|
|
|
|
<attribute name="includes" default="**/*Test.java"/>
|
|
|
|
|
<sequential>
|
|
|
|
|
<junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed" jvm="${platform.java}">
|
|
|
|
|
<junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
|
|
|
|
|
<batchtest todir="${build.test.results.dir}"/>
|
|
|
|
|
<classpath>
|
|
|
|
|
<path path="${run.test.classpath}"/>
|
|
|
|
|
@@ -194,9 +166,6 @@ is divided into following sections:
|
|
|
|
|
<classpath>
|
|
|
|
|
<path path="@{classpath}"/>
|
|
|
|
|
</classpath>
|
|
|
|
|
<bootclasspath>
|
|
|
|
|
<path path="${platform.bootcp}"/>
|
|
|
|
|
</bootclasspath>
|
|
|
|
|
</nbjpdastart>
|
|
|
|
|
</sequential>
|
|
|
|
|
</macrodef>
|
|
|
|
|
@@ -215,7 +184,7 @@ is divided into following sections:
|
|
|
|
|
<attribute name="classpath" default="${debug.classpath}"/>
|
|
|
|
|
<element name="customize" optional="true"/>
|
|
|
|
|
<sequential>
|
|
|
|
|
<java fork="true" classname="@{classname}" dir="${work.dir}" jvm="${platform.java}">
|
|
|
|
|
<java fork="true" classname="@{classname}" dir="${work.dir}">
|
|
|
|
|
<jvmarg value="-Xdebug"/>
|
|
|
|
|
<jvmarg value="-Xnoagent"/>
|
|
|
|
|
<jvmarg value="-Djava.compiler=none"/>
|
|
|
|
|
@@ -238,7 +207,7 @@ is divided into following sections:
|
|
|
|
|
<attribute name="classname" default="${main.class}"/>
|
|
|
|
|
<element name="customize" optional="true"/>
|
|
|
|
|
<sequential>
|
|
|
|
|
<java fork="true" classname="@{classname}" dir="${work.dir}" jvm="${platform.java}">
|
|
|
|
|
<java fork="true" classname="@{classname}" dir="${work.dir}">
|
|
|
|
|
<jvmarg line="${run.jvmargs}"/>
|
|
|
|
|
<classpath>
|
|
|
|
|
<path path="${run.classpath}"/>
|
|
|
|
|
@@ -276,6 +245,7 @@ is divided into following sections:
|
|
|
|
|
<target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
|
|
|
|
|
<j2seproject3:javac/>
|
|
|
|
|
<copy todir="${build.classes.dir}">
|
|
|
|
|
<fileset dir="${src.classes.dir}" excludes="${build.classes.excludes}"/>
|
|
|
|
|
<fileset dir="${src.EmptyMainClass.dir}" excludes="${build.classes.excludes}"/>
|
|
|
|
|
<fileset dir="${src.java.dir}" excludes="${build.classes.excludes}"/>
|
|
|
|
|
<fileset dir="${src.java2.dir}" excludes="${build.classes.excludes}"/>
|
|
|
|
|
@@ -335,7 +305,7 @@ is divided into following sections:
|
|
|
|
|
<path path="${run.classpath}"/>
|
|
|
|
|
<map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
|
|
|
|
|
</pathconvert>
|
|
|
|
|
<echo>${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
|
|
|
|
|
<echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
|
|
|
|
|
</target>
|
|
|
|
|
<target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
|
|
|
|
|
<property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
|
|
|
|
|
@@ -360,7 +330,7 @@ is divided into following sections:
|
|
|
|
|
</copylibs>
|
|
|
|
|
<echo>To run this application from the command line without Ant, try:</echo>
|
|
|
|
|
<property name="dist.jar.resolved" location="${dist.jar}"/>
|
|
|
|
|
<echo>${platform.java} -jar "${dist.jar.resolved}"</echo>
|
|
|
|
|
<echo>java -jar "${dist.jar.resolved}"</echo>
|
|
|
|
|
</target>
|
|
|
|
|
<target name="-post-jar">
|
|
|
|
|
<!-- Empty placeholder for easier customization. -->
|
|
|
|
|
@@ -423,18 +393,21 @@ is divided into following sections:
|
|
|
|
|
-->
|
|
|
|
|
<target name="-javadoc-build" depends="init">
|
|
|
|
|
<mkdir dir="${dist.javadoc.dir}"/>
|
|
|
|
|
<javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true" executable="${platform.javadoc}">
|
|
|
|
|
<javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
|
|
|
|
|
<classpath>
|
|
|
|
|
<path path="${javac.classpath}"/>
|
|
|
|
|
</classpath>
|
|
|
|
|
<sourcepath>
|
|
|
|
|
<pathelement location="${src.classes.dir}"/>
|
|
|
|
|
<pathelement location="${src.EmptyMainClass.dir}"/>
|
|
|
|
|
<pathelement location="${src.java.dir}"/>
|
|
|
|
|
<pathelement location="${src.java2.dir}"/>
|
|
|
|
|
</sourcepath>
|
|
|
|
|
<packageset dir="${src.classes.dir}" includes="*/**"/>
|
|
|
|
|
<packageset dir="${src.EmptyMainClass.dir}" includes="*/**"/>
|
|
|
|
|
<packageset dir="${src.java.dir}" includes="*/**"/>
|
|
|
|
|
<packageset dir="${src.java2.dir}" includes="*/**"/>
|
|
|
|
|
<fileset dir="${src.classes.dir}" includes="*.java"/>
|
|
|
|
|
<fileset dir="${src.EmptyMainClass.dir}" includes="*.java"/>
|
|
|
|
|
<fileset dir="${src.java.dir}" includes="*.java"/>
|
|
|
|
|
<fileset dir="${src.java2.dir}" includes="*.java"/>
|
|
|
|
|
|