Fixing dependencies since the org.openide.util and org.openide.util.lookup are now separate
1.1 --- a/samples/aserverinfo/nbproject/project.properties Thu Dec 17 07:37:54 2009 +0100
1.2 +++ b/samples/aserverinfo/nbproject/project.properties Mon Dec 21 16:54:12 2009 +0100
1.3 @@ -19,11 +19,11 @@
1.4 file.reference.junit-4.4.jar=../libs/dist/junit-4.4.jar
1.5 file.reference.org-netbeans-insane.jar=../libs/dist/org-netbeans-insane.jar
1.6 file.reference.org-netbeans-modules-nbjunit.jar=../libs/dist/org-netbeans-modules-nbjunit.jar
1.7 -file.reference.org-openide-util.jar=../libs/dist/org-openide-util.jar
1.8 +file.reference.org-openide-util-lookup.jar=../libs/dist/org-openide-util-lookup.jar
1.9 includes=**
1.10 jar.compress=false
1.11 javac.classpath=\
1.12 - ${file.reference.org-openide-util.jar}
1.13 + ${file.reference.org-openide-util-lookup.jar}
1.14 # Space-separated list of extra javac options
1.15 javac.compilerargs=
1.16 javac.deprecation=false
2.1 --- a/samples/aserverinfo/test/org/apidesign/aserverinfo/test/BuilderFactoryTest.java Thu Dec 17 07:37:54 2009 +0100
2.2 +++ b/samples/aserverinfo/test/org/apidesign/aserverinfo/test/BuilderFactoryTest.java Mon Dec 21 16:54:12 2009 +0100
2.3 @@ -2,6 +2,8 @@
2.4
2.5 import java.net.MalformedURLException;
2.6 import java.net.URL;
2.7 +import java.util.logging.Level;
2.8 +import java.util.logging.Logger;
2.9 import org.apidesign.aserverinfo.builder.ServerConnector;
2.10 import org.apidesign.aserverinfo.builder.ServerInfo;
2.11 import org.apidesign.aserverinfo.spi.NameProvider;
2.12 @@ -11,7 +13,6 @@
2.13 import org.junit.Before;
2.14 import org.junit.Test;
2.15 import static org.junit.Assert.*;
2.16 -import org.openide.util.Exceptions;
2.17
2.18 public class BuilderFactoryTest {
2.19
2.20 @@ -78,7 +79,7 @@
2.21 try {
2.22 return new URL("http://www.apidesign.org");
2.23 } catch (MalformedURLException ex) {
2.24 - Exceptions.printStackTrace(ex);
2.25 + Logger.getLogger(BuilderFactoryTest.class.getName()).log(Level.SEVERE, null, ex);
2.26 return null;
2.27 }
2.28 }
3.1 --- a/samples/aserverinfo/test/org/apidesign/aserverinfo/test/CummulativeFactoryTest.java Thu Dec 17 07:37:54 2009 +0100
3.2 +++ b/samples/aserverinfo/test/org/apidesign/aserverinfo/test/CummulativeFactoryTest.java Mon Dec 21 16:54:12 2009 +0100
3.3 @@ -1,5 +1,7 @@
3.4 package org.apidesign.aserverinfo.test;
3.5
3.6 +import java.util.logging.Logger;
3.7 +import java.util.logging.Level;
3.8 import java.net.MalformedURLException;
3.9 import java.net.URL;
3.10 import org.apidesign.aserverinfo.cummulativefactory.ServerConnector;
3.11 @@ -10,7 +12,6 @@
3.12 import org.junit.Before;
3.13 import org.junit.Test;
3.14 import static org.junit.Assert.*;
3.15 -import org.openide.util.Exceptions;
3.16
3.17 public class CummulativeFactoryTest {
3.18
3.19 @@ -75,7 +76,7 @@
3.20 try {
3.21 return new URL("http://www.apidesign.org");
3.22 } catch (MalformedURLException ex) {
3.23 - Exceptions.printStackTrace(ex);
3.24 + Logger.getLogger(CummulativeFactoryTest.class.getName()).log(Level.SEVERE, null, ex);
3.25 return null;
3.26 }
3.27 }
4.1 --- a/samples/aserverinfo/test/org/apidesign/aserverinfo/test/FactoriesTest.java Thu Dec 17 07:37:54 2009 +0100
4.2 +++ b/samples/aserverinfo/test/org/apidesign/aserverinfo/test/FactoriesTest.java Mon Dec 21 16:54:12 2009 +0100
4.3 @@ -1,5 +1,7 @@
4.4 package org.apidesign.aserverinfo.test;
4.5
4.6 +import java.util.logging.Logger;
4.7 +import java.util.logging.Level;
4.8 import java.net.MalformedURLException;
4.9 import java.net.URL;
4.10 import org.apidesign.aserverinfo.factories.ServerConnector;
4.11 @@ -11,7 +13,6 @@
4.12 import org.junit.Before;
4.13 import org.junit.Test;
4.14 import static org.junit.Assert.*;
4.15 -import org.openide.util.Exceptions;
4.16
4.17 public class FactoriesTest {
4.18
4.19 @@ -79,7 +80,7 @@
4.20 try {
4.21 return new URL("http://www.apidesign.org");
4.22 } catch (MalformedURLException ex) {
4.23 - Exceptions.printStackTrace(ex);
4.24 + Logger.getLogger(FactoriesTest.class.getName()).log(Level.SEVERE, null, ex);
4.25 return null;
4.26 }
4.27 }
5.1 --- a/samples/aserverinfo/test/org/apidesign/aserverinfo/test/MagicalBagFactoryTest.java Thu Dec 17 07:37:54 2009 +0100
5.2 +++ b/samples/aserverinfo/test/org/apidesign/aserverinfo/test/MagicalBagFactoryTest.java Mon Dec 21 16:54:12 2009 +0100
5.3 @@ -2,6 +2,8 @@
5.4
5.5 import java.net.MalformedURLException;
5.6 import java.net.URL;
5.7 +import java.util.logging.Level;
5.8 +import java.util.logging.Logger;
5.9 import org.apidesign.aserverinfo.magicalbagfactory.ServerConnector;
5.10 import org.apidesign.aserverinfo.spi.NameProvider;
5.11 import org.apidesign.aserverinfo.spi.ResetHandler;
5.12 @@ -10,7 +12,6 @@
5.13 import org.junit.Before;
5.14 import org.junit.Test;
5.15 import static org.junit.Assert.*;
5.16 -import org.openide.util.Exceptions;
5.17 import org.openide.util.Lookup;
5.18 import org.openide.util.lookup.AbstractLookup;
5.19 import org.openide.util.lookup.InstanceContent;
5.20 @@ -65,7 +66,7 @@
5.21 try {
5.22 return new URL("http://www.apidesign.org");
5.23 } catch (MalformedURLException ex) {
5.24 - Exceptions.printStackTrace(ex);
5.25 + Logger.getLogger(MagicalBagFactoryTest.class.getName()).log(Level.SEVERE, null, ex);
5.26 return null;
5.27 }
5.28 }
6.1 --- a/samples/componentinjection/anagram-modular/build.xml Thu Dec 17 07:37:54 2009 +0100
6.2 +++ b/samples/componentinjection/anagram-modular/build.xml Mon Dec 21 16:54:12 2009 +0100
6.3 @@ -12,11 +12,11 @@
6.4 </antcall>
6.5 <antcall target="-build-one">
6.6 <param name="version" value="api-compiletimecaches"/>
6.7 - <param name="cp" value="build/api/classes:../../libs/dist/org-openide-util.jar:../../libs/dist/org-openide-filesystems.jar"/>
6.8 + <param name="cp" value="build/api/classes:../../libs/dist/org-openide-util-lookup.jar:../../libs/dist/org-openide-filesystems.jar"/>
6.9 </antcall>
6.10 <antcall target="-build-one">
6.11 <param name="version" value="word-annotated"/>
6.12 - <param name="cp" value="build/api/classes:build/api-compiletimecaches/classes:../../libs/dist/org-openide-util.jar:../../libs/dist/org-openide-filesystems.jar"/>
6.13 + <param name="cp" value="build/api/classes:build/api-compiletimecaches/classes:../../libs/dist/org-openide-util.jar:../../libs/dist/org-openide-util-lookup.jar:../../libs/dist/org-openide-filesystems.jar"/>
6.14 </antcall>
6.15 <antcall target="-build-one">
6.16 <param name="version" value="word-static"/>
6.17 @@ -49,7 +49,7 @@
6.18 </antcall>
6.19 <antcall target="-build-one">
6.20 <param name="version" value="app-lookup"/>
6.21 - <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/org-openide-util.jar"/>
6.22 + <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/org-openide-util-lookup.jar"/>
6.23 </antcall>
6.24 <antcall target="-build-one">
6.25 <param name="version" value="app-serviceloader"/>
6.26 @@ -96,7 +96,7 @@
6.27 <echo level="info" message="Running lookup version"/>
6.28 <antcall target="-run-one">
6.29 <param name="version" value="app-lookup"/>
6.30 - <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/org-openide-util.jar"/>
6.31 + <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/org-openide-util-lookup.jar"/>
6.32 <param name="main" value="org.apidesign.anagram.app.lookup.Main"/>
6.33 </antcall>
6.34 <antcall target="-run-one">
6.35 @@ -107,7 +107,7 @@
6.36 <echo level="info" message="Running @Words annotation version"/>
6.37 <antcall target="-run-one">
6.38 <param name="version" value="app-lookup"/>
6.39 - <param name="cp" value="build/api/classes:build/word-annotated/classes:build/api-compiletimecaches/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/org-openide-util.jar:../../libs/dist/org-openide-filesystems.jar"/>
6.40 + <param name="cp" value="build/api/classes:build/word-annotated/classes:build/api-compiletimecaches/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/org-openide-util-lookup.jar:../../libs/dist/org-openide-util:../../libs/dist/org-openide-filesystems.jar"/>
6.41 <param name="main" value="org.apidesign.anagram.app.lookup.Main"/>
6.42 </antcall>
6.43 </target>
6.44 @@ -116,7 +116,7 @@
6.45 <echo level="info" message="Testing using MockServices"/>
6.46 <antcall target="-test-one">
6.47 <param name="version" value="app-test"/>
6.48 - <param name="cp" value="build/api/classes:build/gui/classes:build/app-serviceloader/classes:build/app-lookup/classes:${junit.jar}:${nbjunit.jar}:${insane.jar}:../../libs/dist/org-openide-util.jar"/>
6.49 + <param name="cp" value="build/api/classes:build/gui/classes:build/app-serviceloader/classes:build/app-lookup/classes:${junit.jar}:${nbjunit.jar}:${insane.jar}:../../libs/dist/org-openide-util-lookup.jar"/>
6.50 </antcall>
6.51 </target>
6.52
7.1 --- a/samples/componentinjection/anagram-modular/nbproject/project.xml Thu Dec 17 07:37:54 2009 +0100
7.2 +++ b/samples/componentinjection/anagram-modular/nbproject/project.xml Mon Dec 21 16:54:12 2009 +0100
7.3 @@ -274,13 +274,13 @@
7.4 </compilation-unit>
7.5 <compilation-unit>
7.6 <package-root>src-api-compiletimecaches</package-root>
7.7 - <classpath mode="compile">src-api:../../libs/dist/org-openide-filesystems.jar:../../libs/dist/org-openide-util.jar</classpath>
7.8 + <classpath mode="compile">src-api:../../libs/dist/org-openide-filesystems.jar:../../libs/dist/org-openide-util-lookup.jar</classpath>
7.9 <built-to>build/api-compiletimecaches/classes</built-to>
7.10 <source-level>1.5</source-level>
7.11 </compilation-unit>
7.12 <compilation-unit>
7.13 <package-root>src-word-annotated</package-root>
7.14 - <classpath mode="compile">src-api:src-api-compiletimecaches:../../libs/dist/org-openide-filesystems.jar:../../libs/dist/org-openide-util.jar</classpath>
7.15 + <classpath mode="compile">src-api:src-api-compiletimecaches:../../libs/dist/org-openide-filesystems.jar:../../libs/dist/org-openide-util-lookup.jar</classpath>
7.16 <built-to>build/word-annotated/classes</built-to>
7.17 <source-level>1.5</source-level>
7.18 </compilation-unit>
7.19 @@ -334,7 +334,7 @@
7.20 </compilation-unit>
7.21 <compilation-unit>
7.22 <package-root>src-app-lookup</package-root>
7.23 - <classpath mode="compile">src-api:src-scrambler-simple:src-word-static:src-gui:../../libs/dist/org-openide-util.jar</classpath>
7.24 + <classpath mode="compile">src-api:src-scrambler-simple:src-word-static:src-gui:../../libs/dist/org-openide-util-lookup.jar</classpath>
7.25 <built-to>build/app-lookup/classes</built-to>
7.26 <source-level>1.5</source-level>
7.27 </compilation-unit>
7.28 @@ -346,7 +346,7 @@
7.29 </compilation-unit>
7.30 <compilation-unit>
7.31 <package-root>src-test</package-root>
7.32 - <classpath mode="compile">src-api:../../libs/dist/junit-4.4.jar::../../libs/dist/org-netbeans-modules-nbjunit.jar:../../libs/dist/org-netbeans-insane.jar:src-gui:../../libs/dist/org-openide-util.jar:src-app-lookup:src-app-serviceloader</classpath>
7.33 + <classpath mode="compile">src-api:../../libs/dist/junit-4.4.jar::../../libs/dist/org-netbeans-modules-nbjunit.jar:../../libs/dist/org-netbeans-insane.jar:src-gui:../../libs/dist/org-openide-util-lookup.jar:src-app-lookup:src-app-serviceloader</classpath>
7.34 <source-level>1.5</source-level>
7.35 </compilation-unit>
7.36 </java-data>
8.1 --- a/samples/extensibleicon/build.xml Thu Dec 17 07:37:54 2009 +0100
8.2 +++ b/samples/extensibleicon/build.xml Mon Dec 21 16:54:12 2009 +0100
8.3 @@ -2,6 +2,11 @@
8.4 <!-- You may freely edit this file. See commented blocks below for -->
8.5 <!-- some examples of how to customize the build. -->
8.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
8.7 +<!-- By default, only the Clean and Build commands use this build script. -->
8.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
8.9 +<!-- the Compile on Save feature is turned off for the project. -->
8.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
8.11 +<!-- in the project's Project Properties dialog box.-->
8.12 <project name="extensibleicon" default="default" basedir=".">
8.13 <description>Builds, tests, and runs the project extensibleicon.</description>
8.14 <import file="nbproject/build-impl.xml"/>
9.1 --- a/samples/extensibleicon/nbproject/build-impl.xml Thu Dec 17 07:37:54 2009 +0100
9.2 +++ b/samples/extensibleicon/nbproject/build-impl.xml Mon Dec 21 16:54:12 2009 +0100
9.3 @@ -20,6 +20,13 @@
9.4
9.5 -->
9.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="extensibleicon-impl">
9.7 + <fail message="Please build using Ant 1.7.1 or higher.">
9.8 + <condition>
9.9 + <not>
9.10 + <antversion atleast="1.7.1"/>
9.11 + </not>
9.12 + </condition>
9.13 + </fail>
9.14 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
9.15 <!--
9.16 ======================
9.17 @@ -48,21 +55,52 @@
9.18 </target>
9.19 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
9.20 <available file="${manifest.file}" property="manifest.available"/>
9.21 - <condition property="manifest.available+main.class">
9.22 + <condition property="main.class.available">
9.23 <and>
9.24 - <isset property="manifest.available"/>
9.25 <isset property="main.class"/>
9.26 <not>
9.27 <equals arg1="${main.class}" arg2="" trim="true"/>
9.28 </not>
9.29 </and>
9.30 </condition>
9.31 + <condition property="manifest.available+main.class">
9.32 + <and>
9.33 + <isset property="manifest.available"/>
9.34 + <isset property="main.class.available"/>
9.35 + </and>
9.36 + </condition>
9.37 + <condition property="do.mkdist">
9.38 + <and>
9.39 + <isset property="libs.CopyLibs.classpath"/>
9.40 + <not>
9.41 + <istrue value="${mkdist.disabled}"/>
9.42 + </not>
9.43 + </and>
9.44 + </condition>
9.45 <condition property="manifest.available+main.class+mkdist.available">
9.46 <and>
9.47 <istrue value="${manifest.available+main.class}"/>
9.48 - <isset property="libs.CopyLibs.classpath"/>
9.49 + <isset property="do.mkdist"/>
9.50 </and>
9.51 </condition>
9.52 + <condition property="manifest.available+mkdist.available">
9.53 + <and>
9.54 + <istrue value="${manifest.available}"/>
9.55 + <isset property="do.mkdist"/>
9.56 + </and>
9.57 + </condition>
9.58 + <condition property="manifest.available-mkdist.available">
9.59 + <or>
9.60 + <istrue value="${manifest.available}"/>
9.61 + <isset property="do.mkdist"/>
9.62 + </or>
9.63 + </condition>
9.64 + <condition property="manifest.available+main.class-mkdist.available">
9.65 + <or>
9.66 + <istrue value="${manifest.available+main.class}"/>
9.67 + <isset property="do.mkdist"/>
9.68 + </or>
9.69 + </condition>
9.70 <condition property="have.tests">
9.71 <or>
9.72 <available file="${test.src.dir}"/>
9.73 @@ -97,6 +135,7 @@
9.74 <property name="javadoc.preview" value="true"/>
9.75 <property name="application.args" value=""/>
9.76 <property name="source.encoding" value="${file.encoding}"/>
9.77 + <property name="runtime.encoding" value="${source.encoding}"/>
9.78 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
9.79 <and>
9.80 <isset property="javadoc.encoding"/>
9.81 @@ -112,12 +151,11 @@
9.82 <condition property="do.depend.true">
9.83 <istrue value="${do.depend}"/>
9.84 </condition>
9.85 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
9.86 - <and>
9.87 - <isset property="jaxws.endorsed.dir"/>
9.88 - <available file="nbproject/jaxws-build.xml"/>
9.89 - </and>
9.90 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
9.91 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
9.92 + <length length="0" string="${endorsed.classpath}" when="greater"/>
9.93 </condition>
9.94 + <property name="javac.fork" value="false"/>
9.95 </target>
9.96 <target name="-post-init">
9.97 <!-- Empty placeholder for easier customization. -->
9.98 @@ -152,14 +190,23 @@
9.99 <attribute default="${includes}" name="includes"/>
9.100 <attribute default="${excludes}" name="excludes"/>
9.101 <attribute default="${javac.debug}" name="debug"/>
9.102 - <attribute default="" name="sourcepath"/>
9.103 + <attribute default="${empty.dir}" name="sourcepath"/>
9.104 + <attribute default="${empty.dir}" name="gensrcdir"/>
9.105 <element name="customize" optional="true"/>
9.106 <sequential>
9.107 - <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}">
9.108 + <property location="${build.dir}/empty" name="empty.dir"/>
9.109 + <mkdir dir="${empty.dir}"/>
9.110 + <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}">
9.111 + <src>
9.112 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
9.113 + <include name="*"/>
9.114 + </dirset>
9.115 + </src>
9.116 <classpath>
9.117 <path path="@{classpath}"/>
9.118 </classpath>
9.119 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
9.120 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
9.121 + <compilerarg line="${javac.compilerargs}"/>
9.122 <customize/>
9.123 </javac>
9.124 </sequential>
9.125 @@ -198,7 +245,7 @@
9.126 <attribute default="${excludes}" name="excludes"/>
9.127 <attribute default="**" name="testincludes"/>
9.128 <sequential>
9.129 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
9.130 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
9.131 <batchtest todir="${build.test.results.dir}">
9.132 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
9.133 <filename name="@{testincludes}"/>
9.134 @@ -213,18 +260,19 @@
9.135 </syspropertyset>
9.136 <formatter type="brief" usefile="false"/>
9.137 <formatter type="xml"/>
9.138 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
9.139 <jvmarg line="${run.jvmargs}"/>
9.140 </junit>
9.141 </sequential>
9.142 </macrodef>
9.143 </target>
9.144 - <target name="-init-macrodef-nbjpda">
9.145 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
9.146 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
9.147 <attribute default="${main.class}" name="name"/>
9.148 <attribute default="${debug.classpath}" name="classpath"/>
9.149 <attribute default="" name="stopclassname"/>
9.150 <sequential>
9.151 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
9.152 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
9.153 <classpath>
9.154 <path path="@{classpath}"/>
9.155 </classpath>
9.156 @@ -255,6 +303,12 @@
9.157 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
9.158 <istrue value="${have-jdk-older-than-1.4}"/>
9.159 </condition>
9.160 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
9.161 + <os family="windows"/>
9.162 + </condition>
9.163 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
9.164 + <isset property="debug.transport"/>
9.165 + </condition>
9.166 </target>
9.167 <target depends="-init-debug-args" name="-init-macrodef-debug">
9.168 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
9.169 @@ -263,8 +317,11 @@
9.170 <element name="customize" optional="true"/>
9.171 <sequential>
9.172 <java classname="@{classname}" dir="${work.dir}" fork="true">
9.173 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
9.174 <jvmarg line="${debug-args-line}"/>
9.175 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
9.176 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
9.177 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
9.178 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
9.179 <jvmarg line="${run.jvmargs}"/>
9.180 <classpath>
9.181 <path path="@{classpath}"/>
9.182 @@ -281,12 +338,16 @@
9.183 <target name="-init-macrodef-java">
9.184 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
9.185 <attribute default="${main.class}" name="classname"/>
9.186 + <attribute default="${run.classpath}" name="classpath"/>
9.187 <element name="customize" optional="true"/>
9.188 <sequential>
9.189 <java classname="@{classname}" dir="${work.dir}" fork="true">
9.190 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
9.191 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
9.192 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
9.193 <jvmarg line="${run.jvmargs}"/>
9.194 <classpath>
9.195 - <path path="${run.classpath}"/>
9.196 + <path path="@{classpath}"/>
9.197 </classpath>
9.198 <syspropertyset>
9.199 <propertyref prefix="run-sys-prop."/>
9.200 @@ -310,7 +371,29 @@
9.201 COMPILATION SECTION
9.202 ===================
9.203 -->
9.204 - <target depends="init" name="deps-jar" unless="no.deps"/>
9.205 + <target name="-deps-jar-init" unless="built-jar.properties">
9.206 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
9.207 + <delete file="${built-jar.properties}" quiet="true"/>
9.208 + </target>
9.209 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
9.210 + <echo level="warn" message="Cycle detected: extensibleicon was already built"/>
9.211 + </target>
9.212 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
9.213 + <mkdir dir="${build.dir}"/>
9.214 + <touch file="${built-jar.properties}" verbose="false"/>
9.215 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
9.216 + <antcall target="-warn-already-built-jar"/>
9.217 + <propertyfile file="${built-jar.properties}">
9.218 + <entry key="${basedir}" value=""/>
9.219 + </propertyfile>
9.220 + </target>
9.221 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
9.222 + <target depends="init" name="-check-automatic-build">
9.223 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
9.224 + </target>
9.225 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
9.226 + <antcall target="clean"/>
9.227 + </target>
9.228 <target depends="init,deps-jar" name="-pre-pre-compile">
9.229 <mkdir dir="${build.classes.dir}"/>
9.230 </target>
9.231 @@ -319,10 +402,15 @@
9.232 <!-- You can override this target in the ../build.xml file. -->
9.233 </target>
9.234 <target if="do.depend.true" name="-compile-depend">
9.235 - <j2seproject3:depend/>
9.236 + <pathconvert property="build.generated.subdirs">
9.237 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
9.238 + <include name="*"/>
9.239 + </dirset>
9.240 + </pathconvert>
9.241 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
9.242 </target>
9.243 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
9.244 - <j2seproject3:javac/>
9.245 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
9.246 <copy todir="${build.classes.dir}">
9.247 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
9.248 </copy>
9.249 @@ -331,7 +419,7 @@
9.250 <!-- Empty placeholder for easier customization. -->
9.251 <!-- You can override this target in the ../build.xml file. -->
9.252 </target>
9.253 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
9.254 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
9.255 <target name="-pre-compile-single">
9.256 <!-- Empty placeholder for easier customization. -->
9.257 <!-- You can override this target in the ../build.xml file. -->
9.258 @@ -339,13 +427,13 @@
9.259 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
9.260 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
9.261 <j2seproject3:force-recompile/>
9.262 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
9.263 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
9.264 </target>
9.265 <target name="-post-compile-single">
9.266 <!-- Empty placeholder for easier customization. -->
9.267 <!-- You can override this target in the ../build.xml file. -->
9.268 </target>
9.269 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
9.270 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
9.271 <!--
9.272 ====================
9.273 JAR BUILDING SECTION
9.274 @@ -359,10 +447,10 @@
9.275 <!-- Empty placeholder for easier customization. -->
9.276 <!-- You can override this target in the ../build.xml file. -->
9.277 </target>
9.278 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
9.279 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
9.280 <j2seproject1:jar/>
9.281 </target>
9.282 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
9.283 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
9.284 <j2seproject1:jar manifest="${manifest.file}"/>
9.285 </target>
9.286 <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">
9.287 @@ -405,11 +493,53 @@
9.288 <property location="${dist.jar}" name="dist.jar.resolved"/>
9.289 <echo>java -jar "${dist.jar.resolved}"</echo>
9.290 </target>
9.291 + <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">
9.292 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
9.293 + <pathconvert property="run.classpath.without.build.classes.dir">
9.294 + <path path="${run.classpath}"/>
9.295 + <map from="${build.classes.dir.resolved}" to=""/>
9.296 + </pathconvert>
9.297 + <pathconvert pathsep=" " property="jar.classpath">
9.298 + <path path="${run.classpath.without.build.classes.dir}"/>
9.299 + <chainedmapper>
9.300 + <flattenmapper/>
9.301 + <globmapper from="*" to="lib/*"/>
9.302 + </chainedmapper>
9.303 + </pathconvert>
9.304 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
9.305 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
9.306 + <fileset dir="${build.classes.dir}"/>
9.307 + <manifest>
9.308 + <attribute name="Class-Path" value="${jar.classpath}"/>
9.309 + </manifest>
9.310 + </copylibs>
9.311 + </target>
9.312 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
9.313 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
9.314 + <pathconvert property="run.classpath.without.build.classes.dir">
9.315 + <path path="${run.classpath}"/>
9.316 + <map from="${build.classes.dir.resolved}" to=""/>
9.317 + </pathconvert>
9.318 + <pathconvert pathsep=" " property="jar.classpath">
9.319 + <path path="${run.classpath.without.build.classes.dir}"/>
9.320 + <chainedmapper>
9.321 + <flattenmapper/>
9.322 + <globmapper from="*" to="lib/*"/>
9.323 + </chainedmapper>
9.324 + </pathconvert>
9.325 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
9.326 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
9.327 + <fileset dir="${build.classes.dir}"/>
9.328 + <manifest>
9.329 + <attribute name="Class-Path" value="${jar.classpath}"/>
9.330 + </manifest>
9.331 + </copylibs>
9.332 + </target>
9.333 <target name="-post-jar">
9.334 <!-- Empty placeholder for easier customization. -->
9.335 <!-- You can override this target in the ../build.xml file. -->
9.336 </target>
9.337 - <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"/>
9.338 + <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"/>
9.339 <!--
9.340 =================
9.341 EXECUTION SECTION
9.342 @@ -425,10 +555,14 @@
9.343 <target name="-do-not-recompile">
9.344 <property name="javac.includes.binary" value=""/>
9.345 </target>
9.346 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
9.347 + <target depends="init,compile-single" name="run-single">
9.348 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
9.349 <j2seproject1:java classname="${run.class}"/>
9.350 </target>
9.351 + <target depends="init,compile-test-single" name="run-test-with-main">
9.352 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
9.353 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
9.354 + </target>
9.355 <!--
9.356 =================
9.357 DEBUGGING SECTION
9.358 @@ -437,6 +571,9 @@
9.359 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
9.360 <j2seproject1:nbjpdastart name="${debug.class}"/>
9.361 </target>
9.362 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
9.363 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
9.364 + </target>
9.365 <target depends="init,compile" name="-debug-start-debuggee">
9.366 <j2seproject3:debug>
9.367 <customize>
9.368 @@ -453,7 +590,12 @@
9.369 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
9.370 <j2seproject3:debug classname="${debug.class}"/>
9.371 </target>
9.372 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
9.373 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
9.374 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
9.375 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
9.376 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
9.377 + </target>
9.378 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
9.379 <target depends="init" name="-pre-debug-fix">
9.380 <fail unless="fix.includes">Must set fix.includes</fail>
9.381 <property name="javac.includes" value="${fix.includes}.java"/>
9.382 @@ -476,6 +618,9 @@
9.383 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
9.384 <filename name="**/*.java"/>
9.385 </fileset>
9.386 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
9.387 + <include name="**/*.java"/>
9.388 + </fileset>
9.389 </javadoc>
9.390 </target>
9.391 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
9.392 @@ -537,7 +682,7 @@
9.393 <j2seproject3:junit testincludes="**/*Test.java"/>
9.394 </target>
9.395 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
9.396 - <fail if="tests.failed">Some tests failed; see details above.</fail>
9.397 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
9.398 </target>
9.399 <target depends="init" if="have.tests" name="test-report"/>
9.400 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
9.401 @@ -550,9 +695,9 @@
9.402 <j2seproject3:junit excludes="" includes="${test.includes}"/>
9.403 </target>
9.404 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
9.405 - <fail if="tests.failed">Some tests failed; see details above.</fail>
9.406 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
9.407 </target>
9.408 - <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"/>
9.409 + <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"/>
9.410 <!--
9.411 =======================
9.412 JUNIT DEBUGGING SECTION
9.413 @@ -579,7 +724,7 @@
9.414 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
9.415 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
9.416 </target>
9.417 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
9.418 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
9.419 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
9.420 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
9.421 </target>
9.422 @@ -616,14 +761,45 @@
9.423 CLEANUP SECTION
9.424 ===============
9.425 -->
9.426 - <target depends="init" name="deps-clean" unless="no.deps"/>
9.427 + <target name="-deps-clean-init" unless="built-clean.properties">
9.428 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
9.429 + <delete file="${built-clean.properties}" quiet="true"/>
9.430 + </target>
9.431 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
9.432 + <echo level="warn" message="Cycle detected: extensibleicon was already built"/>
9.433 + </target>
9.434 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
9.435 + <mkdir dir="${build.dir}"/>
9.436 + <touch file="${built-clean.properties}" verbose="false"/>
9.437 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
9.438 + <antcall target="-warn-already-built-clean"/>
9.439 + <propertyfile file="${built-clean.properties}">
9.440 + <entry key="${basedir}" value=""/>
9.441 + </propertyfile>
9.442 + </target>
9.443 <target depends="init" name="-do-clean">
9.444 <delete dir="${build.dir}"/>
9.445 - <delete dir="${dist.dir}"/>
9.446 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
9.447 </target>
9.448 <target name="-post-clean">
9.449 <!-- Empty placeholder for easier customization. -->
9.450 <!-- You can override this target in the ../build.xml file. -->
9.451 </target>
9.452 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
9.453 + <target name="-check-call-dep">
9.454 + <property file="${call.built.properties}" prefix="already.built."/>
9.455 + <condition property="should.call.dep">
9.456 + <not>
9.457 + <isset property="already.built.${call.subproject}"/>
9.458 + </not>
9.459 + </condition>
9.460 + </target>
9.461 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
9.462 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
9.463 + <propertyset>
9.464 + <propertyref prefix="transfer."/>
9.465 + <mapper from="transfer.*" to="*" type="glob"/>
9.466 + </propertyset>
9.467 + </ant>
9.468 + </target>
9.469 </project>
10.1 --- a/samples/extensibleicon/nbproject/genfiles.properties Thu Dec 17 07:37:54 2009 +0100
10.2 +++ b/samples/extensibleicon/nbproject/genfiles.properties Mon Dec 21 16:54:12 2009 +0100
10.3 @@ -1,8 +1,8 @@
10.4 build.xml.data.CRC32=cced9d14
10.5 -build.xml.script.CRC32=3e240a9b
10.6 -build.xml.stylesheet.CRC32=be360661
10.7 +build.xml.script.CRC32=a709ccd8
10.8 +build.xml.stylesheet.CRC32=958a1d3e@1.34.0.45
10.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
10.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
10.11 nbproject/build-impl.xml.data.CRC32=cced9d14
10.12 -nbproject/build-impl.xml.script.CRC32=a8c3754a
10.13 -nbproject/build-impl.xml.stylesheet.CRC32=487672f9
10.14 +nbproject/build-impl.xml.script.CRC32=36d0e349
10.15 +nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.34.0.45
11.1 --- a/samples/extensibleicon/nbproject/project.properties Thu Dec 17 07:37:54 2009 +0100
11.2 +++ b/samples/extensibleicon/nbproject/project.properties Mon Dec 21 16:54:12 2009 +0100
11.3 @@ -3,6 +3,7 @@
11.4 # This directory is removed when the project is cleaned:
11.5 build.dir=build
11.6 build.generated.dir=${build.dir}/generated
11.7 +build.generated.sources.dir=${build.dir}/generated-sources
11.8 # Only compile against the classpath explicitly listed here:
11.9 build.sysclasspath=ignore
11.10 build.test.classes.dir=${build.dir}/test/classes
11.11 @@ -19,11 +20,11 @@
11.12 file.reference.org-netbeans-insane.jar=../libs/dist/org-netbeans-insane.jar
11.13 file.reference.org-netbeans-modules-nbjunit.jar=../libs/dist/org-netbeans-modules-nbjunit.jar
11.14 file.reference.junit4.jar=../libs/dist/junit-4.4.jar
11.15 -file.reference.org-openide-util.jar=../libs/dist/org-openide-util.jar
11.16 +file.reference.org-openide-util-lookup.jar=../libs/dist/org-openide-util-lookup.jar
11.17 includes=**
11.18 jar.compress=false
11.19 javac.classpath=\
11.20 - ${file.reference.org-openide-util.jar}
11.21 + ${file.reference.org-openide-util-lookup.jar}
11.22 # Space-separated list of extra javac options
11.23 javac.compilerargs=
11.24 javac.deprecation=false
11.25 @@ -46,6 +47,7 @@
11.26 javadoc.use=true
11.27 javadoc.version=false
11.28 javadoc.windowtitle=
11.29 +jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
11.30 meta.inf.dir=${src.dir}/META-INF
11.31 platform.active=default_platform
11.32 run.classpath=\
12.1 --- a/samples/extensionpoint/build.xml Thu Dec 17 07:37:54 2009 +0100
12.2 +++ b/samples/extensionpoint/build.xml Mon Dec 21 16:54:12 2009 +0100
12.3 @@ -44,7 +44,7 @@
12.4
12.5 <target name="-run-one">
12.6 <java
12.7 - classpath="build/${version1}/classes:build/${version2}/classes:build/api/classes:../libs/dist/org-openide-util.jar"
12.8 + classpath="build/${version1}/classes:build/${version2}/classes:build/api/classes:../libs/dist/org-openide-util-lookup.jar"
12.9 classname="org.apidesign.extensionpoint.Main"
12.10 failonerror="true"
12.11 >
12.12 @@ -61,7 +61,7 @@
12.13 srcdir="src-${version}"
12.14 destdir="build/${version}/classes"
12.15 source="1.5" target="1.5"
12.16 - classpath="${cp}:../libs/dist/org-openide-util.jar"
12.17 + classpath="${cp}:../libs/dist/org-openide-util-lookup.jar"
12.18 />
12.19 <copy todir="build/${version}/classes">
12.20 <fileset dir="src-${version}">
13.1 --- a/samples/extensionpoint/nbproject/project.xml Thu Dec 17 07:37:54 2009 +0100
13.2 +++ b/samples/extensionpoint/nbproject/project.xml Mon Dec 21 16:54:12 2009 +0100
13.3 @@ -84,7 +84,7 @@
13.4 <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
13.5 <compilation-unit>
13.6 <package-root>src-api</package-root>
13.7 - <classpath mode="compile">../libs/dist/org-openide-util.jar</classpath>
13.8 + <classpath mode="compile">../libs/dist/org-openide-util-lookup.jar</classpath>
13.9 <built-to>build/api/classes</built-to>
13.10 <source-level>1.5</source-level>
13.11 </compilation-unit>
14.1 --- a/samples/gc/nbproject/build-impl.xml Thu Dec 17 07:37:54 2009 +0100
14.2 +++ b/samples/gc/nbproject/build-impl.xml Mon Dec 21 16:54:12 2009 +0100
14.3 @@ -20,6 +20,13 @@
14.4
14.5 -->
14.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="gc-impl">
14.7 + <fail message="Please build using Ant 1.7.1 or higher.">
14.8 + <condition>
14.9 + <not>
14.10 + <antversion atleast="1.7.1"/>
14.11 + </not>
14.12 + </condition>
14.13 + </fail>
14.14 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
14.15 <!--
14.16 ======================
14.17 @@ -48,21 +55,52 @@
14.18 </target>
14.19 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
14.20 <available file="${manifest.file}" property="manifest.available"/>
14.21 - <condition property="manifest.available+main.class">
14.22 + <condition property="main.class.available">
14.23 <and>
14.24 - <isset property="manifest.available"/>
14.25 <isset property="main.class"/>
14.26 <not>
14.27 <equals arg1="${main.class}" arg2="" trim="true"/>
14.28 </not>
14.29 </and>
14.30 </condition>
14.31 + <condition property="manifest.available+main.class">
14.32 + <and>
14.33 + <isset property="manifest.available"/>
14.34 + <isset property="main.class.available"/>
14.35 + </and>
14.36 + </condition>
14.37 + <condition property="do.mkdist">
14.38 + <and>
14.39 + <isset property="libs.CopyLibs.classpath"/>
14.40 + <not>
14.41 + <istrue value="${mkdist.disabled}"/>
14.42 + </not>
14.43 + </and>
14.44 + </condition>
14.45 <condition property="manifest.available+main.class+mkdist.available">
14.46 <and>
14.47 <istrue value="${manifest.available+main.class}"/>
14.48 - <isset property="libs.CopyLibs.classpath"/>
14.49 + <isset property="do.mkdist"/>
14.50 </and>
14.51 </condition>
14.52 + <condition property="manifest.available+mkdist.available">
14.53 + <and>
14.54 + <istrue value="${manifest.available}"/>
14.55 + <isset property="do.mkdist"/>
14.56 + </and>
14.57 + </condition>
14.58 + <condition property="manifest.available-mkdist.available">
14.59 + <or>
14.60 + <istrue value="${manifest.available}"/>
14.61 + <isset property="do.mkdist"/>
14.62 + </or>
14.63 + </condition>
14.64 + <condition property="manifest.available+main.class-mkdist.available">
14.65 + <or>
14.66 + <istrue value="${manifest.available+main.class}"/>
14.67 + <isset property="do.mkdist"/>
14.68 + </or>
14.69 + </condition>
14.70 <condition property="have.tests">
14.71 <or>
14.72 <available file="${test.src.dir}"/>
14.73 @@ -97,6 +135,7 @@
14.74 <property name="javadoc.preview" value="true"/>
14.75 <property name="application.args" value=""/>
14.76 <property name="source.encoding" value="${file.encoding}"/>
14.77 + <property name="runtime.encoding" value="${source.encoding}"/>
14.78 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
14.79 <and>
14.80 <isset property="javadoc.encoding"/>
14.81 @@ -112,12 +151,11 @@
14.82 <condition property="do.depend.true">
14.83 <istrue value="${do.depend}"/>
14.84 </condition>
14.85 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
14.86 - <and>
14.87 - <isset property="jaxws.endorsed.dir"/>
14.88 - <available file="nbproject/jaxws-build.xml"/>
14.89 - </and>
14.90 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
14.91 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
14.92 + <length length="0" string="${endorsed.classpath}" when="greater"/>
14.93 </condition>
14.94 + <property name="javac.fork" value="false"/>
14.95 </target>
14.96 <target name="-post-init">
14.97 <!-- Empty placeholder for easier customization. -->
14.98 @@ -152,14 +190,23 @@
14.99 <attribute default="${includes}" name="includes"/>
14.100 <attribute default="${excludes}" name="excludes"/>
14.101 <attribute default="${javac.debug}" name="debug"/>
14.102 - <attribute default="" name="sourcepath"/>
14.103 + <attribute default="${empty.dir}" name="sourcepath"/>
14.104 + <attribute default="${empty.dir}" name="gensrcdir"/>
14.105 <element name="customize" optional="true"/>
14.106 <sequential>
14.107 - <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}">
14.108 + <property location="${build.dir}/empty" name="empty.dir"/>
14.109 + <mkdir dir="${empty.dir}"/>
14.110 + <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}">
14.111 + <src>
14.112 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
14.113 + <include name="*"/>
14.114 + </dirset>
14.115 + </src>
14.116 <classpath>
14.117 <path path="@{classpath}"/>
14.118 </classpath>
14.119 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
14.120 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
14.121 + <compilerarg line="${javac.compilerargs}"/>
14.122 <customize/>
14.123 </javac>
14.124 </sequential>
14.125 @@ -198,7 +245,7 @@
14.126 <attribute default="${excludes}" name="excludes"/>
14.127 <attribute default="**" name="testincludes"/>
14.128 <sequential>
14.129 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
14.130 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
14.131 <batchtest todir="${build.test.results.dir}">
14.132 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
14.133 <filename name="@{testincludes}"/>
14.134 @@ -213,6 +260,7 @@
14.135 </syspropertyset>
14.136 <formatter type="brief" usefile="false"/>
14.137 <formatter type="xml"/>
14.138 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
14.139 <jvmarg line="${run.jvmargs}"/>
14.140 </junit>
14.141 </sequential>
14.142 @@ -269,8 +317,11 @@
14.143 <element name="customize" optional="true"/>
14.144 <sequential>
14.145 <java classname="@{classname}" dir="${work.dir}" fork="true">
14.146 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
14.147 <jvmarg line="${debug-args-line}"/>
14.148 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
14.149 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
14.150 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
14.151 <jvmarg line="${run.jvmargs}"/>
14.152 <classpath>
14.153 <path path="@{classpath}"/>
14.154 @@ -287,12 +338,16 @@
14.155 <target name="-init-macrodef-java">
14.156 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
14.157 <attribute default="${main.class}" name="classname"/>
14.158 + <attribute default="${run.classpath}" name="classpath"/>
14.159 <element name="customize" optional="true"/>
14.160 <sequential>
14.161 <java classname="@{classname}" dir="${work.dir}" fork="true">
14.162 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
14.163 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
14.164 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
14.165 <jvmarg line="${run.jvmargs}"/>
14.166 <classpath>
14.167 - <path path="${run.classpath}"/>
14.168 + <path path="@{classpath}"/>
14.169 </classpath>
14.170 <syspropertyset>
14.171 <propertyref prefix="run-sys-prop."/>
14.172 @@ -316,7 +371,22 @@
14.173 COMPILATION SECTION
14.174 ===================
14.175 -->
14.176 - <target depends="init" name="deps-jar" unless="no.deps"/>
14.177 + <target name="-deps-jar-init" unless="built-jar.properties">
14.178 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
14.179 + <delete file="${built-jar.properties}" quiet="true"/>
14.180 + </target>
14.181 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
14.182 + <echo level="warn" message="Cycle detected: gc was already built"/>
14.183 + </target>
14.184 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
14.185 + <mkdir dir="${build.dir}"/>
14.186 + <touch file="${built-jar.properties}" verbose="false"/>
14.187 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
14.188 + <antcall target="-warn-already-built-jar"/>
14.189 + <propertyfile file="${built-jar.properties}">
14.190 + <entry key="${basedir}" value=""/>
14.191 + </propertyfile>
14.192 + </target>
14.193 <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
14.194 <target depends="init" name="-check-automatic-build">
14.195 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
14.196 @@ -332,10 +402,15 @@
14.197 <!-- You can override this target in the ../build.xml file. -->
14.198 </target>
14.199 <target if="do.depend.true" name="-compile-depend">
14.200 - <j2seproject3:depend/>
14.201 + <pathconvert property="build.generated.subdirs">
14.202 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
14.203 + <include name="*"/>
14.204 + </dirset>
14.205 + </pathconvert>
14.206 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
14.207 </target>
14.208 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
14.209 - <j2seproject3:javac/>
14.210 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
14.211 <copy todir="${build.classes.dir}">
14.212 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
14.213 </copy>
14.214 @@ -352,7 +427,7 @@
14.215 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
14.216 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
14.217 <j2seproject3:force-recompile/>
14.218 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
14.219 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
14.220 </target>
14.221 <target name="-post-compile-single">
14.222 <!-- Empty placeholder for easier customization. -->
14.223 @@ -372,10 +447,10 @@
14.224 <!-- Empty placeholder for easier customization. -->
14.225 <!-- You can override this target in the ../build.xml file. -->
14.226 </target>
14.227 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
14.228 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
14.229 <j2seproject1:jar/>
14.230 </target>
14.231 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
14.232 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
14.233 <j2seproject1:jar manifest="${manifest.file}"/>
14.234 </target>
14.235 <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">
14.236 @@ -418,11 +493,53 @@
14.237 <property location="${dist.jar}" name="dist.jar.resolved"/>
14.238 <echo>java -jar "${dist.jar.resolved}"</echo>
14.239 </target>
14.240 + <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">
14.241 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
14.242 + <pathconvert property="run.classpath.without.build.classes.dir">
14.243 + <path path="${run.classpath}"/>
14.244 + <map from="${build.classes.dir.resolved}" to=""/>
14.245 + </pathconvert>
14.246 + <pathconvert pathsep=" " property="jar.classpath">
14.247 + <path path="${run.classpath.without.build.classes.dir}"/>
14.248 + <chainedmapper>
14.249 + <flattenmapper/>
14.250 + <globmapper from="*" to="lib/*"/>
14.251 + </chainedmapper>
14.252 + </pathconvert>
14.253 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
14.254 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
14.255 + <fileset dir="${build.classes.dir}"/>
14.256 + <manifest>
14.257 + <attribute name="Class-Path" value="${jar.classpath}"/>
14.258 + </manifest>
14.259 + </copylibs>
14.260 + </target>
14.261 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
14.262 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
14.263 + <pathconvert property="run.classpath.without.build.classes.dir">
14.264 + <path path="${run.classpath}"/>
14.265 + <map from="${build.classes.dir.resolved}" to=""/>
14.266 + </pathconvert>
14.267 + <pathconvert pathsep=" " property="jar.classpath">
14.268 + <path path="${run.classpath.without.build.classes.dir}"/>
14.269 + <chainedmapper>
14.270 + <flattenmapper/>
14.271 + <globmapper from="*" to="lib/*"/>
14.272 + </chainedmapper>
14.273 + </pathconvert>
14.274 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
14.275 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
14.276 + <fileset dir="${build.classes.dir}"/>
14.277 + <manifest>
14.278 + <attribute name="Class-Path" value="${jar.classpath}"/>
14.279 + </manifest>
14.280 + </copylibs>
14.281 + </target>
14.282 <target name="-post-jar">
14.283 <!-- Empty placeholder for easier customization. -->
14.284 <!-- You can override this target in the ../build.xml file. -->
14.285 </target>
14.286 - <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"/>
14.287 + <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"/>
14.288 <!--
14.289 =================
14.290 EXECUTION SECTION
14.291 @@ -438,10 +555,14 @@
14.292 <target name="-do-not-recompile">
14.293 <property name="javac.includes.binary" value=""/>
14.294 </target>
14.295 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
14.296 + <target depends="init,compile-single" name="run-single">
14.297 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
14.298 <j2seproject1:java classname="${run.class}"/>
14.299 </target>
14.300 + <target depends="init,compile-test-single" name="run-test-with-main">
14.301 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
14.302 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
14.303 + </target>
14.304 <!--
14.305 =================
14.306 DEBUGGING SECTION
14.307 @@ -450,6 +571,9 @@
14.308 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
14.309 <j2seproject1:nbjpdastart name="${debug.class}"/>
14.310 </target>
14.311 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
14.312 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
14.313 + </target>
14.314 <target depends="init,compile" name="-debug-start-debuggee">
14.315 <j2seproject3:debug>
14.316 <customize>
14.317 @@ -466,7 +590,12 @@
14.318 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
14.319 <j2seproject3:debug classname="${debug.class}"/>
14.320 </target>
14.321 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
14.322 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
14.323 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
14.324 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
14.325 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
14.326 + </target>
14.327 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
14.328 <target depends="init" name="-pre-debug-fix">
14.329 <fail unless="fix.includes">Must set fix.includes</fail>
14.330 <property name="javac.includes" value="${fix.includes}.java"/>
14.331 @@ -489,6 +618,9 @@
14.332 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
14.333 <filename name="**/*.java"/>
14.334 </fileset>
14.335 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
14.336 + <include name="**/*.java"/>
14.337 + </fileset>
14.338 </javadoc>
14.339 </target>
14.340 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
14.341 @@ -550,7 +682,7 @@
14.342 <j2seproject3:junit testincludes="**/*Test.java"/>
14.343 </target>
14.344 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
14.345 - <fail if="tests.failed">Some tests failed; see details above.</fail>
14.346 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
14.347 </target>
14.348 <target depends="init" if="have.tests" name="test-report"/>
14.349 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
14.350 @@ -563,9 +695,9 @@
14.351 <j2seproject3:junit excludes="" includes="${test.includes}"/>
14.352 </target>
14.353 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
14.354 - <fail if="tests.failed">Some tests failed; see details above.</fail>
14.355 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
14.356 </target>
14.357 - <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"/>
14.358 + <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"/>
14.359 <!--
14.360 =======================
14.361 JUNIT DEBUGGING SECTION
14.362 @@ -592,7 +724,7 @@
14.363 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
14.364 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
14.365 </target>
14.366 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
14.367 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
14.368 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
14.369 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
14.370 </target>
14.371 @@ -629,14 +761,45 @@
14.372 CLEANUP SECTION
14.373 ===============
14.374 -->
14.375 - <target depends="init" name="deps-clean" unless="no.deps"/>
14.376 + <target name="-deps-clean-init" unless="built-clean.properties">
14.377 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
14.378 + <delete file="${built-clean.properties}" quiet="true"/>
14.379 + </target>
14.380 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
14.381 + <echo level="warn" message="Cycle detected: gc was already built"/>
14.382 + </target>
14.383 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
14.384 + <mkdir dir="${build.dir}"/>
14.385 + <touch file="${built-clean.properties}" verbose="false"/>
14.386 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
14.387 + <antcall target="-warn-already-built-clean"/>
14.388 + <propertyfile file="${built-clean.properties}">
14.389 + <entry key="${basedir}" value=""/>
14.390 + </propertyfile>
14.391 + </target>
14.392 <target depends="init" name="-do-clean">
14.393 <delete dir="${build.dir}"/>
14.394 - <delete dir="${dist.dir}"/>
14.395 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
14.396 </target>
14.397 <target name="-post-clean">
14.398 <!-- Empty placeholder for easier customization. -->
14.399 <!-- You can override this target in the ../build.xml file. -->
14.400 </target>
14.401 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
14.402 + <target name="-check-call-dep">
14.403 + <property file="${call.built.properties}" prefix="already.built."/>
14.404 + <condition property="should.call.dep">
14.405 + <not>
14.406 + <isset property="already.built.${call.subproject}"/>
14.407 + </not>
14.408 + </condition>
14.409 + </target>
14.410 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
14.411 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
14.412 + <propertyset>
14.413 + <propertyref prefix="transfer."/>
14.414 + <mapper from="transfer.*" to="*" type="glob"/>
14.415 + </propertyset>
14.416 + </ant>
14.417 + </target>
14.418 </project>
15.1 --- a/samples/gc/nbproject/genfiles.properties Thu Dec 17 07:37:54 2009 +0100
15.2 +++ b/samples/gc/nbproject/genfiles.properties Mon Dec 21 16:54:12 2009 +0100
15.3 @@ -4,5 +4,5 @@
15.4 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
15.5 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
15.6 nbproject/build-impl.xml.data.CRC32=70895030
15.7 -nbproject/build-impl.xml.script.CRC32=84e24199
15.8 -nbproject/build-impl.xml.stylesheet.CRC32=e55b27f5
15.9 +nbproject/build-impl.xml.script.CRC32=c80dbef4
15.10 +nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.34.0.45
16.1 --- a/samples/gc/nbproject/project.properties Thu Dec 17 07:37:54 2009 +0100
16.2 +++ b/samples/gc/nbproject/project.properties Mon Dec 21 16:54:12 2009 +0100
16.3 @@ -5,6 +5,7 @@
16.4 # This directory is removed when the project is cleaned:
16.5 build.dir=build
16.6 build.generated.dir=${build.dir}/generated
16.7 +build.generated.sources.dir=${build.dir}/generated-sources
16.8 # Only compile against the classpath explicitly listed here:
16.9 build.sysclasspath=ignore
16.10 build.test.classes.dir=${build.dir}/test/classes
16.11 @@ -22,10 +23,12 @@
16.12 file.reference.org-netbeans-insane.jar=../libs/dist/org-netbeans-insane.jar
16.13 file.reference.org-netbeans-modules-nbjunit.jar=../libs/dist/org-netbeans-modules-nbjunit.jar
16.14 file.reference.org-openide-util.jar=../libs/dist/org-openide-util.jar
16.15 +file.reference.org-openide-util-lookup.jar=../libs/dist/org-openide-util-lookup.jar
16.16 includes=**
16.17 jar.compress=false
16.18 javac.classpath=\
16.19 - ${file.reference.org-openide-util.jar}
16.20 + ${file.reference.org-openide-util.jar}:\
16.21 + ${file.reference.org-openide-util-lookup.jar}
16.22 # Space-separated list of extra javac options
16.23 javac.compilerargs=
16.24 javac.deprecation=false
16.25 @@ -48,6 +51,7 @@
16.26 javadoc.use=true
16.27 javadoc.version=false
16.28 javadoc.windowtitle=
16.29 +jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
16.30 meta.inf.dir=${src.dir}/META-INF
16.31 platform.active=default_platform
16.32 run.classpath=\
17.1 --- a/samples/libs/build.xml Thu Dec 17 07:37:54 2009 +0100
17.2 +++ b/samples/libs/build.xml Mon Dec 21 16:54:12 2009 +0100
17.3 @@ -6,6 +6,11 @@
17.4 <param name="url" value="http://switch.dl.sourceforge.net/sourceforge/junit/junit-4.4.jar"/>
17.5 </antcall>
17.6 <antcall target="-library-from-zip">
17.7 + <param name="library" value="org-openide-util-lookup"/>
17.8 + <param name="library.include" value="**/org-openide-util-lookup.jar"/>
17.9 + <param name="url" value="http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/platform11/org-openide-util-lookup.nbm"/>
17.10 + </antcall>
17.11 + <antcall target="-library-from-zip">
17.12 <param name="library" value="org-openide-util"/>
17.13 <param name="library.include" value="**/org-openide-util.jar"/>
17.14 <param name="url" value="http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/platform11/org-openide-util.nbm"/>
18.1 --- a/samples/preventcyclicdependencies/build.xml Thu Dec 17 07:37:54 2009 +0100
18.2 +++ b/samples/preventcyclicdependencies/build.xml Mon Dec 21 16:54:12 2009 +0100
18.3 @@ -40,7 +40,7 @@
18.4
18.5 <target name="-run-one">
18.6 <java
18.7 - classpath="build/${version1}/classes:build/${version2}/classes:build/test/classes:../libs/dist/org-openide-util.jar"
18.8 + classpath="build/${version1}/classes:build/${version2}/classes:build/test/classes:../libs/dist/org-openide-util-lookup.jar"
18.9 classname="org.apidesign.cycles.array.test.Main"
18.10 failonerror="true"
18.11 >
18.12 @@ -58,7 +58,7 @@
18.13 destdir="build/${version}/classes"
18.14 source="1.5" target="1.5"
18.15 debug="true"
18.16 - classpath="${cp}:../libs/dist/org-openide-util.jar"
18.17 + classpath="${cp}:../libs/dist/org-openide-util-lookup.jar"
18.18 />
18.19 <copy todir="build/${version}/classes">
18.20 <fileset dir="src-${version}">
19.1 --- a/samples/preventcyclicdependencies/nbproject/project.xml Thu Dec 17 07:37:54 2009 +0100
19.2 +++ b/samples/preventcyclicdependencies/nbproject/project.xml Mon Dec 21 16:54:12 2009 +0100
19.3 @@ -104,7 +104,7 @@
19.4 </compilation-unit>
19.5 <compilation-unit>
19.6 <package-root>src-acyclic1</package-root>
19.7 - <classpath mode="compile">../libs/dist/org-openide-util.jar</classpath>
19.8 + <classpath mode="compile">../libs/dist/org-openide-util-lookup.jar</classpath>
19.9 <built-to>build/acyclic1/classes</built-to>
19.10 <source-level>1.5</source-level>
19.11 </compilation-unit>
20.1 --- a/samples/sidemeanings/build.xml Thu Dec 17 07:37:54 2009 +0100
20.2 +++ b/samples/sidemeanings/build.xml Mon Dec 21 16:54:12 2009 +0100
20.3 @@ -2,6 +2,11 @@
20.4 <!-- You may freely edit this file. See commented blocks below for -->
20.5 <!-- some examples of how to customize the build. -->
20.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
20.7 +<!-- By default, only the Clean and Build commands use this build script. -->
20.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
20.9 +<!-- the Compile on Save feature is turned off for the project. -->
20.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
20.11 +<!-- in the project's Project Properties dialog box.-->
20.12 <project name="sidemeanings" default="default" basedir=".">
20.13 <description>Builds, tests, and runs the project sidemeanings.</description>
20.14 <import file="nbproject/build-impl.xml"/>
21.1 --- a/samples/sidemeanings/nbproject/build-impl.xml Thu Dec 17 07:37:54 2009 +0100
21.2 +++ b/samples/sidemeanings/nbproject/build-impl.xml Mon Dec 21 16:54:12 2009 +0100
21.3 @@ -20,6 +20,13 @@
21.4
21.5 -->
21.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="sidemeanings-impl">
21.7 + <fail message="Please build using Ant 1.7.1 or higher.">
21.8 + <condition>
21.9 + <not>
21.10 + <antversion atleast="1.7.1"/>
21.11 + </not>
21.12 + </condition>
21.13 + </fail>
21.14 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
21.15 <!--
21.16 ======================
21.17 @@ -48,21 +55,52 @@
21.18 </target>
21.19 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
21.20 <available file="${manifest.file}" property="manifest.available"/>
21.21 - <condition property="manifest.available+main.class">
21.22 + <condition property="main.class.available">
21.23 <and>
21.24 - <isset property="manifest.available"/>
21.25 <isset property="main.class"/>
21.26 <not>
21.27 <equals arg1="${main.class}" arg2="" trim="true"/>
21.28 </not>
21.29 </and>
21.30 </condition>
21.31 + <condition property="manifest.available+main.class">
21.32 + <and>
21.33 + <isset property="manifest.available"/>
21.34 + <isset property="main.class.available"/>
21.35 + </and>
21.36 + </condition>
21.37 + <condition property="do.mkdist">
21.38 + <and>
21.39 + <isset property="libs.CopyLibs.classpath"/>
21.40 + <not>
21.41 + <istrue value="${mkdist.disabled}"/>
21.42 + </not>
21.43 + </and>
21.44 + </condition>
21.45 <condition property="manifest.available+main.class+mkdist.available">
21.46 <and>
21.47 <istrue value="${manifest.available+main.class}"/>
21.48 - <isset property="libs.CopyLibs.classpath"/>
21.49 + <isset property="do.mkdist"/>
21.50 </and>
21.51 </condition>
21.52 + <condition property="manifest.available+mkdist.available">
21.53 + <and>
21.54 + <istrue value="${manifest.available}"/>
21.55 + <isset property="do.mkdist"/>
21.56 + </and>
21.57 + </condition>
21.58 + <condition property="manifest.available-mkdist.available">
21.59 + <or>
21.60 + <istrue value="${manifest.available}"/>
21.61 + <isset property="do.mkdist"/>
21.62 + </or>
21.63 + </condition>
21.64 + <condition property="manifest.available+main.class-mkdist.available">
21.65 + <or>
21.66 + <istrue value="${manifest.available+main.class}"/>
21.67 + <isset property="do.mkdist"/>
21.68 + </or>
21.69 + </condition>
21.70 <condition property="have.tests">
21.71 <or>
21.72 <available file="${test.src.dir}"/>
21.73 @@ -97,6 +135,7 @@
21.74 <property name="javadoc.preview" value="true"/>
21.75 <property name="application.args" value=""/>
21.76 <property name="source.encoding" value="${file.encoding}"/>
21.77 + <property name="runtime.encoding" value="${source.encoding}"/>
21.78 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
21.79 <and>
21.80 <isset property="javadoc.encoding"/>
21.81 @@ -112,12 +151,11 @@
21.82 <condition property="do.depend.true">
21.83 <istrue value="${do.depend}"/>
21.84 </condition>
21.85 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
21.86 - <and>
21.87 - <isset property="jaxws.endorsed.dir"/>
21.88 - <available file="nbproject/jaxws-build.xml"/>
21.89 - </and>
21.90 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
21.91 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
21.92 + <length length="0" string="${endorsed.classpath}" when="greater"/>
21.93 </condition>
21.94 + <property name="javac.fork" value="false"/>
21.95 </target>
21.96 <target name="-post-init">
21.97 <!-- Empty placeholder for easier customization. -->
21.98 @@ -152,14 +190,23 @@
21.99 <attribute default="${includes}" name="includes"/>
21.100 <attribute default="${excludes}" name="excludes"/>
21.101 <attribute default="${javac.debug}" name="debug"/>
21.102 - <attribute default="" name="sourcepath"/>
21.103 + <attribute default="${empty.dir}" name="sourcepath"/>
21.104 + <attribute default="${empty.dir}" name="gensrcdir"/>
21.105 <element name="customize" optional="true"/>
21.106 <sequential>
21.107 - <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}">
21.108 + <property location="${build.dir}/empty" name="empty.dir"/>
21.109 + <mkdir dir="${empty.dir}"/>
21.110 + <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}">
21.111 + <src>
21.112 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
21.113 + <include name="*"/>
21.114 + </dirset>
21.115 + </src>
21.116 <classpath>
21.117 <path path="@{classpath}"/>
21.118 </classpath>
21.119 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
21.120 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
21.121 + <compilerarg line="${javac.compilerargs}"/>
21.122 <customize/>
21.123 </javac>
21.124 </sequential>
21.125 @@ -198,7 +245,7 @@
21.126 <attribute default="${excludes}" name="excludes"/>
21.127 <attribute default="**" name="testincludes"/>
21.128 <sequential>
21.129 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
21.130 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
21.131 <batchtest todir="${build.test.results.dir}">
21.132 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
21.133 <filename name="@{testincludes}"/>
21.134 @@ -213,18 +260,19 @@
21.135 </syspropertyset>
21.136 <formatter type="brief" usefile="false"/>
21.137 <formatter type="xml"/>
21.138 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
21.139 <jvmarg line="${run.jvmargs}"/>
21.140 </junit>
21.141 </sequential>
21.142 </macrodef>
21.143 </target>
21.144 - <target name="-init-macrodef-nbjpda">
21.145 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
21.146 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
21.147 <attribute default="${main.class}" name="name"/>
21.148 <attribute default="${debug.classpath}" name="classpath"/>
21.149 <attribute default="" name="stopclassname"/>
21.150 <sequential>
21.151 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
21.152 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
21.153 <classpath>
21.154 <path path="@{classpath}"/>
21.155 </classpath>
21.156 @@ -255,6 +303,12 @@
21.157 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
21.158 <istrue value="${have-jdk-older-than-1.4}"/>
21.159 </condition>
21.160 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
21.161 + <os family="windows"/>
21.162 + </condition>
21.163 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
21.164 + <isset property="debug.transport"/>
21.165 + </condition>
21.166 </target>
21.167 <target depends="-init-debug-args" name="-init-macrodef-debug">
21.168 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
21.169 @@ -263,8 +317,11 @@
21.170 <element name="customize" optional="true"/>
21.171 <sequential>
21.172 <java classname="@{classname}" dir="${work.dir}" fork="true">
21.173 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
21.174 <jvmarg line="${debug-args-line}"/>
21.175 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
21.176 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
21.177 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
21.178 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
21.179 <jvmarg line="${run.jvmargs}"/>
21.180 <classpath>
21.181 <path path="@{classpath}"/>
21.182 @@ -281,12 +338,16 @@
21.183 <target name="-init-macrodef-java">
21.184 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
21.185 <attribute default="${main.class}" name="classname"/>
21.186 + <attribute default="${run.classpath}" name="classpath"/>
21.187 <element name="customize" optional="true"/>
21.188 <sequential>
21.189 <java classname="@{classname}" dir="${work.dir}" fork="true">
21.190 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
21.191 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
21.192 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
21.193 <jvmarg line="${run.jvmargs}"/>
21.194 <classpath>
21.195 - <path path="${run.classpath}"/>
21.196 + <path path="@{classpath}"/>
21.197 </classpath>
21.198 <syspropertyset>
21.199 <propertyref prefix="run-sys-prop."/>
21.200 @@ -310,7 +371,29 @@
21.201 COMPILATION SECTION
21.202 ===================
21.203 -->
21.204 - <target depends="init" name="deps-jar" unless="no.deps"/>
21.205 + <target name="-deps-jar-init" unless="built-jar.properties">
21.206 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
21.207 + <delete file="${built-jar.properties}" quiet="true"/>
21.208 + </target>
21.209 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
21.210 + <echo level="warn" message="Cycle detected: sidemeanings was already built"/>
21.211 + </target>
21.212 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
21.213 + <mkdir dir="${build.dir}"/>
21.214 + <touch file="${built-jar.properties}" verbose="false"/>
21.215 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
21.216 + <antcall target="-warn-already-built-jar"/>
21.217 + <propertyfile file="${built-jar.properties}">
21.218 + <entry key="${basedir}" value=""/>
21.219 + </propertyfile>
21.220 + </target>
21.221 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
21.222 + <target depends="init" name="-check-automatic-build">
21.223 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
21.224 + </target>
21.225 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
21.226 + <antcall target="clean"/>
21.227 + </target>
21.228 <target depends="init,deps-jar" name="-pre-pre-compile">
21.229 <mkdir dir="${build.classes.dir}"/>
21.230 </target>
21.231 @@ -319,10 +402,15 @@
21.232 <!-- You can override this target in the ../build.xml file. -->
21.233 </target>
21.234 <target if="do.depend.true" name="-compile-depend">
21.235 - <j2seproject3:depend/>
21.236 + <pathconvert property="build.generated.subdirs">
21.237 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
21.238 + <include name="*"/>
21.239 + </dirset>
21.240 + </pathconvert>
21.241 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
21.242 </target>
21.243 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
21.244 - <j2seproject3:javac/>
21.245 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
21.246 <copy todir="${build.classes.dir}">
21.247 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
21.248 </copy>
21.249 @@ -331,7 +419,7 @@
21.250 <!-- Empty placeholder for easier customization. -->
21.251 <!-- You can override this target in the ../build.xml file. -->
21.252 </target>
21.253 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
21.254 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
21.255 <target name="-pre-compile-single">
21.256 <!-- Empty placeholder for easier customization. -->
21.257 <!-- You can override this target in the ../build.xml file. -->
21.258 @@ -339,13 +427,13 @@
21.259 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
21.260 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
21.261 <j2seproject3:force-recompile/>
21.262 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
21.263 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
21.264 </target>
21.265 <target name="-post-compile-single">
21.266 <!-- Empty placeholder for easier customization. -->
21.267 <!-- You can override this target in the ../build.xml file. -->
21.268 </target>
21.269 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
21.270 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
21.271 <!--
21.272 ====================
21.273 JAR BUILDING SECTION
21.274 @@ -359,10 +447,10 @@
21.275 <!-- Empty placeholder for easier customization. -->
21.276 <!-- You can override this target in the ../build.xml file. -->
21.277 </target>
21.278 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
21.279 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
21.280 <j2seproject1:jar/>
21.281 </target>
21.282 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
21.283 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
21.284 <j2seproject1:jar manifest="${manifest.file}"/>
21.285 </target>
21.286 <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">
21.287 @@ -405,11 +493,53 @@
21.288 <property location="${dist.jar}" name="dist.jar.resolved"/>
21.289 <echo>java -jar "${dist.jar.resolved}"</echo>
21.290 </target>
21.291 + <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">
21.292 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
21.293 + <pathconvert property="run.classpath.without.build.classes.dir">
21.294 + <path path="${run.classpath}"/>
21.295 + <map from="${build.classes.dir.resolved}" to=""/>
21.296 + </pathconvert>
21.297 + <pathconvert pathsep=" " property="jar.classpath">
21.298 + <path path="${run.classpath.without.build.classes.dir}"/>
21.299 + <chainedmapper>
21.300 + <flattenmapper/>
21.301 + <globmapper from="*" to="lib/*"/>
21.302 + </chainedmapper>
21.303 + </pathconvert>
21.304 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
21.305 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
21.306 + <fileset dir="${build.classes.dir}"/>
21.307 + <manifest>
21.308 + <attribute name="Class-Path" value="${jar.classpath}"/>
21.309 + </manifest>
21.310 + </copylibs>
21.311 + </target>
21.312 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
21.313 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
21.314 + <pathconvert property="run.classpath.without.build.classes.dir">
21.315 + <path path="${run.classpath}"/>
21.316 + <map from="${build.classes.dir.resolved}" to=""/>
21.317 + </pathconvert>
21.318 + <pathconvert pathsep=" " property="jar.classpath">
21.319 + <path path="${run.classpath.without.build.classes.dir}"/>
21.320 + <chainedmapper>
21.321 + <flattenmapper/>
21.322 + <globmapper from="*" to="lib/*"/>
21.323 + </chainedmapper>
21.324 + </pathconvert>
21.325 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
21.326 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
21.327 + <fileset dir="${build.classes.dir}"/>
21.328 + <manifest>
21.329 + <attribute name="Class-Path" value="${jar.classpath}"/>
21.330 + </manifest>
21.331 + </copylibs>
21.332 + </target>
21.333 <target name="-post-jar">
21.334 <!-- Empty placeholder for easier customization. -->
21.335 <!-- You can override this target in the ../build.xml file. -->
21.336 </target>
21.337 - <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"/>
21.338 + <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"/>
21.339 <!--
21.340 =================
21.341 EXECUTION SECTION
21.342 @@ -425,10 +555,14 @@
21.343 <target name="-do-not-recompile">
21.344 <property name="javac.includes.binary" value=""/>
21.345 </target>
21.346 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
21.347 + <target depends="init,compile-single" name="run-single">
21.348 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
21.349 <j2seproject1:java classname="${run.class}"/>
21.350 </target>
21.351 + <target depends="init,compile-test-single" name="run-test-with-main">
21.352 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
21.353 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
21.354 + </target>
21.355 <!--
21.356 =================
21.357 DEBUGGING SECTION
21.358 @@ -437,6 +571,9 @@
21.359 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
21.360 <j2seproject1:nbjpdastart name="${debug.class}"/>
21.361 </target>
21.362 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
21.363 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
21.364 + </target>
21.365 <target depends="init,compile" name="-debug-start-debuggee">
21.366 <j2seproject3:debug>
21.367 <customize>
21.368 @@ -453,7 +590,12 @@
21.369 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
21.370 <j2seproject3:debug classname="${debug.class}"/>
21.371 </target>
21.372 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
21.373 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
21.374 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
21.375 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
21.376 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
21.377 + </target>
21.378 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
21.379 <target depends="init" name="-pre-debug-fix">
21.380 <fail unless="fix.includes">Must set fix.includes</fail>
21.381 <property name="javac.includes" value="${fix.includes}.java"/>
21.382 @@ -476,6 +618,9 @@
21.383 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
21.384 <filename name="**/*.java"/>
21.385 </fileset>
21.386 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
21.387 + <include name="**/*.java"/>
21.388 + </fileset>
21.389 </javadoc>
21.390 </target>
21.391 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
21.392 @@ -537,7 +682,7 @@
21.393 <j2seproject3:junit testincludes="**/*Test.java"/>
21.394 </target>
21.395 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
21.396 - <fail if="tests.failed">Some tests failed; see details above.</fail>
21.397 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
21.398 </target>
21.399 <target depends="init" if="have.tests" name="test-report"/>
21.400 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
21.401 @@ -550,9 +695,9 @@
21.402 <j2seproject3:junit excludes="" includes="${test.includes}"/>
21.403 </target>
21.404 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
21.405 - <fail if="tests.failed">Some tests failed; see details above.</fail>
21.406 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
21.407 </target>
21.408 - <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"/>
21.409 + <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"/>
21.410 <!--
21.411 =======================
21.412 JUNIT DEBUGGING SECTION
21.413 @@ -579,7 +724,7 @@
21.414 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
21.415 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
21.416 </target>
21.417 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
21.418 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
21.419 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
21.420 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
21.421 </target>
21.422 @@ -616,7 +761,22 @@
21.423 CLEANUP SECTION
21.424 ===============
21.425 -->
21.426 - <target depends="init" name="deps-clean" unless="no.deps"/>
21.427 + <target name="-deps-clean-init" unless="built-clean.properties">
21.428 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
21.429 + <delete file="${built-clean.properties}" quiet="true"/>
21.430 + </target>
21.431 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
21.432 + <echo level="warn" message="Cycle detected: sidemeanings was already built"/>
21.433 + </target>
21.434 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
21.435 + <mkdir dir="${build.dir}"/>
21.436 + <touch file="${built-clean.properties}" verbose="false"/>
21.437 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
21.438 + <antcall target="-warn-already-built-clean"/>
21.439 + <propertyfile file="${built-clean.properties}">
21.440 + <entry key="${basedir}" value=""/>
21.441 + </propertyfile>
21.442 + </target>
21.443 <target depends="init" name="-do-clean">
21.444 <delete dir="${build.dir}"/>
21.445 <delete dir="${dist.dir}"/>
21.446 @@ -626,4 +786,20 @@
21.447 <!-- You can override this target in the ../build.xml file. -->
21.448 </target>
21.449 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
21.450 + <target name="-check-call-dep">
21.451 + <property file="${call.built.properties}" prefix="already.built."/>
21.452 + <condition property="should.call.dep">
21.453 + <not>
21.454 + <isset property="already.built.${call.subproject}"/>
21.455 + </not>
21.456 + </condition>
21.457 + </target>
21.458 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
21.459 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
21.460 + <propertyset>
21.461 + <propertyref prefix="transfer."/>
21.462 + <mapper from="transfer.*" to="*" type="glob"/>
21.463 + </propertyset>
21.464 + </ant>
21.465 + </target>
21.466 </project>
22.1 --- a/samples/sidemeanings/nbproject/genfiles.properties Thu Dec 17 07:37:54 2009 +0100
22.2 +++ b/samples/sidemeanings/nbproject/genfiles.properties Mon Dec 21 16:54:12 2009 +0100
22.3 @@ -1,8 +1,8 @@
22.4 build.xml.data.CRC32=ff1f72f4
22.5 -build.xml.script.CRC32=2f910bbe
22.6 -build.xml.stylesheet.CRC32=be360661
22.7 +build.xml.script.CRC32=c38b508c
22.8 +build.xml.stylesheet.CRC32=958a1d3e@1.32.0.45
22.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
22.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
22.11 nbproject/build-impl.xml.data.CRC32=ff1f72f4
22.12 -nbproject/build-impl.xml.script.CRC32=2b12d853
22.13 -nbproject/build-impl.xml.stylesheet.CRC32=487672f9
22.14 +nbproject/build-impl.xml.script.CRC32=a5ebb2f7
22.15 +nbproject/build-impl.xml.stylesheet.CRC32=43814ccb@1.32.0.45
23.1 --- a/samples/sidemeanings/nbproject/project.properties Thu Dec 17 07:37:54 2009 +0100
23.2 +++ b/samples/sidemeanings/nbproject/project.properties Mon Dec 21 16:54:12 2009 +0100
23.3 @@ -3,6 +3,7 @@
23.4 # This directory is removed when the project is cleaned:
23.5 build.dir=build
23.6 build.generated.dir=${build.dir}/generated
23.7 +build.generated.sources.dir=${build.dir}/generated-sources
23.8 # Only compile against the classpath explicitly listed here:
23.9 build.sysclasspath=ignore
23.10 build.test.classes.dir=${build.dir}/test/classes
23.11 @@ -42,6 +43,7 @@
23.12 javadoc.use=true
23.13 javadoc.version=false
23.14 javadoc.windowtitle=
23.15 +jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
23.16 meta.inf.dir=${src.dir}/META-INF
23.17 platform.active=default_platform
23.18 run.classpath=\
24.1 --- a/samples/unionfs/build.xml Thu Dec 17 07:37:54 2009 +0100
24.2 +++ b/samples/unionfs/build.xml Mon Dec 21 16:54:12 2009 +0100
24.3 @@ -2,6 +2,11 @@
24.4 <!-- You may freely edit this file. See commented blocks below for -->
24.5 <!-- some examples of how to customize the build. -->
24.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
24.7 +<!-- By default, only the Clean and Build commands use this build script. -->
24.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
24.9 +<!-- the Compile on Save feature is turned off for the project. -->
24.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
24.11 +<!-- in the project's Project Properties dialog box.-->
24.12 <project name="unionfs" default="default" basedir=".">
24.13 <description>Builds, tests, and runs the project unionfs.</description>
24.14 <import file="nbproject/build-impl.xml"/>
25.1 --- a/samples/unionfs/nbproject/build-impl.xml Thu Dec 17 07:37:54 2009 +0100
25.2 +++ b/samples/unionfs/nbproject/build-impl.xml Mon Dec 21 16:54:12 2009 +0100
25.3 @@ -19,7 +19,14 @@
25.4 - cleanup
25.5
25.6 -->
25.7 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" 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="unionfs-impl">
25.8 +<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="unionfs-impl">
25.9 + <fail message="Please build using Ant 1.7.1 or higher.">
25.10 + <condition>
25.11 + <not>
25.12 + <antversion atleast="1.7.1"/>
25.13 + </not>
25.14 + </condition>
25.15 + </fail>
25.16 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
25.17 <!--
25.18 ======================
25.19 @@ -48,21 +55,52 @@
25.20 </target>
25.21 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
25.22 <available file="${manifest.file}" property="manifest.available"/>
25.23 - <condition property="manifest.available+main.class">
25.24 + <condition property="main.class.available">
25.25 <and>
25.26 - <isset property="manifest.available"/>
25.27 <isset property="main.class"/>
25.28 <not>
25.29 <equals arg1="${main.class}" arg2="" trim="true"/>
25.30 </not>
25.31 </and>
25.32 </condition>
25.33 + <condition property="manifest.available+main.class">
25.34 + <and>
25.35 + <isset property="manifest.available"/>
25.36 + <isset property="main.class.available"/>
25.37 + </and>
25.38 + </condition>
25.39 + <condition property="do.mkdist">
25.40 + <and>
25.41 + <isset property="libs.CopyLibs.classpath"/>
25.42 + <not>
25.43 + <istrue value="${mkdist.disabled}"/>
25.44 + </not>
25.45 + </and>
25.46 + </condition>
25.47 <condition property="manifest.available+main.class+mkdist.available">
25.48 <and>
25.49 <istrue value="${manifest.available+main.class}"/>
25.50 - <isset property="libs.CopyLibs.classpath"/>
25.51 + <isset property="do.mkdist"/>
25.52 </and>
25.53 </condition>
25.54 + <condition property="manifest.available+mkdist.available">
25.55 + <and>
25.56 + <istrue value="${manifest.available}"/>
25.57 + <isset property="do.mkdist"/>
25.58 + </and>
25.59 + </condition>
25.60 + <condition property="manifest.available-mkdist.available">
25.61 + <or>
25.62 + <istrue value="${manifest.available}"/>
25.63 + <isset property="do.mkdist"/>
25.64 + </or>
25.65 + </condition>
25.66 + <condition property="manifest.available+main.class-mkdist.available">
25.67 + <or>
25.68 + <istrue value="${manifest.available+main.class}"/>
25.69 + <isset property="do.mkdist"/>
25.70 + </or>
25.71 + </condition>
25.72 <condition property="have.tests">
25.73 <or>
25.74 <available file="${test.src.dir}"/>
25.75 @@ -97,6 +135,7 @@
25.76 <property name="javadoc.preview" value="true"/>
25.77 <property name="application.args" value=""/>
25.78 <property name="source.encoding" value="${file.encoding}"/>
25.79 + <property name="runtime.encoding" value="${source.encoding}"/>
25.80 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
25.81 <and>
25.82 <isset property="javadoc.encoding"/>
25.83 @@ -112,12 +151,11 @@
25.84 <condition property="do.depend.true">
25.85 <istrue value="${do.depend}"/>
25.86 </condition>
25.87 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
25.88 - <and>
25.89 - <isset property="jaxws.endorsed.dir"/>
25.90 - <available file="nbproject/jaxws-build.xml"/>
25.91 - </and>
25.92 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
25.93 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
25.94 + <length length="0" string="${endorsed.classpath}" when="greater"/>
25.95 </condition>
25.96 + <property name="javac.fork" value="false"/>
25.97 </target>
25.98 <target name="-post-init">
25.99 <!-- Empty placeholder for easier customization. -->
25.100 @@ -152,14 +190,23 @@
25.101 <attribute default="${includes}" name="includes"/>
25.102 <attribute default="${excludes}" name="excludes"/>
25.103 <attribute default="${javac.debug}" name="debug"/>
25.104 - <attribute default="" name="sourcepath"/>
25.105 + <attribute default="${empty.dir}" name="sourcepath"/>
25.106 + <attribute default="${empty.dir}" name="gensrcdir"/>
25.107 <element name="customize" optional="true"/>
25.108 <sequential>
25.109 - <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}">
25.110 + <property location="${build.dir}/empty" name="empty.dir"/>
25.111 + <mkdir dir="${empty.dir}"/>
25.112 + <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}">
25.113 + <src>
25.114 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
25.115 + <include name="*"/>
25.116 + </dirset>
25.117 + </src>
25.118 <classpath>
25.119 <path path="@{classpath}"/>
25.120 </classpath>
25.121 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
25.122 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
25.123 + <compilerarg line="${javac.compilerargs}"/>
25.124 <customize/>
25.125 </javac>
25.126 </sequential>
25.127 @@ -198,7 +245,7 @@
25.128 <attribute default="${excludes}" name="excludes"/>
25.129 <attribute default="**" name="testincludes"/>
25.130 <sequential>
25.131 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
25.132 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
25.133 <batchtest todir="${build.test.results.dir}">
25.134 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
25.135 <filename name="@{testincludes}"/>
25.136 @@ -213,18 +260,19 @@
25.137 </syspropertyset>
25.138 <formatter type="brief" usefile="false"/>
25.139 <formatter type="xml"/>
25.140 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
25.141 <jvmarg line="${run.jvmargs}"/>
25.142 </junit>
25.143 </sequential>
25.144 </macrodef>
25.145 </target>
25.146 - <target name="-init-macrodef-nbjpda">
25.147 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
25.148 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
25.149 <attribute default="${main.class}" name="name"/>
25.150 <attribute default="${debug.classpath}" name="classpath"/>
25.151 <attribute default="" name="stopclassname"/>
25.152 <sequential>
25.153 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
25.154 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
25.155 <classpath>
25.156 <path path="@{classpath}"/>
25.157 </classpath>
25.158 @@ -235,7 +283,9 @@
25.159 <attribute default="${build.classes.dir}" name="dir"/>
25.160 <sequential>
25.161 <nbjpdareload>
25.162 - <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
25.163 + <fileset dir="@{dir}" includes="${fix.classes}">
25.164 + <include name="${fix.includes}*.class"/>
25.165 + </fileset>
25.166 </nbjpdareload>
25.167 </sequential>
25.168 </macrodef>
25.169 @@ -253,6 +303,12 @@
25.170 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
25.171 <istrue value="${have-jdk-older-than-1.4}"/>
25.172 </condition>
25.173 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
25.174 + <os family="windows"/>
25.175 + </condition>
25.176 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
25.177 + <isset property="debug.transport"/>
25.178 + </condition>
25.179 </target>
25.180 <target depends="-init-debug-args" name="-init-macrodef-debug">
25.181 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
25.182 @@ -261,8 +317,11 @@
25.183 <element name="customize" optional="true"/>
25.184 <sequential>
25.185 <java classname="@{classname}" dir="${work.dir}" fork="true">
25.186 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
25.187 <jvmarg line="${debug-args-line}"/>
25.188 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
25.189 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
25.190 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
25.191 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
25.192 <jvmarg line="${run.jvmargs}"/>
25.193 <classpath>
25.194 <path path="@{classpath}"/>
25.195 @@ -279,12 +338,16 @@
25.196 <target name="-init-macrodef-java">
25.197 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
25.198 <attribute default="${main.class}" name="classname"/>
25.199 + <attribute default="${run.classpath}" name="classpath"/>
25.200 <element name="customize" optional="true"/>
25.201 <sequential>
25.202 <java classname="@{classname}" dir="${work.dir}" fork="true">
25.203 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
25.204 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
25.205 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
25.206 <jvmarg line="${run.jvmargs}"/>
25.207 <classpath>
25.208 - <path path="${run.classpath}"/>
25.209 + <path path="@{classpath}"/>
25.210 </classpath>
25.211 <syspropertyset>
25.212 <propertyref prefix="run-sys-prop."/>
25.213 @@ -308,7 +371,29 @@
25.214 COMPILATION SECTION
25.215 ===================
25.216 -->
25.217 - <target depends="init" name="deps-jar" unless="no.deps"/>
25.218 + <target name="-deps-jar-init" unless="built-jar.properties">
25.219 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
25.220 + <delete file="${built-jar.properties}" quiet="true"/>
25.221 + </target>
25.222 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
25.223 + <echo level="warn" message="Cycle detected: unionfs was already built"/>
25.224 + </target>
25.225 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
25.226 + <mkdir dir="${build.dir}"/>
25.227 + <touch file="${built-jar.properties}" verbose="false"/>
25.228 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
25.229 + <antcall target="-warn-already-built-jar"/>
25.230 + <propertyfile file="${built-jar.properties}">
25.231 + <entry key="${basedir}" value=""/>
25.232 + </propertyfile>
25.233 + </target>
25.234 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
25.235 + <target depends="init" name="-check-automatic-build">
25.236 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
25.237 + </target>
25.238 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
25.239 + <antcall target="clean"/>
25.240 + </target>
25.241 <target depends="init,deps-jar" name="-pre-pre-compile">
25.242 <mkdir dir="${build.classes.dir}"/>
25.243 </target>
25.244 @@ -317,10 +402,15 @@
25.245 <!-- You can override this target in the ../build.xml file. -->
25.246 </target>
25.247 <target if="do.depend.true" name="-compile-depend">
25.248 - <j2seproject3:depend/>
25.249 + <pathconvert property="build.generated.subdirs">
25.250 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
25.251 + <include name="*"/>
25.252 + </dirset>
25.253 + </pathconvert>
25.254 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
25.255 </target>
25.256 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
25.257 - <j2seproject3:javac/>
25.258 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
25.259 <copy todir="${build.classes.dir}">
25.260 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
25.261 </copy>
25.262 @@ -329,7 +419,7 @@
25.263 <!-- Empty placeholder for easier customization. -->
25.264 <!-- You can override this target in the ../build.xml file. -->
25.265 </target>
25.266 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
25.267 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
25.268 <target name="-pre-compile-single">
25.269 <!-- Empty placeholder for easier customization. -->
25.270 <!-- You can override this target in the ../build.xml file. -->
25.271 @@ -337,13 +427,13 @@
25.272 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
25.273 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
25.274 <j2seproject3:force-recompile/>
25.275 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
25.276 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
25.277 </target>
25.278 <target name="-post-compile-single">
25.279 <!-- Empty placeholder for easier customization. -->
25.280 <!-- You can override this target in the ../build.xml file. -->
25.281 </target>
25.282 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
25.283 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
25.284 <!--
25.285 ====================
25.286 JAR BUILDING SECTION
25.287 @@ -357,10 +447,10 @@
25.288 <!-- Empty placeholder for easier customization. -->
25.289 <!-- You can override this target in the ../build.xml file. -->
25.290 </target>
25.291 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
25.292 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
25.293 <j2seproject1:jar/>
25.294 </target>
25.295 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
25.296 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
25.297 <j2seproject1:jar manifest="${manifest.file}"/>
25.298 </target>
25.299 <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">
25.300 @@ -403,11 +493,53 @@
25.301 <property location="${dist.jar}" name="dist.jar.resolved"/>
25.302 <echo>java -jar "${dist.jar.resolved}"</echo>
25.303 </target>
25.304 + <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">
25.305 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
25.306 + <pathconvert property="run.classpath.without.build.classes.dir">
25.307 + <path path="${run.classpath}"/>
25.308 + <map from="${build.classes.dir.resolved}" to=""/>
25.309 + </pathconvert>
25.310 + <pathconvert pathsep=" " property="jar.classpath">
25.311 + <path path="${run.classpath.without.build.classes.dir}"/>
25.312 + <chainedmapper>
25.313 + <flattenmapper/>
25.314 + <globmapper from="*" to="lib/*"/>
25.315 + </chainedmapper>
25.316 + </pathconvert>
25.317 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
25.318 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
25.319 + <fileset dir="${build.classes.dir}"/>
25.320 + <manifest>
25.321 + <attribute name="Class-Path" value="${jar.classpath}"/>
25.322 + </manifest>
25.323 + </copylibs>
25.324 + </target>
25.325 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
25.326 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
25.327 + <pathconvert property="run.classpath.without.build.classes.dir">
25.328 + <path path="${run.classpath}"/>
25.329 + <map from="${build.classes.dir.resolved}" to=""/>
25.330 + </pathconvert>
25.331 + <pathconvert pathsep=" " property="jar.classpath">
25.332 + <path path="${run.classpath.without.build.classes.dir}"/>
25.333 + <chainedmapper>
25.334 + <flattenmapper/>
25.335 + <globmapper from="*" to="lib/*"/>
25.336 + </chainedmapper>
25.337 + </pathconvert>
25.338 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
25.339 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
25.340 + <fileset dir="${build.classes.dir}"/>
25.341 + <manifest>
25.342 + <attribute name="Class-Path" value="${jar.classpath}"/>
25.343 + </manifest>
25.344 + </copylibs>
25.345 + </target>
25.346 <target name="-post-jar">
25.347 <!-- Empty placeholder for easier customization. -->
25.348 <!-- You can override this target in the ../build.xml file. -->
25.349 </target>
25.350 - <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"/>
25.351 + <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"/>
25.352 <!--
25.353 =================
25.354 EXECUTION SECTION
25.355 @@ -423,10 +555,14 @@
25.356 <target name="-do-not-recompile">
25.357 <property name="javac.includes.binary" value=""/>
25.358 </target>
25.359 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
25.360 + <target depends="init,compile-single" name="run-single">
25.361 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
25.362 <j2seproject1:java classname="${run.class}"/>
25.363 </target>
25.364 + <target depends="init,compile-test-single" name="run-test-with-main">
25.365 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
25.366 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
25.367 + </target>
25.368 <!--
25.369 =================
25.370 DEBUGGING SECTION
25.371 @@ -435,6 +571,9 @@
25.372 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
25.373 <j2seproject1:nbjpdastart name="${debug.class}"/>
25.374 </target>
25.375 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
25.376 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
25.377 + </target>
25.378 <target depends="init,compile" name="-debug-start-debuggee">
25.379 <j2seproject3:debug>
25.380 <customize>
25.381 @@ -451,7 +590,12 @@
25.382 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
25.383 <j2seproject3:debug classname="${debug.class}"/>
25.384 </target>
25.385 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
25.386 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
25.387 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
25.388 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
25.389 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
25.390 + </target>
25.391 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
25.392 <target depends="init" name="-pre-debug-fix">
25.393 <fail unless="fix.includes">Must set fix.includes</fail>
25.394 <property name="javac.includes" value="${fix.includes}.java"/>
25.395 @@ -474,6 +618,9 @@
25.396 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
25.397 <filename name="**/*.java"/>
25.398 </fileset>
25.399 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
25.400 + <include name="**/*.java"/>
25.401 + </fileset>
25.402 </javadoc>
25.403 </target>
25.404 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
25.405 @@ -535,7 +682,7 @@
25.406 <j2seproject3:junit testincludes="**/*Test.java"/>
25.407 </target>
25.408 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
25.409 - <fail if="tests.failed">Some tests failed; see details above.</fail>
25.410 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
25.411 </target>
25.412 <target depends="init" if="have.tests" name="test-report"/>
25.413 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
25.414 @@ -548,9 +695,9 @@
25.415 <j2seproject3:junit excludes="" includes="${test.includes}"/>
25.416 </target>
25.417 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
25.418 - <fail if="tests.failed">Some tests failed; see details above.</fail>
25.419 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
25.420 </target>
25.421 - <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"/>
25.422 + <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"/>
25.423 <!--
25.424 =======================
25.425 JUNIT DEBUGGING SECTION
25.426 @@ -577,7 +724,7 @@
25.427 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
25.428 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
25.429 </target>
25.430 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
25.431 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
25.432 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
25.433 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
25.434 </target>
25.435 @@ -614,14 +761,45 @@
25.436 CLEANUP SECTION
25.437 ===============
25.438 -->
25.439 - <target depends="init" name="deps-clean" unless="no.deps"/>
25.440 + <target name="-deps-clean-init" unless="built-clean.properties">
25.441 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
25.442 + <delete file="${built-clean.properties}" quiet="true"/>
25.443 + </target>
25.444 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
25.445 + <echo level="warn" message="Cycle detected: unionfs was already built"/>
25.446 + </target>
25.447 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
25.448 + <mkdir dir="${build.dir}"/>
25.449 + <touch file="${built-clean.properties}" verbose="false"/>
25.450 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
25.451 + <antcall target="-warn-already-built-clean"/>
25.452 + <propertyfile file="${built-clean.properties}">
25.453 + <entry key="${basedir}" value=""/>
25.454 + </propertyfile>
25.455 + </target>
25.456 <target depends="init" name="-do-clean">
25.457 <delete dir="${build.dir}"/>
25.458 - <delete dir="${dist.dir}"/>
25.459 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
25.460 </target>
25.461 <target name="-post-clean">
25.462 <!-- Empty placeholder for easier customization. -->
25.463 <!-- You can override this target in the ../build.xml file. -->
25.464 </target>
25.465 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
25.466 + <target name="-check-call-dep">
25.467 + <property file="${call.built.properties}" prefix="already.built."/>
25.468 + <condition property="should.call.dep">
25.469 + <not>
25.470 + <isset property="already.built.${call.subproject}"/>
25.471 + </not>
25.472 + </condition>
25.473 + </target>
25.474 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
25.475 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
25.476 + <propertyset>
25.477 + <propertyref prefix="transfer."/>
25.478 + <mapper from="transfer.*" to="*" type="glob"/>
25.479 + </propertyset>
25.480 + </ant>
25.481 + </target>
25.482 </project>
26.1 --- a/samples/unionfs/nbproject/genfiles.properties Thu Dec 17 07:37:54 2009 +0100
26.2 +++ b/samples/unionfs/nbproject/genfiles.properties Mon Dec 21 16:54:12 2009 +0100
26.3 @@ -1,8 +1,8 @@
26.4 build.xml.data.CRC32=31076a65
26.5 -build.xml.script.CRC32=977a9029
26.6 -build.xml.stylesheet.CRC32=be360661
26.7 +build.xml.script.CRC32=64c09767
26.8 +build.xml.stylesheet.CRC32=958a1d3e@1.34.0.45
26.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
26.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
26.11 nbproject/build-impl.xml.data.CRC32=31076a65
26.12 -nbproject/build-impl.xml.script.CRC32=3625d6eb
26.13 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
26.14 +nbproject/build-impl.xml.script.CRC32=d7a2cae8
26.15 +nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.34.0.45
27.1 --- a/samples/unionfs/nbproject/project.properties Thu Dec 17 07:37:54 2009 +0100
27.2 +++ b/samples/unionfs/nbproject/project.properties Mon Dec 21 16:54:12 2009 +0100
27.3 @@ -5,6 +5,7 @@
27.4 # This directory is removed when the project is cleaned:
27.5 build.dir=build
27.6 build.generated.dir=${build.dir}/generated
27.7 +build.generated.sources.dir=${build.dir}/generated-sources
27.8 # Only compile against the classpath explicitly listed here:
27.9 build.sysclasspath=ignore
27.10 build.test.classes.dir=${build.dir}/test/classes
27.11 @@ -20,12 +21,14 @@
27.12 excludes=
27.13 file.reference.junit-4.4.jar=../libs/dist/junit-4.4.jar
27.14 file.reference.org-openide-filesystems.jar=../libs/dist/org-openide-filesystems.jar
27.15 +file.reference.org-openide-util-lookup.jar=../libs/dist/org-openide-util-lookup.jar
27.16 file.reference.org-openide-util.jar=../libs/dist/org-openide-util.jar
27.17 includes=**
27.18 jar.compress=false
27.19 javac.classpath=\
27.20 ${file.reference.org-openide-util.jar}:\
27.21 - ${file.reference.org-openide-filesystems.jar}
27.22 + ${file.reference.org-openide-filesystems.jar}:\
27.23 + ${file.reference.org-openide-util-lookup.jar}
27.24 # Space-separated list of extra javac options
27.25 javac.compilerargs=
27.26 javac.deprecation=false
27.27 @@ -46,6 +49,7 @@
27.28 javadoc.use=true
27.29 javadoc.version=false
27.30 javadoc.windowtitle=
27.31 +jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
27.32 meta.inf.dir=${src.dir}/META-INF
27.33 platform.active=default_platform
27.34 run.classpath=\