1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/samples/openfixed/build.xml Sun Mar 20 08:12:26 2011 +0100
1.3 @@ -0,0 +1,74 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<!-- You may freely edit this file. See commented blocks below for -->
1.6 +<!-- some examples of how to customize the build. -->
1.7 +<!-- (If you delete it and reopen the project it will be recreated.) -->
1.8 +<!-- By default, only the Clean and Build commands use this build script. -->
1.9 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
1.10 +<!-- the Compile on Save feature is turned off for the project. -->
1.11 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
1.12 +<!-- in the project's Project Properties dialog box.-->
1.13 +<project name="openfixed" default="default" basedir=".">
1.14 + <description>Builds, tests, and runs the project openfixed.</description>
1.15 + <import file="nbproject/build-impl.xml"/>
1.16 + <!--
1.17 +
1.18 + There exist several targets which are by default empty and which can be
1.19 + used for execution of your tasks. These targets are usually executed
1.20 + before and after some main targets. They are:
1.21 +
1.22 + -pre-init: called before initialization of project properties
1.23 + -post-init: called after initialization of project properties
1.24 + -pre-compile: called before javac compilation
1.25 + -post-compile: called after javac compilation
1.26 + -pre-compile-single: called before javac compilation of single file
1.27 + -post-compile-single: called after javac compilation of single file
1.28 + -pre-compile-test: called before javac compilation of JUnit tests
1.29 + -post-compile-test: called after javac compilation of JUnit tests
1.30 + -pre-compile-test-single: called before javac compilation of single JUnit test
1.31 + -post-compile-test-single: called after javac compilation of single JUunit test
1.32 + -pre-jar: called before JAR building
1.33 + -post-jar: called after JAR building
1.34 + -post-clean: called after cleaning build products
1.35 +
1.36 + (Targets beginning with '-' are not intended to be called on their own.)
1.37 +
1.38 + Example of inserting an obfuscator after compilation could look like this:
1.39 +
1.40 + <target name="-post-compile">
1.41 + <obfuscate>
1.42 + <fileset dir="${build.classes.dir}"/>
1.43 + </obfuscate>
1.44 + </target>
1.45 +
1.46 + For list of available properties check the imported
1.47 + nbproject/build-impl.xml file.
1.48 +
1.49 +
1.50 + Another way to customize the build is by overriding existing main targets.
1.51 + The targets of interest are:
1.52 +
1.53 + -init-macrodef-javac: defines macro for javac compilation
1.54 + -init-macrodef-junit: defines macro for junit execution
1.55 + -init-macrodef-debug: defines macro for class debugging
1.56 + -init-macrodef-java: defines macro for class execution
1.57 + -do-jar-with-manifest: JAR building (if you are using a manifest)
1.58 + -do-jar-without-manifest: JAR building (if you are not using a manifest)
1.59 + run: execution of project
1.60 + -javadoc-build: Javadoc generation
1.61 + test-report: JUnit report generation
1.62 +
1.63 + An example of overriding the target for project execution could look like this:
1.64 +
1.65 + <target name="run" depends="openfixed-impl.jar">
1.66 + <exec dir="bin" executable="launcher.exe">
1.67 + <arg file="${dist.jar}"/>
1.68 + </exec>
1.69 + </target>
1.70 +
1.71 + Notice that the overridden target depends on the jar target and not only on
1.72 + the compile target as the regular run target does. Again, for a list of available
1.73 + properties which you can use, check the target you are overriding in the
1.74 + nbproject/build-impl.xml file.
1.75 +
1.76 + -->
1.77 +</project>
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/samples/openfixed/nbproject/build-impl.xml Sun Mar 20 08:12:26 2011 +0100
2.3 @@ -0,0 +1,1041 @@
2.4 +<?xml version="1.0" encoding="UTF-8"?>
2.5 +<!--
2.6 +*** GENERATED FROM project.xml - DO NOT EDIT ***
2.7 +*** EDIT ../build.xml INSTEAD ***
2.8 +
2.9 +For the purpose of easier reading the script
2.10 +is divided into following sections:
2.11 +
2.12 + - initialization
2.13 + - compilation
2.14 + - jar
2.15 + - execution
2.16 + - debugging
2.17 + - javadoc
2.18 + - junit compilation
2.19 + - junit execution
2.20 + - junit debugging
2.21 + - applet
2.22 + - cleanup
2.23 +
2.24 + -->
2.25 +<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="openfixed-impl">
2.26 + <fail message="Please build using Ant 1.7.1 or higher.">
2.27 + <condition>
2.28 + <not>
2.29 + <antversion atleast="1.7.1"/>
2.30 + </not>
2.31 + </condition>
2.32 + </fail>
2.33 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
2.34 + <!--
2.35 + ======================
2.36 + INITIALIZATION SECTION
2.37 + ======================
2.38 + -->
2.39 + <target name="-pre-init">
2.40 + <!-- Empty placeholder for easier customization. -->
2.41 + <!-- You can override this target in the ../build.xml file. -->
2.42 + </target>
2.43 + <target depends="-pre-init" name="-init-private">
2.44 + <property file="nbproject/private/config.properties"/>
2.45 + <property file="nbproject/private/configs/${config}.properties"/>
2.46 + <property file="nbproject/private/private.properties"/>
2.47 + </target>
2.48 + <target depends="-pre-init,-init-private" name="-init-user">
2.49 + <property file="${user.properties.file}"/>
2.50 + <!-- The two properties below are usually overridden -->
2.51 + <!-- by the active platform. Just a fallback. -->
2.52 + <property name="default.javac.source" value="1.4"/>
2.53 + <property name="default.javac.target" value="1.4"/>
2.54 + </target>
2.55 + <target depends="-pre-init,-init-private,-init-user" name="-init-project">
2.56 + <property file="nbproject/configs/${config}.properties"/>
2.57 + <property file="nbproject/project.properties"/>
2.58 + </target>
2.59 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
2.60 + <available file="${manifest.file}" property="manifest.available"/>
2.61 + <condition property="splashscreen.available">
2.62 + <and>
2.63 + <not>
2.64 + <equals arg1="${application.splash}" arg2="" trim="true"/>
2.65 + </not>
2.66 + <available file="${application.splash}"/>
2.67 + </and>
2.68 + </condition>
2.69 + <condition property="main.class.available">
2.70 + <and>
2.71 + <isset property="main.class"/>
2.72 + <not>
2.73 + <equals arg1="${main.class}" arg2="" trim="true"/>
2.74 + </not>
2.75 + </and>
2.76 + </condition>
2.77 + <condition property="manifest.available+main.class">
2.78 + <and>
2.79 + <isset property="manifest.available"/>
2.80 + <isset property="main.class.available"/>
2.81 + </and>
2.82 + </condition>
2.83 + <condition property="do.archive">
2.84 + <not>
2.85 + <istrue value="${jar.archive.disabled}"/>
2.86 + </not>
2.87 + </condition>
2.88 + <condition property="do.mkdist">
2.89 + <and>
2.90 + <isset property="do.archive"/>
2.91 + <isset property="libs.CopyLibs.classpath"/>
2.92 + <not>
2.93 + <istrue value="${mkdist.disabled}"/>
2.94 + </not>
2.95 + </and>
2.96 + </condition>
2.97 + <condition property="manifest.available+main.class+mkdist.available">
2.98 + <and>
2.99 + <istrue value="${manifest.available+main.class}"/>
2.100 + <isset property="do.mkdist"/>
2.101 + </and>
2.102 + </condition>
2.103 + <condition property="do.archive+manifest.available">
2.104 + <and>
2.105 + <isset property="manifest.available"/>
2.106 + <istrue value="${do.archive}"/>
2.107 + </and>
2.108 + </condition>
2.109 + <condition property="do.archive+main.class.available">
2.110 + <and>
2.111 + <isset property="main.class.available"/>
2.112 + <istrue value="${do.archive}"/>
2.113 + </and>
2.114 + </condition>
2.115 + <condition property="do.archive+splashscreen.available">
2.116 + <and>
2.117 + <isset property="splashscreen.available"/>
2.118 + <istrue value="${do.archive}"/>
2.119 + </and>
2.120 + </condition>
2.121 + <condition property="do.archive+manifest.available+main.class">
2.122 + <and>
2.123 + <istrue value="${manifest.available+main.class}"/>
2.124 + <istrue value="${do.archive}"/>
2.125 + </and>
2.126 + </condition>
2.127 + <condition property="manifest.available-mkdist.available">
2.128 + <or>
2.129 + <istrue value="${manifest.available}"/>
2.130 + <isset property="do.mkdist"/>
2.131 + </or>
2.132 + </condition>
2.133 + <condition property="manifest.available+main.class-mkdist.available">
2.134 + <or>
2.135 + <istrue value="${manifest.available+main.class}"/>
2.136 + <isset property="do.mkdist"/>
2.137 + </or>
2.138 + </condition>
2.139 + <condition property="have.tests">
2.140 + <or>
2.141 + <available file="${test.src.dir}"/>
2.142 + </or>
2.143 + </condition>
2.144 + <condition property="have.sources">
2.145 + <or>
2.146 + <available file="${src.dir}"/>
2.147 + </or>
2.148 + </condition>
2.149 + <condition property="netbeans.home+have.tests">
2.150 + <and>
2.151 + <isset property="netbeans.home"/>
2.152 + <isset property="have.tests"/>
2.153 + </and>
2.154 + </condition>
2.155 + <condition property="no.javadoc.preview">
2.156 + <and>
2.157 + <isset property="javadoc.preview"/>
2.158 + <isfalse value="${javadoc.preview}"/>
2.159 + </and>
2.160 + </condition>
2.161 + <property name="run.jvmargs" value=""/>
2.162 + <property name="javac.compilerargs" value=""/>
2.163 + <property name="work.dir" value="${basedir}"/>
2.164 + <condition property="no.deps">
2.165 + <and>
2.166 + <istrue value="${no.dependencies}"/>
2.167 + </and>
2.168 + </condition>
2.169 + <property name="javac.debug" value="true"/>
2.170 + <property name="javadoc.preview" value="true"/>
2.171 + <property name="application.args" value=""/>
2.172 + <property name="source.encoding" value="${file.encoding}"/>
2.173 + <property name="runtime.encoding" value="${source.encoding}"/>
2.174 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
2.175 + <and>
2.176 + <isset property="javadoc.encoding"/>
2.177 + <not>
2.178 + <equals arg1="${javadoc.encoding}" arg2=""/>
2.179 + </not>
2.180 + </and>
2.181 + </condition>
2.182 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
2.183 + <property name="includes" value="**"/>
2.184 + <property name="excludes" value=""/>
2.185 + <property name="do.depend" value="false"/>
2.186 + <condition property="do.depend.true">
2.187 + <istrue value="${do.depend}"/>
2.188 + </condition>
2.189 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
2.190 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
2.191 + <length length="0" string="${endorsed.classpath}" when="greater"/>
2.192 + </condition>
2.193 + <condition else="false" property="jdkBug6558476">
2.194 + <and>
2.195 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
2.196 + <not>
2.197 + <os family="unix"/>
2.198 + </not>
2.199 + </and>
2.200 + </condition>
2.201 + <property name="javac.fork" value="${jdkBug6558476}"/>
2.202 + <property name="jar.index" value="false"/>
2.203 + <property name="jar.index.metainf" value="${jar.index}"/>
2.204 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
2.205 + </target>
2.206 + <target name="-post-init">
2.207 + <!-- Empty placeholder for easier customization. -->
2.208 + <!-- You can override this target in the ../build.xml file. -->
2.209 + </target>
2.210 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
2.211 + <fail unless="src.dir">Must set src.dir</fail>
2.212 + <fail unless="test.src.dir">Must set test.src.dir</fail>
2.213 + <fail unless="build.dir">Must set build.dir</fail>
2.214 + <fail unless="dist.dir">Must set dist.dir</fail>
2.215 + <fail unless="build.classes.dir">Must set build.classes.dir</fail>
2.216 + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
2.217 + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
2.218 + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
2.219 + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
2.220 + <fail unless="dist.jar">Must set dist.jar</fail>
2.221 + </target>
2.222 + <target name="-init-macrodef-property">
2.223 + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
2.224 + <attribute name="name"/>
2.225 + <attribute name="value"/>
2.226 + <sequential>
2.227 + <property name="@{name}" value="${@{value}}"/>
2.228 + </sequential>
2.229 + </macrodef>
2.230 + </target>
2.231 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
2.232 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
2.233 + <attribute default="${src.dir}" name="srcdir"/>
2.234 + <attribute default="${build.classes.dir}" name="destdir"/>
2.235 + <attribute default="${javac.classpath}" name="classpath"/>
2.236 + <attribute default="${javac.processorpath}" name="processorpath"/>
2.237 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
2.238 + <attribute default="${includes}" name="includes"/>
2.239 + <attribute default="${excludes}" name="excludes"/>
2.240 + <attribute default="${javac.debug}" name="debug"/>
2.241 + <attribute default="${empty.dir}" name="sourcepath"/>
2.242 + <attribute default="${empty.dir}" name="gensrcdir"/>
2.243 + <element name="customize" optional="true"/>
2.244 + <sequential>
2.245 + <property location="${build.dir}/empty" name="empty.dir"/>
2.246 + <mkdir dir="${empty.dir}"/>
2.247 + <mkdir dir="@{apgeneratedsrcdir}"/>
2.248 + <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}">
2.249 + <src>
2.250 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
2.251 + <include name="*"/>
2.252 + </dirset>
2.253 + </src>
2.254 + <classpath>
2.255 + <path path="@{classpath}"/>
2.256 + </classpath>
2.257 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
2.258 + <compilerarg line="${javac.compilerargs}"/>
2.259 + <compilerarg value="-processorpath"/>
2.260 + <compilerarg path="@{processorpath}:${empty.dir}"/>
2.261 + <compilerarg line="${ap.processors.internal}"/>
2.262 + <compilerarg line="${annotation.processing.processor.options}"/>
2.263 + <compilerarg value="-s"/>
2.264 + <compilerarg path="@{apgeneratedsrcdir}"/>
2.265 + <compilerarg line="${ap.proc.none.internal}"/>
2.266 + <customize/>
2.267 + </javac>
2.268 + </sequential>
2.269 + </macrodef>
2.270 + </target>
2.271 + <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
2.272 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
2.273 + <attribute default="${src.dir}" name="srcdir"/>
2.274 + <attribute default="${build.classes.dir}" name="destdir"/>
2.275 + <attribute default="${javac.classpath}" name="classpath"/>
2.276 + <attribute default="${javac.processorpath}" name="processorpath"/>
2.277 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
2.278 + <attribute default="${includes}" name="includes"/>
2.279 + <attribute default="${excludes}" name="excludes"/>
2.280 + <attribute default="${javac.debug}" name="debug"/>
2.281 + <attribute default="${empty.dir}" name="sourcepath"/>
2.282 + <attribute default="${empty.dir}" name="gensrcdir"/>
2.283 + <element name="customize" optional="true"/>
2.284 + <sequential>
2.285 + <property location="${build.dir}/empty" name="empty.dir"/>
2.286 + <mkdir dir="${empty.dir}"/>
2.287 + <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}">
2.288 + <src>
2.289 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
2.290 + <include name="*"/>
2.291 + </dirset>
2.292 + </src>
2.293 + <classpath>
2.294 + <path path="@{classpath}"/>
2.295 + </classpath>
2.296 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
2.297 + <compilerarg line="${javac.compilerargs}"/>
2.298 + <customize/>
2.299 + </javac>
2.300 + </sequential>
2.301 + </macrodef>
2.302 + </target>
2.303 + <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
2.304 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
2.305 + <attribute default="${src.dir}" name="srcdir"/>
2.306 + <attribute default="${build.classes.dir}" name="destdir"/>
2.307 + <attribute default="${javac.classpath}" name="classpath"/>
2.308 + <sequential>
2.309 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
2.310 + <classpath>
2.311 + <path path="@{classpath}"/>
2.312 + </classpath>
2.313 + </depend>
2.314 + </sequential>
2.315 + </macrodef>
2.316 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
2.317 + <attribute default="${build.classes.dir}" name="destdir"/>
2.318 + <sequential>
2.319 + <fail unless="javac.includes">Must set javac.includes</fail>
2.320 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
2.321 + <path>
2.322 + <filelist dir="@{destdir}" files="${javac.includes}"/>
2.323 + </path>
2.324 + <globmapper from="*.java" to="*.class"/>
2.325 + </pathconvert>
2.326 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
2.327 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
2.328 + <delete>
2.329 + <files includesfile="${javac.includesfile.binary}"/>
2.330 + </delete>
2.331 + <delete>
2.332 + <fileset file="${javac.includesfile.binary}"/>
2.333 + </delete>
2.334 + </sequential>
2.335 + </macrodef>
2.336 + </target>
2.337 + <target name="-init-macrodef-junit">
2.338 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
2.339 + <attribute default="${includes}" name="includes"/>
2.340 + <attribute default="${excludes}" name="excludes"/>
2.341 + <attribute default="**" name="testincludes"/>
2.342 + <sequential>
2.343 + <property name="junit.forkmode" value="perTest"/>
2.344 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
2.345 + <batchtest todir="${build.test.results.dir}">
2.346 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
2.347 + <filename name="@{testincludes}"/>
2.348 + </fileset>
2.349 + </batchtest>
2.350 + <classpath>
2.351 + <path path="${run.test.classpath}"/>
2.352 + </classpath>
2.353 + <syspropertyset>
2.354 + <propertyref prefix="test-sys-prop."/>
2.355 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
2.356 + </syspropertyset>
2.357 + <formatter type="brief" usefile="false"/>
2.358 + <formatter type="xml"/>
2.359 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
2.360 + <jvmarg value="-ea"/>
2.361 + <jvmarg line="${run.jvmargs}"/>
2.362 + </junit>
2.363 + </sequential>
2.364 + </macrodef>
2.365 + </target>
2.366 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
2.367 + <target name="-profile-pre-init">
2.368 + <!-- Empty placeholder for easier customization. -->
2.369 + <!-- You can override this target in the ../build.xml file. -->
2.370 + </target>
2.371 + <target name="-profile-post-init">
2.372 + <!-- Empty placeholder for easier customization. -->
2.373 + <!-- You can override this target in the ../build.xml file. -->
2.374 + </target>
2.375 + <target name="-profile-init-macrodef-profile">
2.376 + <macrodef name="resolve">
2.377 + <attribute name="name"/>
2.378 + <attribute name="value"/>
2.379 + <sequential>
2.380 + <property name="@{name}" value="${env.@{value}}"/>
2.381 + </sequential>
2.382 + </macrodef>
2.383 + <macrodef name="profile">
2.384 + <attribute default="${main.class}" name="classname"/>
2.385 + <element name="customize" optional="true"/>
2.386 + <sequential>
2.387 + <property environment="env"/>
2.388 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
2.389 + <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
2.390 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
2.391 + <jvmarg line="${profiler.info.jvmargs}"/>
2.392 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
2.393 + <arg line="${application.args}"/>
2.394 + <classpath>
2.395 + <path path="${run.classpath}"/>
2.396 + </classpath>
2.397 + <syspropertyset>
2.398 + <propertyref prefix="run-sys-prop."/>
2.399 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
2.400 + </syspropertyset>
2.401 + <customize/>
2.402 + </java>
2.403 + </sequential>
2.404 + </macrodef>
2.405 + </target>
2.406 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
2.407 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
2.408 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
2.409 + </target>
2.410 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
2.411 + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
2.412 + <attribute default="${main.class}" name="name"/>
2.413 + <attribute default="${debug.classpath}" name="classpath"/>
2.414 + <attribute default="" name="stopclassname"/>
2.415 + <sequential>
2.416 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
2.417 + <classpath>
2.418 + <path path="@{classpath}"/>
2.419 + </classpath>
2.420 + </nbjpdastart>
2.421 + </sequential>
2.422 + </macrodef>
2.423 + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
2.424 + <attribute default="${build.classes.dir}" name="dir"/>
2.425 + <sequential>
2.426 + <nbjpdareload>
2.427 + <fileset dir="@{dir}" includes="${fix.classes}">
2.428 + <include name="${fix.includes}*.class"/>
2.429 + </fileset>
2.430 + </nbjpdareload>
2.431 + </sequential>
2.432 + </macrodef>
2.433 + </target>
2.434 + <target name="-init-debug-args">
2.435 + <property name="version-output" value="java version "${ant.java.version}"/>
2.436 + <condition property="have-jdk-older-than-1.4">
2.437 + <or>
2.438 + <contains string="${version-output}" substring="java version "1.0"/>
2.439 + <contains string="${version-output}" substring="java version "1.1"/>
2.440 + <contains string="${version-output}" substring="java version "1.2"/>
2.441 + <contains string="${version-output}" substring="java version "1.3"/>
2.442 + </or>
2.443 + </condition>
2.444 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
2.445 + <istrue value="${have-jdk-older-than-1.4}"/>
2.446 + </condition>
2.447 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
2.448 + <os family="windows"/>
2.449 + </condition>
2.450 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
2.451 + <isset property="debug.transport"/>
2.452 + </condition>
2.453 + </target>
2.454 + <target depends="-init-debug-args" name="-init-macrodef-debug">
2.455 + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
2.456 + <attribute default="${main.class}" name="classname"/>
2.457 + <attribute default="${debug.classpath}" name="classpath"/>
2.458 + <element name="customize" optional="true"/>
2.459 + <sequential>
2.460 + <java classname="@{classname}" dir="${work.dir}" fork="true">
2.461 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
2.462 + <jvmarg line="${debug-args-line}"/>
2.463 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
2.464 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
2.465 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
2.466 + <jvmarg line="${run.jvmargs}"/>
2.467 + <classpath>
2.468 + <path path="@{classpath}"/>
2.469 + </classpath>
2.470 + <syspropertyset>
2.471 + <propertyref prefix="run-sys-prop."/>
2.472 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
2.473 + </syspropertyset>
2.474 + <customize/>
2.475 + </java>
2.476 + </sequential>
2.477 + </macrodef>
2.478 + </target>
2.479 + <target name="-init-macrodef-java">
2.480 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
2.481 + <attribute default="${main.class}" name="classname"/>
2.482 + <attribute default="${run.classpath}" name="classpath"/>
2.483 + <element name="customize" optional="true"/>
2.484 + <sequential>
2.485 + <java classname="@{classname}" dir="${work.dir}" fork="true">
2.486 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
2.487 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
2.488 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
2.489 + <jvmarg line="${run.jvmargs}"/>
2.490 + <classpath>
2.491 + <path path="@{classpath}"/>
2.492 + </classpath>
2.493 + <syspropertyset>
2.494 + <propertyref prefix="run-sys-prop."/>
2.495 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
2.496 + </syspropertyset>
2.497 + <customize/>
2.498 + </java>
2.499 + </sequential>
2.500 + </macrodef>
2.501 + </target>
2.502 + <target name="-init-macrodef-copylibs">
2.503 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
2.504 + <attribute default="${manifest.file}" name="manifest"/>
2.505 + <element name="customize" optional="true"/>
2.506 + <sequential>
2.507 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
2.508 + <pathconvert property="run.classpath.without.build.classes.dir">
2.509 + <path path="${run.classpath}"/>
2.510 + <map from="${build.classes.dir.resolved}" to=""/>
2.511 + </pathconvert>
2.512 + <pathconvert pathsep=" " property="jar.classpath">
2.513 + <path path="${run.classpath.without.build.classes.dir}"/>
2.514 + <chainedmapper>
2.515 + <flattenmapper/>
2.516 + <globmapper from="*" to="lib/*"/>
2.517 + </chainedmapper>
2.518 + </pathconvert>
2.519 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
2.520 + <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
2.521 + <fileset dir="${build.classes.dir}"/>
2.522 + <manifest>
2.523 + <attribute name="Class-Path" value="${jar.classpath}"/>
2.524 + <customize/>
2.525 + </manifest>
2.526 + </copylibs>
2.527 + </sequential>
2.528 + </macrodef>
2.529 + </target>
2.530 + <target name="-init-presetdef-jar">
2.531 + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
2.532 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
2.533 + <j2seproject1:fileset dir="${build.classes.dir}"/>
2.534 + </jar>
2.535 + </presetdef>
2.536 + </target>
2.537 + <target name="-init-ap-cmdline-properties">
2.538 + <property name="annotation.processing.enabled" value="true"/>
2.539 + <property name="annotation.processing.processors.list" value=""/>
2.540 + <property name="annotation.processing.processor.options" value=""/>
2.541 + <property name="annotation.processing.run.all.processors" value="true"/>
2.542 + <property name="javac.processorpath" value="${javac.classpath}"/>
2.543 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
2.544 + <condition property="ap.supported.internal" value="true">
2.545 + <not>
2.546 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
2.547 + </not>
2.548 + </condition>
2.549 + </target>
2.550 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
2.551 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
2.552 + <isfalse value="${annotation.processing.run.all.processors}"/>
2.553 + </condition>
2.554 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
2.555 + <isfalse value="${annotation.processing.enabled}"/>
2.556 + </condition>
2.557 + </target>
2.558 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
2.559 + <property name="ap.cmd.line.internal" value=""/>
2.560 + </target>
2.561 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
2.562 + <!--
2.563 + ===================
2.564 + COMPILATION SECTION
2.565 + ===================
2.566 + -->
2.567 + <target name="-deps-jar-init" unless="built-jar.properties">
2.568 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
2.569 + <delete file="${built-jar.properties}" quiet="true"/>
2.570 + </target>
2.571 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
2.572 + <echo level="warn" message="Cycle detected: openfixed was already built"/>
2.573 + </target>
2.574 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
2.575 + <mkdir dir="${build.dir}"/>
2.576 + <touch file="${built-jar.properties}" verbose="false"/>
2.577 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
2.578 + <antcall target="-warn-already-built-jar"/>
2.579 + <propertyfile file="${built-jar.properties}">
2.580 + <entry key="${basedir}" value=""/>
2.581 + </propertyfile>
2.582 + </target>
2.583 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
2.584 + <target depends="init" name="-check-automatic-build">
2.585 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
2.586 + </target>
2.587 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
2.588 + <antcall target="clean"/>
2.589 + </target>
2.590 + <target depends="init,deps-jar" name="-pre-pre-compile">
2.591 + <mkdir dir="${build.classes.dir}"/>
2.592 + </target>
2.593 + <target name="-pre-compile">
2.594 + <!-- Empty placeholder for easier customization. -->
2.595 + <!-- You can override this target in the ../build.xml file. -->
2.596 + </target>
2.597 + <target if="do.depend.true" name="-compile-depend">
2.598 + <pathconvert property="build.generated.subdirs">
2.599 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
2.600 + <include name="*"/>
2.601 + </dirset>
2.602 + </pathconvert>
2.603 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
2.604 + </target>
2.605 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
2.606 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
2.607 + <copy todir="${build.classes.dir}">
2.608 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
2.609 + </copy>
2.610 + </target>
2.611 + <target if="has.persistence.xml" name="-copy-persistence-xml">
2.612 + <mkdir dir="${build.classes.dir}/META-INF"/>
2.613 + <copy todir="${build.classes.dir}/META-INF">
2.614 + <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
2.615 + </copy>
2.616 + </target>
2.617 + <target name="-post-compile">
2.618 + <!-- Empty placeholder for easier customization. -->
2.619 + <!-- You can override this target in the ../build.xml file. -->
2.620 + </target>
2.621 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
2.622 + <target name="-pre-compile-single">
2.623 + <!-- Empty placeholder for easier customization. -->
2.624 + <!-- You can override this target in the ../build.xml file. -->
2.625 + </target>
2.626 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
2.627 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
2.628 + <j2seproject3:force-recompile/>
2.629 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
2.630 + </target>
2.631 + <target name="-post-compile-single">
2.632 + <!-- Empty placeholder for easier customization. -->
2.633 + <!-- You can override this target in the ../build.xml file. -->
2.634 + </target>
2.635 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
2.636 + <!--
2.637 + ====================
2.638 + JAR BUILDING SECTION
2.639 + ====================
2.640 + -->
2.641 + <target depends="init" name="-pre-pre-jar">
2.642 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
2.643 + <mkdir dir="${dist.jar.dir}"/>
2.644 + </target>
2.645 + <target name="-pre-jar">
2.646 + <!-- Empty placeholder for easier customization. -->
2.647 + <!-- You can override this target in the ../build.xml file. -->
2.648 + </target>
2.649 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
2.650 + <j2seproject1:jar/>
2.651 + </target>
2.652 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
2.653 + <j2seproject1:jar manifest="${manifest.file}"/>
2.654 + </target>
2.655 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
2.656 + <j2seproject1:jar manifest="${manifest.file}">
2.657 + <j2seproject1:manifest>
2.658 + <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
2.659 + </j2seproject1:manifest>
2.660 + </j2seproject1:jar>
2.661 + <echo level="info">To run this application from the command line without Ant, try:</echo>
2.662 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
2.663 + <property location="${dist.jar}" name="dist.jar.resolved"/>
2.664 + <pathconvert property="run.classpath.with.dist.jar">
2.665 + <path path="${run.classpath}"/>
2.666 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
2.667 + </pathconvert>
2.668 + <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
2.669 + </target>
2.670 + <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
2.671 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
2.672 + <touch file="${tmp.manifest.file}" verbose="false"/>
2.673 + </target>
2.674 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
2.675 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
2.676 + <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
2.677 + </target>
2.678 + <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
2.679 + <manifest file="${tmp.manifest.file}" mode="update">
2.680 + <attribute name="Main-Class" value="${main.class}"/>
2.681 + </manifest>
2.682 + </target>
2.683 + <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
2.684 + <basename file="${application.splash}" property="splashscreen.basename"/>
2.685 + <mkdir dir="${build.classes.dir}/META-INF"/>
2.686 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
2.687 + <manifest file="${tmp.manifest.file}" mode="update">
2.688 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
2.689 + </manifest>
2.690 + </target>
2.691 + <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
2.692 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
2.693 + <echo level="info">To run this application from the command line without Ant, try:</echo>
2.694 + <property location="${dist.jar}" name="dist.jar.resolved"/>
2.695 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
2.696 + </target>
2.697 + <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
2.698 + <delete>
2.699 + <fileset file="${tmp.manifest.file}"/>
2.700 + </delete>
2.701 + </target>
2.702 + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
2.703 + <target name="-post-jar">
2.704 + <!-- Empty placeholder for easier customization. -->
2.705 + <!-- You can override this target in the ../build.xml file. -->
2.706 + </target>
2.707 + <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"/>
2.708 + <!--
2.709 + =================
2.710 + EXECUTION SECTION
2.711 + =================
2.712 + -->
2.713 + <target depends="init,compile" description="Run a main class." name="run">
2.714 + <j2seproject1:java>
2.715 + <customize>
2.716 + <arg line="${application.args}"/>
2.717 + </customize>
2.718 + </j2seproject1:java>
2.719 + </target>
2.720 + <target name="-do-not-recompile">
2.721 + <property name="javac.includes.binary" value=""/>
2.722 + </target>
2.723 + <target depends="init,compile-single" name="run-single">
2.724 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
2.725 + <j2seproject1:java classname="${run.class}"/>
2.726 + </target>
2.727 + <target depends="init,compile-test-single" name="run-test-with-main">
2.728 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
2.729 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
2.730 + </target>
2.731 + <!--
2.732 + =================
2.733 + DEBUGGING SECTION
2.734 + =================
2.735 + -->
2.736 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
2.737 + <j2seproject1:nbjpdastart name="${debug.class}"/>
2.738 + </target>
2.739 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
2.740 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
2.741 + </target>
2.742 + <target depends="init,compile" name="-debug-start-debuggee">
2.743 + <j2seproject3:debug>
2.744 + <customize>
2.745 + <arg line="${application.args}"/>
2.746 + </customize>
2.747 + </j2seproject3:debug>
2.748 + </target>
2.749 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
2.750 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
2.751 + <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
2.752 + </target>
2.753 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
2.754 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
2.755 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
2.756 + <j2seproject3:debug classname="${debug.class}"/>
2.757 + </target>
2.758 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
2.759 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
2.760 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
2.761 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
2.762 + </target>
2.763 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
2.764 + <target depends="init" name="-pre-debug-fix">
2.765 + <fail unless="fix.includes">Must set fix.includes</fail>
2.766 + <property name="javac.includes" value="${fix.includes}.java"/>
2.767 + </target>
2.768 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
2.769 + <j2seproject1:nbjpdareload/>
2.770 + </target>
2.771 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
2.772 + <!--
2.773 + =================
2.774 + PROFILING SECTION
2.775 + =================
2.776 + -->
2.777 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
2.778 + <nbprofiledirect>
2.779 + <classpath>
2.780 + <path path="${run.classpath}"/>
2.781 + </classpath>
2.782 + </nbprofiledirect>
2.783 + <profile/>
2.784 + </target>
2.785 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
2.786 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
2.787 + <nbprofiledirect>
2.788 + <classpath>
2.789 + <path path="${run.classpath}"/>
2.790 + </classpath>
2.791 + </nbprofiledirect>
2.792 + <profile classname="${profile.class}"/>
2.793 + </target>
2.794 + <!--
2.795 + =========================
2.796 + APPLET PROFILING SECTION
2.797 + =========================
2.798 + -->
2.799 + <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
2.800 + <nbprofiledirect>
2.801 + <classpath>
2.802 + <path path="${run.classpath}"/>
2.803 + </classpath>
2.804 + </nbprofiledirect>
2.805 + <profile classname="sun.applet.AppletViewer">
2.806 + <customize>
2.807 + <arg value="${applet.url}"/>
2.808 + </customize>
2.809 + </profile>
2.810 + </target>
2.811 + <!--
2.812 + =========================
2.813 + TESTS PROFILING SECTION
2.814 + =========================
2.815 + -->
2.816 + <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
2.817 + <nbprofiledirect>
2.818 + <classpath>
2.819 + <path path="${run.test.classpath}"/>
2.820 + </classpath>
2.821 + </nbprofiledirect>
2.822 + <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
2.823 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
2.824 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
2.825 + <jvmarg line="${profiler.info.jvmargs}"/>
2.826 + <test name="${profile.class}"/>
2.827 + <classpath>
2.828 + <path path="${run.test.classpath}"/>
2.829 + </classpath>
2.830 + <syspropertyset>
2.831 + <propertyref prefix="test-sys-prop."/>
2.832 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
2.833 + </syspropertyset>
2.834 + <formatter type="brief" usefile="false"/>
2.835 + <formatter type="xml"/>
2.836 + </junit>
2.837 + </target>
2.838 + <!--
2.839 + ===============
2.840 + JAVADOC SECTION
2.841 + ===============
2.842 + -->
2.843 + <target depends="init" if="have.sources" name="-javadoc-build">
2.844 + <mkdir dir="${dist.javadoc.dir}"/>
2.845 + <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
2.846 + <classpath>
2.847 + <path path="${javac.classpath}"/>
2.848 + </classpath>
2.849 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
2.850 + <filename name="**/*.java"/>
2.851 + </fileset>
2.852 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
2.853 + <include name="**/*.java"/>
2.854 + </fileset>
2.855 + </javadoc>
2.856 + <copy todir="${dist.javadoc.dir}">
2.857 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
2.858 + <filename name="**/doc-files/**"/>
2.859 + </fileset>
2.860 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
2.861 + <include name="**/doc-files/**"/>
2.862 + </fileset>
2.863 + </copy>
2.864 + </target>
2.865 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
2.866 + <nbbrowse file="${dist.javadoc.dir}/index.html"/>
2.867 + </target>
2.868 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
2.869 + <!--
2.870 + =========================
2.871 + JUNIT COMPILATION SECTION
2.872 + =========================
2.873 + -->
2.874 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
2.875 + <mkdir dir="${build.test.classes.dir}"/>
2.876 + </target>
2.877 + <target name="-pre-compile-test">
2.878 + <!-- Empty placeholder for easier customization. -->
2.879 + <!-- You can override this target in the ../build.xml file. -->
2.880 + </target>
2.881 + <target if="do.depend.true" name="-compile-test-depend">
2.882 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
2.883 + </target>
2.884 + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
2.885 + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
2.886 + <copy todir="${build.test.classes.dir}">
2.887 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
2.888 + </copy>
2.889 + </target>
2.890 + <target name="-post-compile-test">
2.891 + <!-- Empty placeholder for easier customization. -->
2.892 + <!-- You can override this target in the ../build.xml file. -->
2.893 + </target>
2.894 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
2.895 + <target name="-pre-compile-test-single">
2.896 + <!-- Empty placeholder for easier customization. -->
2.897 + <!-- You can override this target in the ../build.xml file. -->
2.898 + </target>
2.899 + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
2.900 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
2.901 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
2.902 + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
2.903 + <copy todir="${build.test.classes.dir}">
2.904 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
2.905 + </copy>
2.906 + </target>
2.907 + <target name="-post-compile-test-single">
2.908 + <!-- Empty placeholder for easier customization. -->
2.909 + <!-- You can override this target in the ../build.xml file. -->
2.910 + </target>
2.911 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
2.912 + <!--
2.913 + =======================
2.914 + JUNIT EXECUTION SECTION
2.915 + =======================
2.916 + -->
2.917 + <target depends="init" if="have.tests" name="-pre-test-run">
2.918 + <mkdir dir="${build.test.results.dir}"/>
2.919 + </target>
2.920 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
2.921 + <j2seproject3:junit testincludes="**/*Test.java"/>
2.922 + </target>
2.923 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
2.924 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
2.925 + </target>
2.926 + <target depends="init" if="have.tests" name="test-report"/>
2.927 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
2.928 + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
2.929 + <target depends="init" if="have.tests" name="-pre-test-run-single">
2.930 + <mkdir dir="${build.test.results.dir}"/>
2.931 + </target>
2.932 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
2.933 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
2.934 + <j2seproject3:junit excludes="" includes="${test.includes}"/>
2.935 + </target>
2.936 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
2.937 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
2.938 + </target>
2.939 + <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"/>
2.940 + <!--
2.941 + =======================
2.942 + JUNIT DEBUGGING SECTION
2.943 + =======================
2.944 + -->
2.945 + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
2.946 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
2.947 + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
2.948 + <delete file="${test.report.file}"/>
2.949 + <mkdir dir="${build.test.results.dir}"/>
2.950 + <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
2.951 + <customize>
2.952 + <syspropertyset>
2.953 + <propertyref prefix="test-sys-prop."/>
2.954 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
2.955 + </syspropertyset>
2.956 + <arg value="${test.class}"/>
2.957 + <arg value="showoutput=true"/>
2.958 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
2.959 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
2.960 + </customize>
2.961 + </j2seproject3:debug>
2.962 + </target>
2.963 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
2.964 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
2.965 + </target>
2.966 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
2.967 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
2.968 + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
2.969 + </target>
2.970 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
2.971 + <!--
2.972 + =========================
2.973 + APPLET EXECUTION SECTION
2.974 + =========================
2.975 + -->
2.976 + <target depends="init,compile-single" name="run-applet">
2.977 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
2.978 + <j2seproject1:java classname="sun.applet.AppletViewer">
2.979 + <customize>
2.980 + <arg value="${applet.url}"/>
2.981 + </customize>
2.982 + </j2seproject1:java>
2.983 + </target>
2.984 + <!--
2.985 + =========================
2.986 + APPLET DEBUGGING SECTION
2.987 + =========================
2.988 + -->
2.989 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
2.990 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
2.991 + <j2seproject3:debug classname="sun.applet.AppletViewer">
2.992 + <customize>
2.993 + <arg value="${applet.url}"/>
2.994 + </customize>
2.995 + </j2seproject3:debug>
2.996 + </target>
2.997 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
2.998 + <!--
2.999 + ===============
2.1000 + CLEANUP SECTION
2.1001 + ===============
2.1002 + -->
2.1003 + <target name="-deps-clean-init" unless="built-clean.properties">
2.1004 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
2.1005 + <delete file="${built-clean.properties}" quiet="true"/>
2.1006 + </target>
2.1007 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
2.1008 + <echo level="warn" message="Cycle detected: openfixed was already built"/>
2.1009 + </target>
2.1010 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
2.1011 + <mkdir dir="${build.dir}"/>
2.1012 + <touch file="${built-clean.properties}" verbose="false"/>
2.1013 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
2.1014 + <antcall target="-warn-already-built-clean"/>
2.1015 + <propertyfile file="${built-clean.properties}">
2.1016 + <entry key="${basedir}" value=""/>
2.1017 + </propertyfile>
2.1018 + </target>
2.1019 + <target depends="init" name="-do-clean">
2.1020 + <delete dir="${build.dir}"/>
2.1021 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
2.1022 + </target>
2.1023 + <target name="-post-clean">
2.1024 + <!-- Empty placeholder for easier customization. -->
2.1025 + <!-- You can override this target in the ../build.xml file. -->
2.1026 + </target>
2.1027 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
2.1028 + <target name="-check-call-dep">
2.1029 + <property file="${call.built.properties}" prefix="already.built."/>
2.1030 + <condition property="should.call.dep">
2.1031 + <not>
2.1032 + <isset property="already.built.${call.subproject}"/>
2.1033 + </not>
2.1034 + </condition>
2.1035 + </target>
2.1036 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
2.1037 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
2.1038 + <propertyset>
2.1039 + <propertyref prefix="transfer."/>
2.1040 + <mapper from="transfer.*" to="*" type="glob"/>
2.1041 + </propertyset>
2.1042 + </ant>
2.1043 + </target>
2.1044 +</project>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/samples/openfixed/nbproject/genfiles.properties Sun Mar 20 08:12:26 2011 +0100
3.3 @@ -0,0 +1,8 @@
3.4 +build.xml.data.CRC32=33b4766a
3.5 +build.xml.script.CRC32=5b02ecff
3.6 +build.xml.stylesheet.CRC32=28e38971@1.43.0.45
3.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
3.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
3.9 +nbproject/build-impl.xml.data.CRC32=33b4766a
3.10 +nbproject/build-impl.xml.script.CRC32=05841ecd
3.11 +nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.0.45
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/samples/openfixed/nbproject/project.properties Sun Mar 20 08:12:26 2011 +0100
4.3 @@ -0,0 +1,69 @@
4.4 +annotation.processing.enabled=true
4.5 +annotation.processing.enabled.in.editor=false
4.6 +annotation.processing.processor.options=
4.7 +annotation.processing.processors.list=
4.8 +annotation.processing.run.all.processors=true
4.9 +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
4.10 +build.classes.dir=${build.dir}/classes
4.11 +build.classes.excludes=**/*.java,**/*.form
4.12 +# This directory is removed when the project is cleaned:
4.13 +build.dir=build
4.14 +build.generated.dir=${build.dir}/generated
4.15 +build.generated.sources.dir=${build.dir}/generated-sources
4.16 +# Only compile against the classpath explicitly listed here:
4.17 +build.sysclasspath=ignore
4.18 +build.test.classes.dir=${build.dir}/test/classes
4.19 +build.test.results.dir=${build.dir}/test/results
4.20 +# Uncomment to specify the preferred debugger connection transport:
4.21 +#debug.transport=dt_socket
4.22 +debug.classpath=\
4.23 + ${run.classpath}
4.24 +debug.test.classpath=\
4.25 + ${run.test.classpath}
4.26 +# This directory is removed when the project is cleaned:
4.27 +dist.dir=dist
4.28 +dist.jar=${dist.dir}/openfixed.jar
4.29 +dist.javadoc.dir=${dist.dir}/javadoc
4.30 +excludes=
4.31 +includes=**
4.32 +jar.compress=false
4.33 +javac.classpath=
4.34 +# Space-separated list of extra javac options
4.35 +javac.compilerargs=
4.36 +javac.deprecation=false
4.37 +javac.processorpath=\
4.38 + ${javac.classpath}
4.39 +javac.source=1.6
4.40 +javac.target=1.6
4.41 +javac.test.classpath=\
4.42 + ${javac.classpath}:\
4.43 + ${build.classes.dir}
4.44 +javac.test.processorpath=\
4.45 + ${javac.test.classpath}
4.46 +javadoc.additionalparam=
4.47 +javadoc.author=false
4.48 +javadoc.encoding=${source.encoding}
4.49 +javadoc.noindex=false
4.50 +javadoc.nonavbar=false
4.51 +javadoc.notree=false
4.52 +javadoc.private=false
4.53 +javadoc.splitindex=true
4.54 +javadoc.use=true
4.55 +javadoc.version=false
4.56 +javadoc.windowtitle=
4.57 +meta.inf.dir=${src.dir}/META-INF
4.58 +mkdist.disabled=true
4.59 +platform.active=default_platform
4.60 +run.classpath=\
4.61 + ${javac.classpath}:\
4.62 + ${build.classes.dir}
4.63 +# Space-separated list of JVM arguments used when running the project
4.64 +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
4.65 +# or test-sys-prop.name=value to set system properties for unit tests):
4.66 +run.jvmargs=
4.67 +run.test.classpath=\
4.68 + ${javac.test.classpath}:\
4.69 + ${build.test.classes.dir}
4.70 +source.encoding=UTF-8
4.71 +src.dir=src
4.72 +test.src.dir=test
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/samples/openfixed/nbproject/project.xml Sun Mar 20 08:12:26 2011 +0100
5.3 @@ -0,0 +1,15 @@
5.4 +<?xml version="1.0" encoding="UTF-8"?>
5.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
5.6 + <type>org.netbeans.modules.java.j2seproject</type>
5.7 + <configuration>
5.8 + <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
5.9 + <name>openfixed</name>
5.10 + <source-roots>
5.11 + <root id="src.dir"/>
5.12 + </source-roots>
5.13 + <test-roots>
5.14 + <root id="test.src.dir"/>
5.15 + </test-roots>
5.16 + </data>
5.17 + </configuration>
5.18 +</project>
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/samples/openfixed/src/org/apidesign/openfixed/Growable.java Sun Mar 20 08:12:26 2011 +0100
6.3 @@ -0,0 +1,19 @@
6.4 +package org.apidesign.openfixed;
6.5 +
6.6 +import java.util.List;
6.7 +import java.util.concurrent.CopyOnWriteArrayList;
6.8 +
6.9 +/** Sample bean using the {@link GrowingListener}.
6.10 + *
6.11 + * @author Jaroslav Tulach <jtulach@netbeans.org>
6.12 + */
6.13 +public final class Growable {
6.14 + private List<GrowingListener> listeners = new CopyOnWriteArrayList<GrowingListener>();
6.15 +
6.16 + public void addGrowingListener(GrowingListener l) {
6.17 + listeners.add(l);
6.18 + }
6.19 + public void removeGrowingListener(GrowingListener l) {
6.20 + listeners.remove(l);
6.21 + }
6.22 +}
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/samples/openfixed/src/org/apidesign/openfixed/GrowingEvent.java Sun Mar 20 08:12:26 2011 +0100
7.3 @@ -0,0 +1,25 @@
7.4 +package org.apidesign.openfixed;
7.5 +
7.6 +import java.util.EventObject;
7.7 +
7.8 +// BEGIN: openfixed.event
7.9 +public final class GrowingEvent extends EventObject {
7.10 + public GrowingEvent(Object source) {
7.11 + super(source);
7.12 + }
7.13 +// FINISH: openfixed.event
7.14 +
7.15 +// BEGIN: openfixed.addgetter
7.16 + private int index;
7.17 + /** @since 2.0 */
7.18 + public GrowingEvent(Object source, int index) {
7.19 + super(source);
7.20 + this.index = index;
7.21 + }
7.22 +
7.23 + /** @since 2.0 */
7.24 + public int getIndex() {
7.25 + return index;
7.26 + }
7.27 +// END: openfixed.addgetter
7.28 +}
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/samples/openfixed/src/org/apidesign/openfixed/GrowingListener.java Sun Mar 20 08:12:26 2011 +0100
8.3 @@ -0,0 +1,9 @@
8.4 +package org.apidesign.openfixed;
8.5 +
8.6 +import java.util.EventListener;
8.7 +
8.8 +// BEGIN: openfixed.listener
8.9 +public interface GrowingListener extends EventListener {
8.10 + public void response(GrowingEvent ev);
8.11 +}
8.12 +// FINISH: openfixed.listener