1.1 --- a/.hgignore Mon Nov 11 13:17:34 2019 +0100
1.2 +++ b/.hgignore Tue Nov 12 08:55:35 2019 +0100
1.3 @@ -1,4 +1,5 @@
1.4 .*/build/.*
1.5 +.*/target/.*
1.6 .*/dist/.*
1.7 .*/nbproject/private/.*
1.8 .*.orig$
2.1 --- a/samples/livedb/build.xml Mon Nov 11 13:17:34 2019 +0100
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,111 +0,0 @@
2.4 -<?xml version="1.0" encoding="UTF-8"?>
2.5 -<!-- You may freely edit this file. See commented blocks below for -->
2.6 -<!-- some examples of how to customize the build. -->
2.7 -<!-- (If you delete it and reopen the project it will be recreated.) -->
2.8 -<!-- By default, only the Clean and Build commands use this build script. -->
2.9 -<!-- Commands such as Run, Debug, and Test only use this build script if -->
2.10 -<!-- the Compile on Save feature is turned off for the project. -->
2.11 -<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
2.12 -<!-- in the project's Project Properties dialog box.-->
2.13 -<project name="livedb" default="default" basedir=".">
2.14 - <description>Builds, tests, and runs the project livedb.</description>
2.15 - <import file="nbproject/build-impl.xml"/>
2.16 -
2.17 - <ant dir="../libs/"/>
2.18 - <!--
2.19 -
2.20 - There exist several targets which are by default empty and which can be
2.21 - used for execution of your tasks. These targets are usually executed
2.22 - before and after some main targets. They are:
2.23 -
2.24 - -pre-init: called before initialization of project properties
2.25 - -post-init: called after initialization of project properties
2.26 - -pre-compile: called before javac compilation
2.27 - -post-compile: called after javac compilation
2.28 - -pre-compile-single: called before javac compilation of single file
2.29 - -post-compile-single: called after javac compilation of single file
2.30 - -pre-compile-test: called before javac compilation of JUnit tests
2.31 - -post-compile-test: called after javac compilation of JUnit tests
2.32 - -pre-compile-test-single: called before javac compilation of single JUnit test
2.33 - -post-compile-test-single: called after javac compilation of single JUunit test
2.34 - -pre-jar: called before JAR building
2.35 - -post-jar: called after JAR building
2.36 - -post-clean: called after cleaning build products
2.37 -
2.38 - (Targets beginning with '-' are not intended to be called on their own.)
2.39 -
2.40 - Example of inserting an obfuscator after compilation could look like this:
2.41 -
2.42 - <target name="-post-compile">
2.43 - <obfuscate>
2.44 - <fileset dir="${build.classes.dir}"/>
2.45 - </obfuscate>
2.46 - </target>
2.47 -
2.48 - For list of available properties check the imported
2.49 - nbproject/build-impl.xml file.
2.50 -
2.51 -
2.52 - Another way to customize the build is by overriding existing main targets.
2.53 - The targets of interest are:
2.54 -
2.55 - -init-macrodef-javac: defines macro for javac compilation
2.56 - -init-macrodef-junit: defines macro for junit execution
2.57 - -init-macrodef-debug: defines macro for class debugging
2.58 - -init-macrodef-java: defines macro for class execution
2.59 - -do-jar-with-manifest: JAR building (if you are using a manifest)
2.60 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
2.61 - run: execution of project
2.62 - -javadoc-build: Javadoc generation
2.63 - test-report: JUnit report generation
2.64 -
2.65 - An example of overriding the target for project execution could look like this:
2.66 -
2.67 - <target name="run" depends="livedb-impl.jar">
2.68 - <exec dir="bin" executable="launcher.exe">
2.69 - <arg file="${dist.jar}"/>
2.70 - </exec>
2.71 - </target>
2.72 -
2.73 - Notice that the overridden target depends on the jar target and not only on
2.74 - the compile target as the regular run target does. Again, for a list of available
2.75 - properties which you can use, check the target you are overriding in the
2.76 - nbproject/build-impl.xml file.
2.77 -
2.78 - -->
2.79 -
2.80 - <target name="-pre-compile-test">
2.81 - <antcall target="create-db"/>
2.82 - </target>
2.83 -
2.84 - <!-- BEGIN: livedb.derby.create -->
2.85 - <target name="-check-db">
2.86 - <property name="db" location="build/classes/db"/>
2.87 - <available property="db.exists" file="${db}"/>
2.88 - </target>
2.89 - <target name="create-db" unless="db.exists" depends="init,-check-db">
2.90 - <mkdir dir="${db}"/>
2.91 - <delete dir="${db}"/>
2.92 - <echo message="Creating DB in ${db}"/>
2.93 - <sql classpath="${file.reference.derby.jar}" userid="j1" password="j1"
2.94 - url="jdbc:derby:${db};create=true"
2.95 - driver="org.apache.derby.jdbc.EmbeddedDriver"
2.96 - >
2.97 - create table APP.AGE (
2.98 - NAME VARCHAR(30),
2.99 - AGE NUMERIC(3)
2.100 - );
2.101 - insert into APP.AGE values ('apidesign', 3);
2.102 - </sql>
2.103 - <!-- don't forget to shutdown the DB -->
2.104 - <sql classpath="${file.reference.derby.jar}" userid="j1" password="j1"
2.105 - url="jdbc:derby:${db};shutdown=true"
2.106 - driver="org.apache.derby.jdbc.EmbeddedDriver"
2.107 - onerror="continue"
2.108 - errorproperty="ignore.error"
2.109 - failonconnectionerror="false"
2.110 - >none</sql>
2.111 - <echo message="DB created OK."/>
2.112 - </target>
2.113 - <!-- END: livedb.derby.create -->
2.114 -</project>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/samples/livedb/livedb.xml Tue Nov 12 08:55:35 2019 +0100
3.3 @@ -0,0 +1,35 @@
3.4 +<?xml version="1.0" encoding="UTF-8"?>
3.5 +<project name="livedb" default="default" basedir=".">
3.6 + <!-- BEGIN: livedb.derby.create -->
3.7 + <target name="-check-db">
3.8 + <property name="db" location="target/classes/db"/>
3.9 + <available property="db.exists" file="${db}"/>
3.10 + </target>
3.11 + <target name="create-db" description="Create a database on classpath"
3.12 + unless="db.exists" depends="-check-db"
3.13 + >
3.14 + <mkdir dir="${db}"/>
3.15 + <delete dir="${db}"/>
3.16 + <echo message="Creating DB in ${db}"/>
3.17 + <sql classpath="${cp}" userid="j1" password="j1"
3.18 + url="jdbc:derby:${db};create=true"
3.19 + driver="org.apache.derby.iapi.jdbc.AutoloadedDriver"
3.20 + >
3.21 + create table APP.AGE (
3.22 + NAME VARCHAR(30),
3.23 + AGE NUMERIC(3)
3.24 + );
3.25 + insert into APP.AGE values ('apidesign', 3);
3.26 + </sql>
3.27 + <!-- don't forget to shutdown the DB -->
3.28 + <sql classpath="${cp}" userid="j1" password="j1"
3.29 + url="jdbc:derby:${db};shutdown=true"
3.30 + driver="org.apache.derby.iapi.jdbc.AutoloadedDriver"
3.31 + onerror="continue"
3.32 + errorproperty="ignore.error"
3.33 + failonconnectionerror="false"
3.34 + >none</sql>
3.35 + <echo message="DB created OK."/>
3.36 + </target>
3.37 + <!-- END: livedb.derby.create -->
3.38 +</project>
4.1 --- a/samples/livedb/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,1770 +0,0 @@
4.4 -<?xml version="1.0" encoding="UTF-8"?>
4.5 -<!--
4.6 -*** GENERATED FROM project.xml - DO NOT EDIT ***
4.7 -*** EDIT ../build.xml INSTEAD ***
4.8 -
4.9 -For the purpose of easier reading the script
4.10 -is divided into following sections:
4.11 -
4.12 - - initialization
4.13 - - compilation
4.14 - - jar
4.15 - - execution
4.16 - - debugging
4.17 - - javadoc
4.18 - - test compilation
4.19 - - test execution
4.20 - - test debugging
4.21 - - applet
4.22 - - cleanup
4.23 -
4.24 - -->
4.25 -<project xmlns:if="ant:if" 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" xmlns:unless="ant:unless" basedir=".." default="default" name="livedb-impl">
4.26 - <fail message="Please build using Ant 1.8.0 or higher.">
4.27 - <condition>
4.28 - <not>
4.29 - <antversion atleast="1.8.0"/>
4.30 - </not>
4.31 - </condition>
4.32 - </fail>
4.33 - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
4.34 - <!--
4.35 - ======================
4.36 - INITIALIZATION SECTION
4.37 - ======================
4.38 - -->
4.39 - <target name="-pre-init">
4.40 - <!-- Empty placeholder for easier customization. -->
4.41 - <!-- You can override this target in the ../build.xml file. -->
4.42 - </target>
4.43 - <target depends="-pre-init" name="-init-private">
4.44 - <property file="nbproject/private/config.properties"/>
4.45 - <property file="nbproject/private/configs/${config}.properties"/>
4.46 - <property file="nbproject/private/private.properties"/>
4.47 - </target>
4.48 - <target depends="-pre-init,-init-private" name="-init-user">
4.49 - <property file="${user.properties.file}"/>
4.50 - <!-- The two properties below are usually overridden -->
4.51 - <!-- by the active platform. Just a fallback. -->
4.52 - <property name="default.javac.source" value="1.6"/>
4.53 - <property name="default.javac.target" value="1.6"/>
4.54 - </target>
4.55 - <target depends="-pre-init,-init-private,-init-user" name="-init-project">
4.56 - <property file="nbproject/configs/${config}.properties"/>
4.57 - <property file="nbproject/project.properties"/>
4.58 - </target>
4.59 - <target name="-init-modules-supported">
4.60 - <condition property="modules.supported.internal" value="true">
4.61 - <not>
4.62 - <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
4.63 - </not>
4.64 - </condition>
4.65 - </target>
4.66 - <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
4.67 - <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
4.68 - <attribute name="property"/>
4.69 - <attribute name="sourcepath"/>
4.70 - <sequential>
4.71 - <loadresource property="@{property}" quiet="true">
4.72 - <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
4.73 - <filterchain>
4.74 - <stripjavacomments/>
4.75 - <linecontainsregexp>
4.76 - <regexp pattern="module .* \{"/>
4.77 - </linecontainsregexp>
4.78 - <tokenfilter>
4.79 - <linetokenizer/>
4.80 - <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
4.81 - </tokenfilter>
4.82 - <striplinebreaks/>
4.83 - </filterchain>
4.84 - </loadresource>
4.85 - </sequential>
4.86 - </macrodef>
4.87 - </target>
4.88 - <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
4.89 - <fail message="Java 9 support requires Ant 1.10.0 or higher.">
4.90 - <condition>
4.91 - <not>
4.92 - <antversion atleast="1.10.0"/>
4.93 - </not>
4.94 - </condition>
4.95 - </fail>
4.96 - <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
4.97 - <condition property="named.module.internal">
4.98 - <and>
4.99 - <isset property="module.name"/>
4.100 - <length length="0" string="${module.name}" when="greater"/>
4.101 - </and>
4.102 - </condition>
4.103 - <condition property="unnamed.module.internal">
4.104 - <not>
4.105 - <isset property="named.module.internal"/>
4.106 - </not>
4.107 - </condition>
4.108 - <property name="javac.modulepath" value=""/>
4.109 - <property name="run.modulepath" value="${javac.modulepath}"/>
4.110 - <property name="module.build.classes.dir" value="${build.classes.dir}"/>
4.111 - <property name="debug.modulepath" value="${run.modulepath}"/>
4.112 - <property name="javac.upgrademodulepath" value=""/>
4.113 - <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
4.114 - <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
4.115 - <and>
4.116 - <isset property="javac.systemmodulepath"/>
4.117 - <length length="0" string="${javac.systemmodulepath}" when="greater"/>
4.118 - </and>
4.119 - </condition>
4.120 - <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
4.121 - <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
4.122 - <property name="module.name" value=""/>
4.123 - </target>
4.124 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
4.125 - <property name="platform.java" value="${java.home}/bin/java"/>
4.126 - <available file="${manifest.file}" property="manifest.available"/>
4.127 - <condition property="splashscreen.available">
4.128 - <and>
4.129 - <not>
4.130 - <equals arg1="${application.splash}" arg2="" trim="true"/>
4.131 - </not>
4.132 - <available file="${application.splash}"/>
4.133 - </and>
4.134 - </condition>
4.135 - <condition property="main.class.available">
4.136 - <and>
4.137 - <isset property="main.class"/>
4.138 - <not>
4.139 - <equals arg1="${main.class}" arg2="" trim="true"/>
4.140 - </not>
4.141 - </and>
4.142 - </condition>
4.143 - <condition property="profile.available">
4.144 - <and>
4.145 - <isset property="javac.profile"/>
4.146 - <length length="0" string="${javac.profile}" when="greater"/>
4.147 - <not>
4.148 - <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
4.149 - </not>
4.150 - </and>
4.151 - </condition>
4.152 - <condition property="do.archive">
4.153 - <or>
4.154 - <not>
4.155 - <istrue value="${jar.archive.disabled}"/>
4.156 - </not>
4.157 - <istrue value="${not.archive.disabled}"/>
4.158 - </or>
4.159 - </condition>
4.160 - <condition property="do.archive+manifest.available">
4.161 - <and>
4.162 - <isset property="manifest.available"/>
4.163 - <istrue value="${do.archive}"/>
4.164 - </and>
4.165 - </condition>
4.166 - <condition property="do.archive+main.class.available">
4.167 - <and>
4.168 - <isset property="main.class.available"/>
4.169 - <istrue value="${do.archive}"/>
4.170 - </and>
4.171 - </condition>
4.172 - <condition property="do.archive+splashscreen.available">
4.173 - <and>
4.174 - <isset property="splashscreen.available"/>
4.175 - <istrue value="${do.archive}"/>
4.176 - </and>
4.177 - </condition>
4.178 - <condition property="do.archive+profile.available">
4.179 - <and>
4.180 - <isset property="profile.available"/>
4.181 - <istrue value="${do.archive}"/>
4.182 - </and>
4.183 - </condition>
4.184 - <condition property="have.tests">
4.185 - <or>
4.186 - <available file="${test.src.dir}"/>
4.187 - </or>
4.188 - </condition>
4.189 - <condition property="have.sources">
4.190 - <or>
4.191 - <available file="${src.dir}"/>
4.192 - </or>
4.193 - </condition>
4.194 - <condition property="netbeans.home+have.tests">
4.195 - <and>
4.196 - <isset property="netbeans.home"/>
4.197 - <isset property="have.tests"/>
4.198 - </and>
4.199 - </condition>
4.200 - <condition property="no.javadoc.preview">
4.201 - <and>
4.202 - <isset property="javadoc.preview"/>
4.203 - <isfalse value="${javadoc.preview}"/>
4.204 - </and>
4.205 - </condition>
4.206 - <property name="run.jvmargs" value=""/>
4.207 - <property name="run.jvmargs.ide" value=""/>
4.208 - <property name="javac.compilerargs" value=""/>
4.209 - <property name="work.dir" value="${basedir}"/>
4.210 - <condition property="no.deps">
4.211 - <and>
4.212 - <istrue value="${no.dependencies}"/>
4.213 - </and>
4.214 - </condition>
4.215 - <property name="javac.debug" value="true"/>
4.216 - <property name="javadoc.preview" value="true"/>
4.217 - <property name="application.args" value=""/>
4.218 - <property name="source.encoding" value="${file.encoding}"/>
4.219 - <property name="runtime.encoding" value="${source.encoding}"/>
4.220 - <property name="manifest.encoding" value="${source.encoding}"/>
4.221 - <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
4.222 - <and>
4.223 - <isset property="javadoc.encoding"/>
4.224 - <not>
4.225 - <equals arg1="${javadoc.encoding}" arg2=""/>
4.226 - </not>
4.227 - </and>
4.228 - </condition>
4.229 - <property name="javadoc.encoding.used" value="${source.encoding}"/>
4.230 - <property name="includes" value="**"/>
4.231 - <property name="excludes" value=""/>
4.232 - <property name="do.depend" value="false"/>
4.233 - <condition property="do.depend.true">
4.234 - <istrue value="${do.depend}"/>
4.235 - </condition>
4.236 - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
4.237 - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
4.238 - <and>
4.239 - <isset property="endorsed.classpath"/>
4.240 - <not>
4.241 - <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
4.242 - </not>
4.243 - </and>
4.244 - </condition>
4.245 - <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
4.246 - <isset property="profile.available"/>
4.247 - </condition>
4.248 - <condition else="false" property="jdkBug6558476">
4.249 - <and>
4.250 - <matches pattern="1\.[56]" string="${java.specification.version}"/>
4.251 - <not>
4.252 - <os family="unix"/>
4.253 - </not>
4.254 - </and>
4.255 - </condition>
4.256 - <condition else="false" property="javac.fork">
4.257 - <or>
4.258 - <istrue value="${jdkBug6558476}"/>
4.259 - <istrue value="${javac.external.vm}"/>
4.260 - </or>
4.261 - </condition>
4.262 - <property name="jar.index" value="false"/>
4.263 - <property name="jar.index.metainf" value="${jar.index}"/>
4.264 - <property name="copylibs.rebase" value="true"/>
4.265 - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
4.266 - <condition property="junit.available">
4.267 - <or>
4.268 - <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
4.269 - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
4.270 - </or>
4.271 - </condition>
4.272 - <condition property="testng.available">
4.273 - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
4.274 - </condition>
4.275 - <condition property="junit+testng.available">
4.276 - <and>
4.277 - <istrue value="${junit.available}"/>
4.278 - <istrue value="${testng.available}"/>
4.279 - </and>
4.280 - </condition>
4.281 - <condition else="testng" property="testng.mode" value="mixed">
4.282 - <istrue value="${junit+testng.available}"/>
4.283 - </condition>
4.284 - <condition else="" property="testng.debug.mode" value="-mixed">
4.285 - <istrue value="${junit+testng.available}"/>
4.286 - </condition>
4.287 - <property name="java.failonerror" value="true"/>
4.288 - </target>
4.289 - <target name="-post-init">
4.290 - <!-- Empty placeholder for easier customization. -->
4.291 - <!-- You can override this target in the ../build.xml file. -->
4.292 - </target>
4.293 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
4.294 - <fail unless="src.dir">Must set src.dir</fail>
4.295 - <fail unless="test.src.dir">Must set test.src.dir</fail>
4.296 - <fail unless="build.dir">Must set build.dir</fail>
4.297 - <fail unless="dist.dir">Must set dist.dir</fail>
4.298 - <fail unless="build.classes.dir">Must set build.classes.dir</fail>
4.299 - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
4.300 - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
4.301 - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
4.302 - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
4.303 - <fail unless="dist.jar">Must set dist.jar</fail>
4.304 - </target>
4.305 - <target name="-init-macrodef-property">
4.306 - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
4.307 - <attribute name="name"/>
4.308 - <attribute name="value"/>
4.309 - <sequential>
4.310 - <property name="@{name}" value="${@{value}}"/>
4.311 - </sequential>
4.312 - </macrodef>
4.313 - </target>
4.314 - <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
4.315 - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
4.316 - <attribute default="${src.dir}" name="srcdir"/>
4.317 - <attribute default="${build.classes.dir}" name="destdir"/>
4.318 - <attribute default="${javac.classpath}" name="classpath"/>
4.319 - <attribute default="${javac.modulepath}" name="modulepath"/>
4.320 - <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
4.321 - <attribute default="${javac.processorpath}" name="processorpath"/>
4.322 - <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
4.323 - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
4.324 - <attribute default="${includes}" name="includes"/>
4.325 - <attribute default="${excludes}" name="excludes"/>
4.326 - <attribute default="${javac.debug}" name="debug"/>
4.327 - <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
4.328 - <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
4.329 - <attribute default="${empty.dir}" name="gensrcdir"/>
4.330 - <element name="customize" optional="true"/>
4.331 - <sequential>
4.332 - <condition property="warn.excludes.internal">
4.333 - <and>
4.334 - <isset property="named.module.internal"/>
4.335 - <length length="0" string="@{excludes}" trim="true" when="greater"/>
4.336 - </and>
4.337 - </condition>
4.338 - <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
4.339 - <property location="${build.dir}/empty" name="empty.dir"/>
4.340 - <mkdir dir="${empty.dir}"/>
4.341 - <mkdir dir="@{apgeneratedsrcdir}"/>
4.342 - <condition property="processormodulepath.set">
4.343 - <resourcecount count="0" when="greater">
4.344 - <path>
4.345 - <pathelement path="@{processormodulepath}"/>
4.346 - </path>
4.347 - </resourcecount>
4.348 - </condition>
4.349 - <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}">
4.350 - <src>
4.351 - <dirset dir="@{gensrcdir}" erroronmissingdir="false">
4.352 - <include name="*"/>
4.353 - </dirset>
4.354 - </src>
4.355 - <classpath>
4.356 - <path path="@{classpath}"/>
4.357 - </classpath>
4.358 - <modulepath>
4.359 - <path path="@{modulepath}"/>
4.360 - </modulepath>
4.361 - <upgrademodulepath>
4.362 - <path path="@{upgrademodulepath}"/>
4.363 - </upgrademodulepath>
4.364 - <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
4.365 - <compilerarg line="${javac.profile.cmd.line.arg}"/>
4.366 - <compilerarg line="${javac.compilerargs}"/>
4.367 - <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
4.368 - <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
4.369 - <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
4.370 - <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
4.371 - <compilerarg line="${ap.processors.internal}"/>
4.372 - <compilerarg line="${annotation.processing.processor.options}"/>
4.373 - <compilerarg value="-s"/>
4.374 - <compilerarg path="@{apgeneratedsrcdir}"/>
4.375 - <compilerarg line="${ap.proc.none.internal}"/>
4.376 - <customize/>
4.377 - </javac>
4.378 - </sequential>
4.379 - </macrodef>
4.380 - </target>
4.381 - <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
4.382 - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
4.383 - <attribute default="${src.dir}" name="srcdir"/>
4.384 - <attribute default="${build.classes.dir}" name="destdir"/>
4.385 - <attribute default="${javac.classpath}" name="classpath"/>
4.386 - <attribute default="${javac.modulepath}" name="modulepath"/>
4.387 - <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
4.388 - <attribute default="${javac.processorpath}" name="processorpath"/>
4.389 - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
4.390 - <attribute default="${includes}" name="includes"/>
4.391 - <attribute default="${excludes}" name="excludes"/>
4.392 - <attribute default="${javac.debug}" name="debug"/>
4.393 - <attribute default="${empty.dir}" name="sourcepath"/>
4.394 - <attribute default="${empty.dir}" name="gensrcdir"/>
4.395 - <element name="customize" optional="true"/>
4.396 - <sequential>
4.397 - <property location="${build.dir}/empty" name="empty.dir"/>
4.398 - <mkdir dir="${empty.dir}"/>
4.399 - <mkdir dir="@{apgeneratedsrcdir}"/>
4.400 - <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}">
4.401 - <src>
4.402 - <dirset dir="@{gensrcdir}" erroronmissingdir="false">
4.403 - <include name="*"/>
4.404 - </dirset>
4.405 - </src>
4.406 - <classpath>
4.407 - <path path="@{classpath}"/>
4.408 - </classpath>
4.409 - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
4.410 - <compilerarg line="${javac.profile.cmd.line.arg}"/>
4.411 - <compilerarg line="${javac.compilerargs}"/>
4.412 - <compilerarg value="-processorpath"/>
4.413 - <compilerarg path="@{processorpath}:${empty.dir}"/>
4.414 - <compilerarg line="${ap.processors.internal}"/>
4.415 - <compilerarg line="${annotation.processing.processor.options}"/>
4.416 - <compilerarg value="-s"/>
4.417 - <compilerarg path="@{apgeneratedsrcdir}"/>
4.418 - <compilerarg line="${ap.proc.none.internal}"/>
4.419 - <customize/>
4.420 - </javac>
4.421 - </sequential>
4.422 - </macrodef>
4.423 - </target>
4.424 - <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
4.425 - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
4.426 - <attribute default="${src.dir}" name="srcdir"/>
4.427 - <attribute default="${build.classes.dir}" name="destdir"/>
4.428 - <attribute default="${javac.classpath}" name="classpath"/>
4.429 - <attribute default="${javac.modulepath}" name="modulepath"/>
4.430 - <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
4.431 - <attribute default="${javac.processorpath}" name="processorpath"/>
4.432 - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
4.433 - <attribute default="${includes}" name="includes"/>
4.434 - <attribute default="${excludes}" name="excludes"/>
4.435 - <attribute default="${javac.debug}" name="debug"/>
4.436 - <attribute default="${empty.dir}" name="sourcepath"/>
4.437 - <attribute default="${empty.dir}" name="gensrcdir"/>
4.438 - <element name="customize" optional="true"/>
4.439 - <sequential>
4.440 - <property location="${build.dir}/empty" name="empty.dir"/>
4.441 - <mkdir dir="${empty.dir}"/>
4.442 - <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}">
4.443 - <src>
4.444 - <dirset dir="@{gensrcdir}" erroronmissingdir="false">
4.445 - <include name="*"/>
4.446 - </dirset>
4.447 - </src>
4.448 - <classpath>
4.449 - <path path="@{classpath}"/>
4.450 - </classpath>
4.451 - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
4.452 - <compilerarg line="${javac.profile.cmd.line.arg}"/>
4.453 - <compilerarg line="${javac.compilerargs}"/>
4.454 - <customize/>
4.455 - </javac>
4.456 - </sequential>
4.457 - </macrodef>
4.458 - </target>
4.459 - <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
4.460 - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
4.461 - <attribute default="${src.dir}" name="srcdir"/>
4.462 - <attribute default="${build.classes.dir}" name="destdir"/>
4.463 - <attribute default="${javac.classpath}" name="classpath"/>
4.464 - <sequential>
4.465 - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
4.466 - <classpath>
4.467 - <path path="@{classpath}"/>
4.468 - </classpath>
4.469 - </depend>
4.470 - </sequential>
4.471 - </macrodef>
4.472 - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
4.473 - <attribute default="${build.classes.dir}" name="destdir"/>
4.474 - <sequential>
4.475 - <fail unless="javac.includes">Must set javac.includes</fail>
4.476 - <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
4.477 - <path>
4.478 - <filelist dir="@{destdir}" files="${javac.includes}"/>
4.479 - </path>
4.480 - <globmapper from="*.java" to="*.class"/>
4.481 - </pathconvert>
4.482 - <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
4.483 - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
4.484 - <delete>
4.485 - <files includesfile="${javac.includesfile.binary}"/>
4.486 - </delete>
4.487 - <delete>
4.488 - <fileset file="${javac.includesfile.binary}"/>
4.489 - </delete>
4.490 - </sequential>
4.491 - </macrodef>
4.492 - </target>
4.493 - <target if="${junit.available}" name="-init-macrodef-junit-init">
4.494 - <condition else="false" property="nb.junit.batch" value="true">
4.495 - <and>
4.496 - <istrue value="${junit.available}"/>
4.497 - <not>
4.498 - <isset property="test.method"/>
4.499 - </not>
4.500 - </and>
4.501 - </condition>
4.502 - <condition else="false" property="nb.junit.single" value="true">
4.503 - <and>
4.504 - <istrue value="${junit.available}"/>
4.505 - <isset property="test.method"/>
4.506 - </and>
4.507 - </condition>
4.508 - </target>
4.509 - <target name="-init-test-properties">
4.510 - <property name="test.binaryincludes" value="<nothing>"/>
4.511 - <property name="test.binarytestincludes" value=""/>
4.512 - <property name="test.binaryexcludes" value=""/>
4.513 - </target>
4.514 - <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
4.515 - <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
4.516 - <attribute default="${includes}" name="includes"/>
4.517 - <attribute default="${excludes}" name="excludes"/>
4.518 - <element name="customizePrototype" optional="true"/>
4.519 - <sequential>
4.520 - <property name="junit.forkmode" value="perTest"/>
4.521 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
4.522 - <syspropertyset>
4.523 - <propertyref prefix="test-sys-prop."/>
4.524 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.525 - </syspropertyset>
4.526 - <classpath>
4.527 - <path path="${run.test.classpath}"/>
4.528 - </classpath>
4.529 - <modulepath>
4.530 - <path path="${run.test.modulepath}"/>
4.531 - </modulepath>
4.532 - <formatter type="brief" usefile="false"/>
4.533 - <formatter type="xml"/>
4.534 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.535 - <jvmarg value="-ea"/>
4.536 - <jvmarg line="${run.test.jvmargs}"/>
4.537 - <customizePrototype/>
4.538 - </junit>
4.539 - </sequential>
4.540 - </macrodef>
4.541 - </target>
4.542 - <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
4.543 - <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
4.544 - <attribute default="${includes}" name="includes"/>
4.545 - <attribute default="${excludes}" name="excludes"/>
4.546 - <element name="customizePrototype" optional="true"/>
4.547 - <sequential>
4.548 - <property name="junit.forkmode" value="perTest"/>
4.549 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
4.550 - <syspropertyset>
4.551 - <propertyref prefix="test-sys-prop."/>
4.552 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.553 - </syspropertyset>
4.554 - <classpath>
4.555 - <path path="${run.test.classpath}"/>
4.556 - </classpath>
4.557 - <formatter type="brief" usefile="false"/>
4.558 - <formatter type="xml"/>
4.559 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.560 - <jvmarg value="-ea"/>
4.561 - <customizePrototype/>
4.562 - </junit>
4.563 - </sequential>
4.564 - </macrodef>
4.565 - </target>
4.566 - <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
4.567 - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
4.568 - <attribute default="${includes}" name="includes"/>
4.569 - <attribute default="${excludes}" name="excludes"/>
4.570 - <attribute default="**" name="testincludes"/>
4.571 - <attribute default="" name="testmethods"/>
4.572 - <element name="customize" optional="true"/>
4.573 - <sequential>
4.574 - <j2seproject3:junit-prototype>
4.575 - <customizePrototype>
4.576 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
4.577 - <customize/>
4.578 - </customizePrototype>
4.579 - </j2seproject3:junit-prototype>
4.580 - </sequential>
4.581 - </macrodef>
4.582 - </target>
4.583 - <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
4.584 - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
4.585 - <attribute default="${includes}" name="includes"/>
4.586 - <attribute default="${excludes}" name="excludes"/>
4.587 - <attribute default="**" name="testincludes"/>
4.588 - <attribute default="" name="testmethods"/>
4.589 - <element name="customize" optional="true"/>
4.590 - <sequential>
4.591 - <j2seproject3:junit-prototype>
4.592 - <customizePrototype>
4.593 - <batchtest todir="${build.test.results.dir}">
4.594 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
4.595 - <filename name="@{testincludes}"/>
4.596 - </fileset>
4.597 - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
4.598 - <filename name="${test.binarytestincludes}"/>
4.599 - </fileset>
4.600 - </batchtest>
4.601 - <customize/>
4.602 - </customizePrototype>
4.603 - </j2seproject3:junit-prototype>
4.604 - </sequential>
4.605 - </macrodef>
4.606 - </target>
4.607 - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
4.608 - <target if="${testng.available}" name="-init-macrodef-testng">
4.609 - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
4.610 - <attribute default="${includes}" name="includes"/>
4.611 - <attribute default="${excludes}" name="excludes"/>
4.612 - <attribute default="**" name="testincludes"/>
4.613 - <attribute default="" name="testmethods"/>
4.614 - <element name="customize" optional="true"/>
4.615 - <sequential>
4.616 - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
4.617 - <isset property="test.method"/>
4.618 - </condition>
4.619 - <union id="test.set">
4.620 - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
4.621 - <filename name="@{testincludes}"/>
4.622 - </fileset>
4.623 - </union>
4.624 - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
4.625 - <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="livedb" testname="TestNG tests" workingDir="${work.dir}">
4.626 - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
4.627 - <propertyset>
4.628 - <propertyref prefix="test-sys-prop."/>
4.629 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.630 - </propertyset>
4.631 - <classpath>
4.632 - <path path="${run.test.classpath}"/>
4.633 - </classpath>
4.634 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.635 - <customize/>
4.636 - </testng>
4.637 - </sequential>
4.638 - </macrodef>
4.639 - </target>
4.640 - <target name="-init-macrodef-test-impl">
4.641 - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.642 - <attribute default="${includes}" name="includes"/>
4.643 - <attribute default="${excludes}" name="excludes"/>
4.644 - <attribute default="**" name="testincludes"/>
4.645 - <attribute default="" name="testmethods"/>
4.646 - <element implicit="true" name="customize" optional="true"/>
4.647 - <sequential>
4.648 - <echo>No tests executed.</echo>
4.649 - </sequential>
4.650 - </macrodef>
4.651 - </target>
4.652 - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
4.653 - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.654 - <attribute default="${includes}" name="includes"/>
4.655 - <attribute default="${excludes}" name="excludes"/>
4.656 - <attribute default="**" name="testincludes"/>
4.657 - <attribute default="" name="testmethods"/>
4.658 - <element implicit="true" name="customize" optional="true"/>
4.659 - <sequential>
4.660 - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.661 - <customize/>
4.662 - </j2seproject3:junit>
4.663 - </sequential>
4.664 - </macrodef>
4.665 - </target>
4.666 - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
4.667 - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.668 - <attribute default="${includes}" name="includes"/>
4.669 - <attribute default="${excludes}" name="excludes"/>
4.670 - <attribute default="**" name="testincludes"/>
4.671 - <attribute default="" name="testmethods"/>
4.672 - <element implicit="true" name="customize" optional="true"/>
4.673 - <sequential>
4.674 - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.675 - <customize/>
4.676 - </j2seproject3:testng>
4.677 - </sequential>
4.678 - </macrodef>
4.679 - </target>
4.680 - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
4.681 - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
4.682 - <attribute default="${includes}" name="includes"/>
4.683 - <attribute default="${excludes}" name="excludes"/>
4.684 - <attribute default="**" name="testincludes"/>
4.685 - <attribute default="" name="testmethods"/>
4.686 - <sequential>
4.687 - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.688 - <customize>
4.689 - <jvmarg line="${run.jvmargs}"/>
4.690 - <jvmarg line="${run.jvmargs.ide}"/>
4.691 - </customize>
4.692 - </j2seproject3:test-impl>
4.693 - </sequential>
4.694 - </macrodef>
4.695 - </target>
4.696 - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
4.697 - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.698 - <attribute default="${includes}" name="includes"/>
4.699 - <attribute default="${excludes}" name="excludes"/>
4.700 - <attribute default="**" name="testincludes"/>
4.701 - <attribute default="" name="testmethods"/>
4.702 - <element name="customizeDebuggee" optional="true"/>
4.703 - <sequential>
4.704 - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.705 - <customize>
4.706 - <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
4.707 - <customizeDebuggee/>
4.708 - </customize>
4.709 - </j2seproject3:junit>
4.710 - </sequential>
4.711 - </macrodef>
4.712 - </target>
4.713 - <target if="${testng.available}" name="-init-macrodef-testng-debug">
4.714 - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.715 - <attribute default="${main.class}" name="testClass"/>
4.716 - <attribute default="" name="testMethod"/>
4.717 - <element name="customize2" optional="true"/>
4.718 - <sequential>
4.719 - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
4.720 - <isset property="test.method"/>
4.721 - </condition>
4.722 - <condition else="-suitename livedb -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
4.723 - <matches pattern=".*\.xml" string="@{testClass}"/>
4.724 - </condition>
4.725 - <delete dir="${build.test.results.dir}" quiet="true"/>
4.726 - <mkdir dir="${build.test.results.dir}"/>
4.727 - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
4.728 - <customizeDebuggee>
4.729 - <customize2/>
4.730 - <jvmarg value="-ea"/>
4.731 - <arg line="${testng.debug.mode}"/>
4.732 - <arg line="-d ${build.test.results.dir}"/>
4.733 - <arg line="-listener org.testng.reporters.VerboseReporter"/>
4.734 - <arg line="${testng.cmd.args}"/>
4.735 - </customizeDebuggee>
4.736 - </j2seproject3:debug>
4.737 - </sequential>
4.738 - </macrodef>
4.739 - </target>
4.740 - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
4.741 - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.742 - <attribute default="${main.class}" name="testClass"/>
4.743 - <attribute default="" name="testMethod"/>
4.744 - <element implicit="true" name="customize2" optional="true"/>
4.745 - <sequential>
4.746 - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
4.747 - <customize2/>
4.748 - </j2seproject3:testng-debug>
4.749 - </sequential>
4.750 - </macrodef>
4.751 - </target>
4.752 - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
4.753 - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.754 - <attribute default="${includes}" name="includes"/>
4.755 - <attribute default="${excludes}" name="excludes"/>
4.756 - <attribute default="**" name="testincludes"/>
4.757 - <attribute default="" name="testmethods"/>
4.758 - <attribute default="${main.class}" name="testClass"/>
4.759 - <attribute default="" name="testMethod"/>
4.760 - <sequential>
4.761 - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.762 - <customizeDebuggee>
4.763 - <jvmarg line="${run.jvmargs}"/>
4.764 - <jvmarg line="${run.jvmargs.ide}"/>
4.765 - </customizeDebuggee>
4.766 - </j2seproject3:test-debug-impl>
4.767 - </sequential>
4.768 - </macrodef>
4.769 - </target>
4.770 - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
4.771 - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.772 - <attribute default="${includes}" name="includes"/>
4.773 - <attribute default="${excludes}" name="excludes"/>
4.774 - <attribute default="**" name="testincludes"/>
4.775 - <attribute default="" name="testmethods"/>
4.776 - <attribute default="${main.class}" name="testClass"/>
4.777 - <attribute default="" name="testMethod"/>
4.778 - <sequential>
4.779 - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
4.780 - <customize2>
4.781 - <syspropertyset>
4.782 - <propertyref prefix="test-sys-prop."/>
4.783 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.784 - </syspropertyset>
4.785 - </customize2>
4.786 - </j2seproject3:testng-debug-impl>
4.787 - </sequential>
4.788 - </macrodef>
4.789 - </target>
4.790 - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
4.791 - <!--
4.792 - pre NB7.2 profiling section; consider it deprecated
4.793 - -->
4.794 - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
4.795 - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
4.796 - <!-- Empty placeholder for easier customization. -->
4.797 - <!-- You can override this target in the ../build.xml file. -->
4.798 - </target>
4.799 - <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
4.800 - <!-- Empty placeholder for easier customization. -->
4.801 - <!-- You can override this target in the ../build.xml file. -->
4.802 - </target>
4.803 - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
4.804 - <macrodef name="resolve">
4.805 - <attribute name="name"/>
4.806 - <attribute name="value"/>
4.807 - <sequential>
4.808 - <property name="@{name}" value="${env.@{value}}"/>
4.809 - </sequential>
4.810 - </macrodef>
4.811 - <macrodef name="profile">
4.812 - <attribute default="${main.class}" name="classname"/>
4.813 - <element name="customize" optional="true"/>
4.814 - <sequential>
4.815 - <property environment="env"/>
4.816 - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
4.817 - <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
4.818 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.819 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
4.820 - <jvmarg line="${profiler.info.jvmargs}"/>
4.821 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
4.822 - <arg line="${application.args}"/>
4.823 - <classpath>
4.824 - <path path="${run.classpath}"/>
4.825 - </classpath>
4.826 - <syspropertyset>
4.827 - <propertyref prefix="run-sys-prop."/>
4.828 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
4.829 - </syspropertyset>
4.830 - <customize/>
4.831 - </java>
4.832 - </sequential>
4.833 - </macrodef>
4.834 - </target>
4.835 - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
4.836 - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
4.837 - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
4.838 - </target>
4.839 - <!--
4.840 - end of pre NB7.2 profiling section
4.841 - -->
4.842 - <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
4.843 - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
4.844 - <attribute default="${main.class}" name="name"/>
4.845 - <attribute default="${debug.modulepath}" name="modulepath"/>
4.846 - <attribute default="${debug.classpath}" name="classpath"/>
4.847 - <attribute default="" name="stopclassname"/>
4.848 - <sequential>
4.849 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
4.850 - <modulepath>
4.851 - <path path="@{modulepath}"/>
4.852 - </modulepath>
4.853 - <classpath>
4.854 - <path path="@{classpath}"/>
4.855 - </classpath>
4.856 - </nbjpdastart>
4.857 - </sequential>
4.858 - </macrodef>
4.859 - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
4.860 - <attribute default="${build.classes.dir}" name="dir"/>
4.861 - <sequential>
4.862 - <nbjpdareload>
4.863 - <fileset dir="@{dir}" includes="${fix.classes}">
4.864 - <include name="${fix.includes}*.class"/>
4.865 - </fileset>
4.866 - </nbjpdareload>
4.867 - </sequential>
4.868 - </macrodef>
4.869 - </target>
4.870 - <target name="-init-debug-args">
4.871 - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
4.872 - <os family="windows"/>
4.873 - </condition>
4.874 - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
4.875 - <isset property="debug.transport"/>
4.876 - </condition>
4.877 - </target>
4.878 - <target depends="-init-debug-args" name="-init-macrodef-debug">
4.879 - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.880 - <attribute default="${module.name}" name="modulename"/>
4.881 - <attribute default="${main.class}" name="classname"/>
4.882 - <attribute default="${debug.modulepath}" name="modulepath"/>
4.883 - <attribute default="${debug.classpath}" name="classpath"/>
4.884 - <element name="customizeDebuggee" optional="true"/>
4.885 - <sequential>
4.886 - <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
4.887 - <customize>
4.888 - <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
4.889 - <customizeDebuggee/>
4.890 - </customize>
4.891 - </j2seproject1:java>
4.892 - </sequential>
4.893 - </macrodef>
4.894 - </target>
4.895 - <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
4.896 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
4.897 - <attribute default="${module.name}" name="modulename"/>
4.898 - <attribute default="${main.class}" name="classname"/>
4.899 - <attribute default="${run.modulepath}" name="modulepath"/>
4.900 - <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
4.901 - <attribute default="${run.classpath}" name="classpath"/>
4.902 - <attribute default="jvm" name="jvm"/>
4.903 - <element name="customize" optional="true"/>
4.904 - <sequential>
4.905 - <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
4.906 - <classpath>
4.907 - <path path="@{classpath}"/>
4.908 - </classpath>
4.909 - <modulepath>
4.910 - <pathelement path="@{modulepath}"/>
4.911 - <pathelement location="${module.build.classes.dir}"/>
4.912 - </modulepath>
4.913 - <upgrademodulepath>
4.914 - <path path="@{upgrademodulepath}"/>
4.915 - </upgrademodulepath>
4.916 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
4.917 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
4.918 - <jvmarg line="${run.jvmargs}"/>
4.919 - <jvmarg line="${run.jvmargs.ide}"/>
4.920 - <syspropertyset>
4.921 - <propertyref prefix="run-sys-prop."/>
4.922 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
4.923 - </syspropertyset>
4.924 - <customize/>
4.925 - </java>
4.926 - </sequential>
4.927 - </macrodef>
4.928 - </target>
4.929 - <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
4.930 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
4.931 - <attribute default="" name="modulename"/>
4.932 - <attribute default="${main.class}" name="classname"/>
4.933 - <attribute default="${run.modulepath}" name="modulepath"/>
4.934 - <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
4.935 - <attribute default="${run.classpath}" name="classpath"/>
4.936 - <attribute default="jvm" name="jvm"/>
4.937 - <element name="customize" optional="true"/>
4.938 - <sequential>
4.939 - <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
4.940 - <classpath>
4.941 - <path path="@{classpath}"/>
4.942 - </classpath>
4.943 - <modulepath>
4.944 - <path path="@{modulepath}"/>
4.945 - </modulepath>
4.946 - <upgrademodulepath>
4.947 - <path path="@{upgrademodulepath}"/>
4.948 - </upgrademodulepath>
4.949 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
4.950 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
4.951 - <jvmarg line="${run.jvmargs}"/>
4.952 - <jvmarg line="${run.jvmargs.ide}"/>
4.953 - <syspropertyset>
4.954 - <propertyref prefix="run-sys-prop."/>
4.955 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
4.956 - </syspropertyset>
4.957 - <customize/>
4.958 - </java>
4.959 - </sequential>
4.960 - </macrodef>
4.961 - </target>
4.962 - <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
4.963 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
4.964 - <attribute default="" name="modulename"/>
4.965 - <attribute default="${main.class}" name="classname"/>
4.966 - <attribute default="" name="modulepath"/>
4.967 - <attribute default="${run.classpath}" name="classpath"/>
4.968 - <attribute default="jvm" name="jvm"/>
4.969 - <element name="customize" optional="true"/>
4.970 - <sequential>
4.971 - <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
4.972 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.973 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
4.974 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
4.975 - <jvmarg line="${run.jvmargs}"/>
4.976 - <jvmarg line="${run.jvmargs.ide}"/>
4.977 - <classpath>
4.978 - <path path="@{classpath}"/>
4.979 - </classpath>
4.980 - <syspropertyset>
4.981 - <propertyref prefix="run-sys-prop."/>
4.982 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
4.983 - </syspropertyset>
4.984 - <customize/>
4.985 - </java>
4.986 - </sequential>
4.987 - </macrodef>
4.988 - </target>
4.989 - <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
4.990 - <target name="-init-macrodef-copylibs">
4.991 - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
4.992 - <attribute default="${manifest.file}" name="manifest"/>
4.993 - <element name="customize" optional="true"/>
4.994 - <sequential>
4.995 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
4.996 - <pathconvert property="run.classpath.without.build.classes.dir">
4.997 - <path path="${run.classpath}"/>
4.998 - <map from="${build.classes.dir.resolved}" to=""/>
4.999 - </pathconvert>
4.1000 - <pathconvert pathsep=" " property="jar.classpath">
4.1001 - <path path="${run.classpath.without.build.classes.dir}"/>
4.1002 - <chainedmapper>
4.1003 - <flattenmapper/>
4.1004 - <filtermapper>
4.1005 - <replacestring from=" " to="%20"/>
4.1006 - </filtermapper>
4.1007 - <globmapper from="*" to="lib/*"/>
4.1008 - </chainedmapper>
4.1009 - </pathconvert>
4.1010 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
4.1011 - <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
4.1012 - <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
4.1013 - <manifest>
4.1014 - <attribute name="Class-Path" value="${jar.classpath}"/>
4.1015 - <customize/>
4.1016 - </manifest>
4.1017 - </copylibs>
4.1018 - </sequential>
4.1019 - </macrodef>
4.1020 - </target>
4.1021 - <target name="-init-presetdef-jar">
4.1022 - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
4.1023 - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
4.1024 - <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
4.1025 - </jar>
4.1026 - </presetdef>
4.1027 - </target>
4.1028 - <target name="-init-ap-cmdline-properties">
4.1029 - <property name="annotation.processing.enabled" value="true"/>
4.1030 - <property name="annotation.processing.processors.list" value=""/>
4.1031 - <property name="annotation.processing.processor.options" value=""/>
4.1032 - <property name="annotation.processing.run.all.processors" value="true"/>
4.1033 - <property name="javac.processorpath" value="${javac.classpath}"/>
4.1034 - <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
4.1035 - <condition property="ap.supported.internal" value="true">
4.1036 - <not>
4.1037 - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
4.1038 - </not>
4.1039 - </condition>
4.1040 - </target>
4.1041 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
4.1042 - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
4.1043 - <isfalse value="${annotation.processing.run.all.processors}"/>
4.1044 - </condition>
4.1045 - <condition else="" property="ap.proc.none.internal" value="-proc:none">
4.1046 - <isfalse value="${annotation.processing.enabled}"/>
4.1047 - </condition>
4.1048 - </target>
4.1049 - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
4.1050 - <property name="ap.cmd.line.internal" value=""/>
4.1051 - </target>
4.1052 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
4.1053 - <!--
4.1054 - ===================
4.1055 - COMPILATION SECTION
4.1056 - ===================
4.1057 - -->
4.1058 - <target name="-deps-jar-init" unless="built-jar.properties">
4.1059 - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
4.1060 - <delete file="${built-jar.properties}" quiet="true"/>
4.1061 - </target>
4.1062 - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
4.1063 - <echo level="warn" message="Cycle detected: livedb was already built"/>
4.1064 - </target>
4.1065 - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
4.1066 - <mkdir dir="${build.dir}"/>
4.1067 - <touch file="${built-jar.properties}" verbose="false"/>
4.1068 - <property file="${built-jar.properties}" prefix="already.built.jar."/>
4.1069 - <antcall target="-warn-already-built-jar"/>
4.1070 - <propertyfile file="${built-jar.properties}">
4.1071 - <entry key="${basedir}" value=""/>
4.1072 - </propertyfile>
4.1073 - </target>
4.1074 - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
4.1075 - <target depends="init" name="-check-automatic-build">
4.1076 - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
4.1077 - </target>
4.1078 - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
4.1079 - <antcall target="clean">
4.1080 - <param name="no.dependencies" value="true"/>
4.1081 - </antcall>
4.1082 - </target>
4.1083 - <target depends="init,deps-jar" name="-pre-pre-compile">
4.1084 - <mkdir dir="${build.classes.dir}"/>
4.1085 - </target>
4.1086 - <target name="-pre-compile">
4.1087 - <!-- Empty placeholder for easier customization. -->
4.1088 - <!-- You can override this target in the ../build.xml file. -->
4.1089 - </target>
4.1090 - <target if="do.depend.true" name="-compile-depend">
4.1091 - <pathconvert property="build.generated.subdirs">
4.1092 - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
4.1093 - <include name="*"/>
4.1094 - </dirset>
4.1095 - </pathconvert>
4.1096 - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
4.1097 - </target>
4.1098 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
4.1099 - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
4.1100 - <copy todir="${build.classes.dir}">
4.1101 - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
4.1102 - </copy>
4.1103 - </target>
4.1104 - <target if="has.persistence.xml" name="-copy-persistence-xml">
4.1105 - <mkdir dir="${build.classes.dir}/META-INF"/>
4.1106 - <copy todir="${build.classes.dir}/META-INF">
4.1107 - <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
4.1108 - </copy>
4.1109 - </target>
4.1110 - <target name="-post-compile">
4.1111 - <!-- Empty placeholder for easier customization. -->
4.1112 - <!-- You can override this target in the ../build.xml file. -->
4.1113 - </target>
4.1114 - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
4.1115 - <target name="-pre-compile-single">
4.1116 - <!-- Empty placeholder for easier customization. -->
4.1117 - <!-- You can override this target in the ../build.xml file. -->
4.1118 - </target>
4.1119 - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
4.1120 - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
4.1121 - <j2seproject3:force-recompile/>
4.1122 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
4.1123 - </target>
4.1124 - <target name="-post-compile-single">
4.1125 - <!-- Empty placeholder for easier customization. -->
4.1126 - <!-- You can override this target in the ../build.xml file. -->
4.1127 - </target>
4.1128 - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
4.1129 - <!--
4.1130 - ====================
4.1131 - JAR BUILDING SECTION
4.1132 - ====================
4.1133 - -->
4.1134 - <target depends="init" name="-pre-pre-jar">
4.1135 - <dirname file="${dist.jar}" property="dist.jar.dir"/>
4.1136 - <mkdir dir="${dist.jar.dir}"/>
4.1137 - </target>
4.1138 - <target name="-pre-jar">
4.1139 - <!-- Empty placeholder for easier customization. -->
4.1140 - <!-- You can override this target in the ../build.xml file. -->
4.1141 - </target>
4.1142 - <target depends="init,compile" name="-check-module-main-class">
4.1143 - <pathconvert property="main.class.file">
4.1144 - <string value="${main.class}"/>
4.1145 - <unpackagemapper from="*" to="*.class"/>
4.1146 - </pathconvert>
4.1147 - <condition property="do.module.main.class">
4.1148 - <and>
4.1149 - <isset property="main.class.available"/>
4.1150 - <available file="${build.classes.dir}/module-info.class"/>
4.1151 - <available file="${build.classes.dir}/${main.class.file}"/>
4.1152 - <isset property="libs.CopyLibs.classpath"/>
4.1153 - <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
4.1154 - </and>
4.1155 - </condition>
4.1156 - </target>
4.1157 - <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
4.1158 - <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
4.1159 - <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
4.1160 - </target>
4.1161 - <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
4.1162 - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
4.1163 - <touch file="${tmp.manifest.file}" verbose="false"/>
4.1164 - </target>
4.1165 - <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
4.1166 - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
4.1167 - <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
4.1168 - </target>
4.1169 - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
4.1170 - <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
4.1171 - <attribute name="Main-Class" value="${main.class}"/>
4.1172 - </manifest>
4.1173 - </target>
4.1174 - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
4.1175 - <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
4.1176 - <attribute name="Profile" value="${javac.profile}"/>
4.1177 - </manifest>
4.1178 - </target>
4.1179 - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
4.1180 - <basename file="${application.splash}" property="splashscreen.basename"/>
4.1181 - <mkdir dir="${build.classes.dir}/META-INF"/>
4.1182 - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
4.1183 - <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
4.1184 - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
4.1185 - </manifest>
4.1186 - </target>
4.1187 - <target depends="init,compile" name="-check-do-mkdist">
4.1188 - <condition property="do.mkdist">
4.1189 - <and>
4.1190 - <isset property="do.archive"/>
4.1191 - <isset property="libs.CopyLibs.classpath"/>
4.1192 - <not>
4.1193 - <istrue value="${mkdist.disabled}"/>
4.1194 - </not>
4.1195 - <not>
4.1196 - <available file="${build.classes.dir}/module-info.class"/>
4.1197 - </not>
4.1198 - </and>
4.1199 - </condition>
4.1200 - </target>
4.1201 - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist" if="do.mkdist" name="-do-jar-copylibs">
4.1202 - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
4.1203 - <echo level="info">To run this application from the command line without Ant, try:</echo>
4.1204 - <property location="${dist.jar}" name="dist.jar.resolved"/>
4.1205 - <echo level="info">java -jar "${dist.jar.resolved}"</echo>
4.1206 - </target>
4.1207 - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
4.1208 - <j2seproject1:jar manifest="${tmp.manifest.file}"/>
4.1209 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
4.1210 - <property location="${dist.jar}" name="dist.jar.resolved"/>
4.1211 - <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
4.1212 - <isset property="named.module.internal"/>
4.1213 - </condition>
4.1214 - <pathconvert property="run.classpath.with.dist.jar">
4.1215 - <path path="${run.classpath}"/>
4.1216 - <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
4.1217 - </pathconvert>
4.1218 - <pathconvert property="run.modulepath.with.dist.jar">
4.1219 - <path location="${dist.jar.resolved}"/>
4.1220 - <path path="${run.modulepath}"/>
4.1221 - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
4.1222 - </pathconvert>
4.1223 - <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
4.1224 - <isset property="named.module.internal"/>
4.1225 - </condition>
4.1226 - <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
4.1227 - <and>
4.1228 - <isset property="modules.supported.internal"/>
4.1229 - <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
4.1230 - </and>
4.1231 - </condition>
4.1232 - <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
4.1233 - <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
4.1234 - </condition>
4.1235 - <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
4.1236 - <isset property="do.module.main.class"/>
4.1237 - </condition>
4.1238 - <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
4.1239 - <isset property="named.module.internal"/>
4.1240 - </condition>
4.1241 - <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java}${jar.usage.message.module.path}${jar.usage.message.class.path}${jar.usage.message.main.class}">
4.1242 - <isset property="main.class.available"/>
4.1243 - </condition>
4.1244 - <condition else="debug" property="jar.usage.level" value="info">
4.1245 - <isset property="main.class.available"/>
4.1246 - </condition>
4.1247 - <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
4.1248 - </target>
4.1249 - <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
4.1250 - <delete>
4.1251 - <fileset file="${tmp.manifest.file}"/>
4.1252 - </delete>
4.1253 - </target>
4.1254 - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/>
4.1255 - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/>
4.1256 - <target name="-post-jar">
4.1257 - <!-- Empty placeholder for easier customization. -->
4.1258 - <!-- You can override this target in the ../build.xml file. -->
4.1259 - </target>
4.1260 - <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
4.1261 - <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
4.1262 - <!--
4.1263 - =================
4.1264 - DEPLOY SECTION
4.1265 - =================
4.1266 - -->
4.1267 - <target name="-pre-deploy">
4.1268 - <!-- Empty placeholder for easier customization. -->
4.1269 - <!-- You can override this target in the ../build.xml file. -->
4.1270 - </target>
4.1271 - <target depends="init" name="-check-jlink">
4.1272 - <condition property="do.jlink.internal">
4.1273 - <and>
4.1274 - <istrue value="${do.jlink}"/>
4.1275 - <isset property="do.archive"/>
4.1276 - <isset property="named.module.internal"/>
4.1277 - </and>
4.1278 - </condition>
4.1279 - </target>
4.1280 - <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
4.1281 - <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
4.1282 - <property name="jlink.launcher.name" value="${application.title}"/>
4.1283 - <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
4.1284 - <and>
4.1285 - <isset property="jlink.additionalmodules"/>
4.1286 - <length length="0" string="${jlink.additionalmodules}" when="greater"/>
4.1287 - </and>
4.1288 - </condition>
4.1289 - <condition property="jlink.do.strip.internal">
4.1290 - <and>
4.1291 - <isset property="jlink.strip"/>
4.1292 - <istrue value="${jlink.strip}"/>
4.1293 - </and>
4.1294 - </condition>
4.1295 - <condition property="jlink.do.additionalparam.internal">
4.1296 - <and>
4.1297 - <isset property="jlink.additionalparam"/>
4.1298 - <length length="0" string="${jlink.additionalparam}" when="greater"/>
4.1299 - </and>
4.1300 - </condition>
4.1301 - <condition property="jlink.do.launcher.internal">
4.1302 - <and>
4.1303 - <istrue value="${jlink.launcher}"/>
4.1304 - <isset property="main.class.available"/>
4.1305 - </and>
4.1306 - </condition>
4.1307 - <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
4.1308 - <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
4.1309 - <exec executable="${platform.jlink}">
4.1310 - <arg value="--module-path"/>
4.1311 - <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
4.1312 - <arg value="--add-modules"/>
4.1313 - <arg value="${jlink.add.modules}"/>
4.1314 - <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
4.1315 - <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
4.1316 - <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
4.1317 - <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
4.1318 - <arg value="--output"/>
4.1319 - <arg value="${dist.jlink.output}"/>
4.1320 - </exec>
4.1321 - </target>
4.1322 - <target name="-post-deploy">
4.1323 - <!-- Empty placeholder for easier customization. -->
4.1324 - <!-- You can override this target in the ../build.xml file. -->
4.1325 - </target>
4.1326 - <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
4.1327 - <!--
4.1328 - =================
4.1329 - EXECUTION SECTION
4.1330 - =================
4.1331 - -->
4.1332 - <target depends="init,compile" description="Run a main class." name="run">
4.1333 - <j2seproject1:java>
4.1334 - <customize>
4.1335 - <arg line="${application.args}"/>
4.1336 - </customize>
4.1337 - </j2seproject1:java>
4.1338 - </target>
4.1339 - <target name="-do-not-recompile">
4.1340 - <property name="javac.includes.binary" value=""/>
4.1341 - </target>
4.1342 - <target depends="init,compile-single" name="run-single">
4.1343 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1344 - <j2seproject1:java classname="${run.class}"/>
4.1345 - </target>
4.1346 - <target depends="init,compile-test-single" name="run-test-with-main">
4.1347 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1348 - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
4.1349 - </target>
4.1350 - <!--
4.1351 - =================
4.1352 - DEBUGGING SECTION
4.1353 - =================
4.1354 - -->
4.1355 - <target depends="init" if="netbeans.home" name="-debug-start-debugger">
4.1356 - <j2seproject1:nbjpdastart name="${debug.class}"/>
4.1357 - </target>
4.1358 - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
4.1359 - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
4.1360 - </target>
4.1361 - <target depends="init,compile" name="-debug-start-debuggee">
4.1362 - <j2seproject3:debug>
4.1363 - <customizeDebuggee>
4.1364 - <arg line="${application.args}"/>
4.1365 - </customizeDebuggee>
4.1366 - </j2seproject3:debug>
4.1367 - </target>
4.1368 - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
4.1369 - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
4.1370 - <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
4.1371 - </target>
4.1372 - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
4.1373 - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
4.1374 - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
4.1375 - <j2seproject3:debug classname="${debug.class}"/>
4.1376 - </target>
4.1377 - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
4.1378 - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
4.1379 - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
4.1380 - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
4.1381 - </target>
4.1382 - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
4.1383 - <target depends="init" name="-pre-debug-fix">
4.1384 - <fail unless="fix.includes">Must set fix.includes</fail>
4.1385 - <property name="javac.includes" value="${fix.includes}.java"/>
4.1386 - </target>
4.1387 - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
4.1388 - <j2seproject1:nbjpdareload/>
4.1389 - </target>
4.1390 - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
4.1391 - <!--
4.1392 - =================
4.1393 - PROFILING SECTION
4.1394 - =================
4.1395 - -->
4.1396 - <!--
4.1397 - pre NB7.2 profiler integration
4.1398 - -->
4.1399 - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
4.1400 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1401 - <nbprofiledirect>
4.1402 - <classpath>
4.1403 - <path path="${run.classpath}"/>
4.1404 - </classpath>
4.1405 - </nbprofiledirect>
4.1406 - <profile/>
4.1407 - </target>
4.1408 - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
4.1409 - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
4.1410 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1411 - <nbprofiledirect>
4.1412 - <classpath>
4.1413 - <path path="${run.classpath}"/>
4.1414 - </classpath>
4.1415 - </nbprofiledirect>
4.1416 - <profile classname="${profile.class}"/>
4.1417 - </target>
4.1418 - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
4.1419 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1420 - <nbprofiledirect>
4.1421 - <classpath>
4.1422 - <path path="${run.classpath}"/>
4.1423 - </classpath>
4.1424 - </nbprofiledirect>
4.1425 - <profile classname="sun.applet.AppletViewer">
4.1426 - <customize>
4.1427 - <arg value="${applet.url}"/>
4.1428 - </customize>
4.1429 - </profile>
4.1430 - </target>
4.1431 - <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
4.1432 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1433 - <nbprofiledirect>
4.1434 - <classpath>
4.1435 - <path path="${run.test.classpath}"/>
4.1436 - </classpath>
4.1437 - </nbprofiledirect>
4.1438 - <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
4.1439 - <customize>
4.1440 - <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
4.1441 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
4.1442 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
4.1443 - <jvmarg line="${profiler.info.jvmargs}"/>
4.1444 - <classpath>
4.1445 - <path path="${run.test.classpath}"/>
4.1446 - </classpath>
4.1447 - </customize>
4.1448 - </j2seproject3:junit>
4.1449 - </target>
4.1450 - <!--
4.1451 - end of pre NB72 profiling section
4.1452 - -->
4.1453 - <target if="netbeans.home" name="-profile-check">
4.1454 - <condition property="profiler.configured">
4.1455 - <or>
4.1456 - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
4.1457 - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
4.1458 - </or>
4.1459 - </condition>
4.1460 - </target>
4.1461 - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
4.1462 - <startprofiler/>
4.1463 - <antcall target="run"/>
4.1464 - </target>
4.1465 - <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
4.1466 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1467 - <startprofiler/>
4.1468 - <antcall target="run-single"/>
4.1469 - </target>
4.1470 - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
4.1471 - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
4.1472 - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
4.1473 - <startprofiler/>
4.1474 - <antcall target="test-single"/>
4.1475 - </target>
4.1476 - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
4.1477 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1478 - <startprofiler/>
4.1479 - <antcall target="run-test-with-main"/>
4.1480 - </target>
4.1481 - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
4.1482 - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
4.1483 - <startprofiler/>
4.1484 - <antcall target="run-applet"/>
4.1485 - </target>
4.1486 - <!--
4.1487 - ===============
4.1488 - JAVADOC SECTION
4.1489 - ===============
4.1490 - -->
4.1491 - <target depends="init" if="have.sources" name="-javadoc-build">
4.1492 - <mkdir dir="${dist.javadoc.dir}"/>
4.1493 - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
4.1494 - <and>
4.1495 - <isset property="endorsed.classpath.cmd.line.arg"/>
4.1496 - <not>
4.1497 - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
4.1498 - </not>
4.1499 - </and>
4.1500 - </condition>
4.1501 - <condition else="" property="bug5101868workaround" value="*.java">
4.1502 - <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
4.1503 - </condition>
4.1504 - <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
4.1505 - <and>
4.1506 - <isset property="javadoc.html5"/>
4.1507 - <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
4.1508 - </and>
4.1509 - </condition>
4.1510 - <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${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}">
4.1511 - <classpath>
4.1512 - <path path="${javac.classpath}"/>
4.1513 - </classpath>
4.1514 - <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
4.1515 - <filename name="**/*.java"/>
4.1516 - </fileset>
4.1517 - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
4.1518 - <include name="**/*.java"/>
4.1519 - <exclude name="*.java"/>
4.1520 - </fileset>
4.1521 - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
4.1522 - <arg line="${javadoc.html5.cmd.line.arg}"/>
4.1523 - </javadoc>
4.1524 - <copy todir="${dist.javadoc.dir}">
4.1525 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
4.1526 - <filename name="**/doc-files/**"/>
4.1527 - </fileset>
4.1528 - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
4.1529 - <include name="**/doc-files/**"/>
4.1530 - </fileset>
4.1531 - </copy>
4.1532 - </target>
4.1533 - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
4.1534 - <nbbrowse file="${dist.javadoc.dir}/index.html"/>
4.1535 - </target>
4.1536 - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
4.1537 - <!--
4.1538 - =========================
4.1539 - TEST COMPILATION SECTION
4.1540 - =========================
4.1541 - -->
4.1542 - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
4.1543 - <mkdir dir="${build.test.classes.dir}"/>
4.1544 - </target>
4.1545 - <target name="-pre-compile-test">
4.1546 - <!-- Empty placeholder for easier customization. -->
4.1547 - <!-- You can override this target in the ../build.xml file. -->
4.1548 - </target>
4.1549 - <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
4.1550 - <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
4.1551 - <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
4.1552 - <and>
4.1553 - <isset property="test.module.name"/>
4.1554 - <length length="0" string="${test.module.name}" when="greater"/>
4.1555 - </and>
4.1556 - </condition>
4.1557 - <condition else="--patch-module ${module.name}=${test.src.dir} --add-reads ${module.name}=ALL-UNNAMED" property="javac.test.compilerargs" value="--add-reads ${test.module.name}=ALL-UNNAMED">
4.1558 - <and>
4.1559 - <isset property="test.module.name"/>
4.1560 - <length length="0" string="${test.module.name}" when="greater"/>
4.1561 - </and>
4.1562 - </condition>
4.1563 - </target>
4.1564 - <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
4.1565 - <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
4.1566 - <and>
4.1567 - <isset property="test.module.name"/>
4.1568 - <length length="0" string="${test.module.name}" when="greater"/>
4.1569 - </and>
4.1570 - </condition>
4.1571 - <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
4.1572 - <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
4.1573 - <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
4.1574 - <chainedmapper>
4.1575 - <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
4.1576 - <filtermapper>
4.1577 - <uniqfilter/>
4.1578 - <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
4.1579 - </filtermapper>
4.1580 - <cutdirsmapper dirs="1"/>
4.1581 - <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
4.1582 - </chainedmapper>
4.1583 - </pathconvert>
4.1584 - <condition else="--patch-module ${module.name}=${build.test.classes.dir} --add-modules ${module.name} --add-reads ${module.name}=ALL-UNNAMED ${run.test.addexports.internal}" property="run.test.jvmargs" value="--add-modules ${test.module.name} --add-reads ${test.module.name}=ALL-UNNAMED ${run.test.addexports.internal}">
4.1585 - <and>
4.1586 - <isset property="test.module.name"/>
4.1587 - <length length="0" string="${test.module.name}" when="greater"/>
4.1588 - </and>
4.1589 - </condition>
4.1590 - </target>
4.1591 - <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
4.1592 - <property name="javac.test.sourcepath" value="${empty.dir}"/>
4.1593 - <property name="javac.test.compilerargs" value=""/>
4.1594 - <property name="run.test.jvmargs" value=""/>
4.1595 - </target>
4.1596 - <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
4.1597 - <target if="do.depend.true" name="-compile-test-depend">
4.1598 - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
4.1599 - </target>
4.1600 - <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
4.1601 - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${javac.test.sourcepath}" srcdir="${test.src.dir}">
4.1602 - <customize>
4.1603 - <compilerarg line="${javac.test.compilerargs}"/>
4.1604 - </customize>
4.1605 - </j2seproject3:javac>
4.1606 - <copy todir="${build.test.classes.dir}">
4.1607 - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
4.1608 - </copy>
4.1609 - </target>
4.1610 - <target name="-post-compile-test">
4.1611 - <!-- Empty placeholder for easier customization. -->
4.1612 - <!-- You can override this target in the ../build.xml file. -->
4.1613 - </target>
4.1614 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
4.1615 - <target name="-pre-compile-test-single">
4.1616 - <!-- Empty placeholder for easier customization. -->
4.1617 - <!-- You can override this target in the ../build.xml file. -->
4.1618 - </target>
4.1619 - <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
4.1620 - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
4.1621 - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
4.1622 - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}, module-info.java" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}">
4.1623 - <customize>
4.1624 - <compilerarg line="${javac.test.compilerargs}"/>
4.1625 - </customize>
4.1626 - </j2seproject3:javac>
4.1627 - <copy todir="${build.test.classes.dir}">
4.1628 - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
4.1629 - </copy>
4.1630 - </target>
4.1631 - <target name="-post-compile-test-single">
4.1632 - <!-- Empty placeholder for easier customization. -->
4.1633 - <!-- You can override this target in the ../build.xml file. -->
4.1634 - </target>
4.1635 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
4.1636 - <!--
4.1637 - =======================
4.1638 - TEST EXECUTION SECTION
4.1639 - =======================
4.1640 - -->
4.1641 - <target depends="init" if="have.tests" name="-pre-test-run">
4.1642 - <mkdir dir="${build.test.results.dir}"/>
4.1643 - </target>
4.1644 - <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
4.1645 - <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
4.1646 - </target>
4.1647 - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
4.1648 - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
4.1649 - </target>
4.1650 - <target depends="init" if="have.tests" name="test-report"/>
4.1651 - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
4.1652 - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
4.1653 - <target depends="init" if="have.tests" name="-pre-test-run-single">
4.1654 - <mkdir dir="${build.test.results.dir}"/>
4.1655 - </target>
4.1656 - <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
4.1657 - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
4.1658 - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
4.1659 - </target>
4.1660 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
4.1661 - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
4.1662 - </target>
4.1663 - <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
4.1664 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
4.1665 - <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
4.1666 - <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
4.1667 - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
4.1668 - </target>
4.1669 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
4.1670 - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
4.1671 - </target>
4.1672 - <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
4.1673 - <!--
4.1674 - =======================
4.1675 - TEST DEBUGGING SECTION
4.1676 - =======================
4.1677 - -->
4.1678 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
4.1679 - <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
4.1680 - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
4.1681 - </target>
4.1682 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
4.1683 - <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
4.1684 - <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
4.1685 - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
4.1686 - </target>
4.1687 - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
4.1688 - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
4.1689 - </target>
4.1690 - <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
4.1691 - <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
4.1692 - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
4.1693 - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
4.1694 - </target>
4.1695 - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
4.1696 - <!--
4.1697 - =========================
4.1698 - APPLET EXECUTION SECTION
4.1699 - =========================
4.1700 - -->
4.1701 - <target depends="init,compile-single" name="run-applet">
4.1702 - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
4.1703 - <j2seproject1:java classname="sun.applet.AppletViewer">
4.1704 - <customize>
4.1705 - <arg value="${applet.url}"/>
4.1706 - </customize>
4.1707 - </j2seproject1:java>
4.1708 - </target>
4.1709 - <!--
4.1710 - =========================
4.1711 - APPLET DEBUGGING SECTION
4.1712 - =========================
4.1713 - -->
4.1714 - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
4.1715 - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
4.1716 - <j2seproject3:debug classname="sun.applet.AppletViewer">
4.1717 - <customizeDebuggee>
4.1718 - <arg value="${applet.url}"/>
4.1719 - </customizeDebuggee>
4.1720 - </j2seproject3:debug>
4.1721 - </target>
4.1722 - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
4.1723 - <!--
4.1724 - ===============
4.1725 - CLEANUP SECTION
4.1726 - ===============
4.1727 - -->
4.1728 - <target name="-deps-clean-init" unless="built-clean.properties">
4.1729 - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
4.1730 - <delete file="${built-clean.properties}" quiet="true"/>
4.1731 - </target>
4.1732 - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
4.1733 - <echo level="warn" message="Cycle detected: livedb was already built"/>
4.1734 - </target>
4.1735 - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
4.1736 - <mkdir dir="${build.dir}"/>
4.1737 - <touch file="${built-clean.properties}" verbose="false"/>
4.1738 - <property file="${built-clean.properties}" prefix="already.built.clean."/>
4.1739 - <antcall target="-warn-already-built-clean"/>
4.1740 - <propertyfile file="${built-clean.properties}">
4.1741 - <entry key="${basedir}" value=""/>
4.1742 - </propertyfile>
4.1743 - </target>
4.1744 - <target depends="init" name="-do-clean">
4.1745 - <delete dir="${build.dir}"/>
4.1746 - <delete dir="${dist.jlink.output}"/>
4.1747 - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
4.1748 - </target>
4.1749 - <target name="-post-clean">
4.1750 - <!-- Empty placeholder for easier customization. -->
4.1751 - <!-- You can override this target in the ../build.xml file. -->
4.1752 - </target>
4.1753 - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
4.1754 - <target name="-check-call-dep">
4.1755 - <property file="${call.built.properties}" prefix="already.built."/>
4.1756 - <condition property="should.call.dep">
4.1757 - <and>
4.1758 - <not>
4.1759 - <isset property="already.built.${call.subproject}"/>
4.1760 - </not>
4.1761 - <available file="${call.script}"/>
4.1762 - </and>
4.1763 - </condition>
4.1764 - </target>
4.1765 - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
4.1766 - <ant antfile="${call.script}" inheritall="false" target="${call.target}">
4.1767 - <propertyset>
4.1768 - <propertyref prefix="transfer."/>
4.1769 - <mapper from="transfer.*" to="*" type="glob"/>
4.1770 - </propertyset>
4.1771 - </ant>
4.1772 - </target>
4.1773 -</project>
5.1 --- a/samples/livedb/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,8 +0,0 @@
5.4 -build.xml.data.CRC32=acb473e7
5.5 -build.xml.script.CRC32=61ba5a6a
5.6 -build.xml.stylesheet.CRC32=28e38971@1.39.0.45
5.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
5.9 -nbproject/build-impl.xml.data.CRC32=acb473e7
5.10 -nbproject/build-impl.xml.script.CRC32=186a778a
5.11 -nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
6.1 --- a/samples/livedb/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,87 +0,0 @@
6.4 -annotation.processing.enabled=true
6.5 -annotation.processing.enabled.in.editor=true
6.6 -annotation.processing.run.all.processors=true
6.7 -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
6.8 -application.title=livedb
6.9 -application.vendor=jarda
6.10 -build.classes.dir=${build.dir}/classes
6.11 -build.classes.excludes=**/*.java,**/*.form
6.12 -# This directory is removed when the project is cleaned:
6.13 -build.dir=build
6.14 -build.generated.dir=${build.dir}/generated
6.15 -build.generated.sources.dir=${build.dir}/generated-sources
6.16 -# Only compile against the classpath explicitly listed here:
6.17 -build.sysclasspath=ignore
6.18 -build.test.classes.dir=${build.dir}/test/classes
6.19 -build.test.results.dir=${build.dir}/test/results
6.20 -# Uncomment to specify the preferred debugger connection transport:
6.21 -#debug.transport=dt_socket
6.22 -debug.classpath=\
6.23 - ${run.classpath}
6.24 -debug.modulepath=\
6.25 - ${run.modulepath}
6.26 -debug.test.classpath=\
6.27 - ${run.test.classpath}
6.28 -debug.test.modulepath=\
6.29 - ${run.test.modulepath}
6.30 -# This directory is removed when the project is cleaned:
6.31 -dist.dir=dist
6.32 -dist.jar=${dist.dir}/livedb.jar
6.33 -dist.javadoc.dir=${dist.dir}/javadoc
6.34 -endorsed.classpath=
6.35 -excludes=
6.36 -file.reference.derby.jar=../libs/dist/derby.jar
6.37 -file.reference.junit-4.4.jar=../libs/dist/junit-4.4.jar
6.38 -file.reference.org-openide-util-lookup.jar=../libs/dist/org-openide-util-lookup.jar
6.39 -includes=**
6.40 -jar.compress=false
6.41 -javac.classpath=\
6.42 - ${file.reference.org-openide-util-lookup.jar}
6.43 -# Space-separated list of extra javac options
6.44 -javac.compilerargs=
6.45 -javac.deprecation=false
6.46 -javac.modulepath=
6.47 -javac.processormodulepath=
6.48 -javac.processorpath=\
6.49 - ${javac.classpath}
6.50 -javac.source=1.6
6.51 -javac.target=1.6
6.52 -javac.test.classpath=\
6.53 - ${javac.classpath}:\
6.54 - ${build.classes.dir}:\
6.55 - ${file.reference.derby.jar}:\
6.56 - ${file.reference.junit-4.4.jar}
6.57 -javac.test.modulepath=\
6.58 - ${javac.modulepath}
6.59 -javac.test.processorpath=\
6.60 - ${javac.test.classpath}
6.61 -javadoc.additionalparam=
6.62 -javadoc.author=false
6.63 -javadoc.encoding=${source.encoding}
6.64 -javadoc.noindex=false
6.65 -javadoc.nonavbar=false
6.66 -javadoc.notree=false
6.67 -javadoc.private=false
6.68 -javadoc.splitindex=true
6.69 -javadoc.use=true
6.70 -javadoc.version=false
6.71 -javadoc.windowtitle=
6.72 -meta.inf.dir=${src.dir}/META-INF
6.73 -platform.active=default_platform
6.74 -run.classpath=\
6.75 - ${javac.classpath}:\
6.76 - ${build.classes.dir}
6.77 -# Space-separated list of JVM arguments used when running the project
6.78 -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
6.79 -# or test-sys-prop.name=value to set system properties for unit tests):
6.80 -run.jvmargs=
6.81 -run.modulepath=\
6.82 - ${javac.modulepath}
6.83 -run.test.classpath=\
6.84 - ${javac.test.classpath}:\
6.85 - ${build.test.classes.dir}
6.86 -run.test.modulepath=\
6.87 - ${javac.test.modulepath}
6.88 -source.encoding=UTF-8
6.89 -src.dir=src
6.90 -test.src.dir=test
7.1 --- a/samples/livedb/nbproject/project.xml Mon Nov 11 13:17:34 2019 +0100
7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
7.3 @@ -1,15 +0,0 @@
7.4 -<?xml version="1.0" encoding="UTF-8"?>
7.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
7.6 - <type>org.netbeans.modules.java.j2seproject</type>
7.7 - <configuration>
7.8 - <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
7.9 - <name>livedb</name>
7.10 - <source-roots>
7.11 - <root id="src.dir"/>
7.12 - </source-roots>
7.13 - <test-roots>
7.14 - <root id="test.src.dir"/>
7.15 - </test-roots>
7.16 - </data>
7.17 - </configuration>
7.18 -</project>
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/samples/livedb/pom.xml Tue Nov 12 08:55:35 2019 +0100
8.3 @@ -0,0 +1,82 @@
8.4 +<?xml version="1.0"?>
8.5 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8.6 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
8.7 + <modelVersion>4.0.0</modelVersion>
8.8 +
8.9 + <groupId>org.apidesign.samples</groupId>
8.10 + <artifactId>livedb</artifactId>
8.11 + <version>1.0-SNAPSHOT</version>
8.12 + <packaging>jar</packaging>
8.13 +
8.14 + <name>LiveDB</name>
8.15 + <organization>
8.16 + <name>API Design</name>
8.17 + <url>http://apidesign.org</url>
8.18 + </organization>
8.19 + <properties>
8.20 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
8.21 + <maven.compiler.source>1.8</maven.compiler.source>
8.22 + <maven.compiler.target>1.8</maven.compiler.target>
8.23 + <netbeans.compile.on.save>none</netbeans.compile.on.save>
8.24 + </properties>
8.25 +
8.26 + <build>
8.27 + <plugins>
8.28 + <plugin>
8.29 + <artifactId>maven-antrun-plugin</artifactId>
8.30 + <version>1.8</version>
8.31 + <executions>
8.32 + <execution>
8.33 + <phase>validate</phase>
8.34 + <configuration>
8.35 + <target>
8.36 + <property name="cp" refid="maven.runtime.classpath"/>
8.37 + <ant antfile="livedb.xml" target="create-db">
8.38 + <property name="cp" value="${cp}"/>
8.39 + </ant>
8.40 + </target>
8.41 + </configuration>
8.42 + <goals>
8.43 + <goal>run</goal>
8.44 + </goals>
8.45 + </execution>
8.46 + </executions>
8.47 + </plugin>
8.48 + </plugins>
8.49 + </build>
8.50 +
8.51 + <dependencies>
8.52 + <dependency>
8.53 + <groupId>org.netbeans.api</groupId>
8.54 + <artifactId>org-openide-util-lookup</artifactId>
8.55 + <version>RELEASE112</version>
8.56 + <type>jar</type>
8.57 + <scope>provided</scope>
8.58 + </dependency>
8.59 + <dependency>
8.60 + <groupId>org.apache.derby</groupId>
8.61 + <artifactId>derby</artifactId>
8.62 + <version>10.15.1.3</version>
8.63 + <type>jar</type>
8.64 + </dependency>
8.65 + <dependency>
8.66 + <groupId>org.apache.derby</groupId>
8.67 + <artifactId>derbyclient</artifactId>
8.68 + <version>10.15.1.3</version>
8.69 + <type>jar</type>
8.70 + </dependency>
8.71 + <dependency>
8.72 + <groupId>org.apache.derby</groupId>
8.73 + <artifactId>derbyshared</artifactId>
8.74 + <version>10.15.1.3</version>
8.75 + <type>jar</type>
8.76 + </dependency>
8.77 + <dependency>
8.78 + <groupId>junit</groupId>
8.79 + <artifactId>junit</artifactId>
8.80 + <version>4.12</version>
8.81 + <scope>test</scope>
8.82 + <type>jar</type>
8.83 + </dependency>
8.84 + </dependencies>
8.85 +</project>
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/samples/livedb/src/main/java/org/apidesign/livedb/LiveDB.java Tue Nov 12 08:55:35 2019 +0100
9.3 @@ -0,0 +1,22 @@
9.4 +package org.apidesign.livedb;
9.5 +
9.6 +import java.lang.annotation.ElementType;
9.7 +import java.lang.annotation.Retention;
9.8 +import java.lang.annotation.RetentionPolicy;
9.9 +import java.lang.annotation.Target;
9.10 +
9.11 +/**
9.12 + *
9.13 + * @author Jaroslav Tulach <jtulach@netbeans.org>
9.14 + */
9.15 +// BEGIN: livedb.connection.annotation
9.16 +@Target(ElementType.PACKAGE)
9.17 +@Retention(RetentionPolicy.SOURCE)
9.18 +public @interface LiveDB {
9.19 + String url();
9.20 + String user();
9.21 + String password();
9.22 + String query();
9.23 + String classname();
9.24 +}
9.25 +// END: livedb.connection.annotation
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/samples/livedb/src/main/java/org/apidesign/livedb/impl/LiveDBProcessor.java Tue Nov 12 08:55:35 2019 +0100
10.3 @@ -0,0 +1,228 @@
10.4 +package org.apidesign.livedb.impl;
10.5 +
10.6 +import java.io.IOException;
10.7 +import java.io.Writer;
10.8 +import java.sql.CallableStatement;
10.9 +import java.sql.Connection;
10.10 +import java.sql.DatabaseMetaData;
10.11 +import java.sql.Driver;
10.12 +import java.sql.ResultSet;
10.13 +import java.sql.ResultSetMetaData;
10.14 +import java.sql.SQLException;
10.15 +import java.util.ArrayList;
10.16 +import java.util.Collections;
10.17 +import java.util.List;
10.18 +import java.util.Map.Entry;
10.19 +import java.util.Properties;
10.20 +import java.util.ServiceLoader;
10.21 +import java.util.Set;
10.22 +import javax.annotation.processing.AbstractProcessor;
10.23 +import javax.annotation.processing.Completion;
10.24 +import javax.annotation.processing.Completions;
10.25 +import javax.annotation.processing.Filer;
10.26 +import javax.annotation.processing.Processor;
10.27 +import javax.annotation.processing.RoundEnvironment;
10.28 +import javax.annotation.processing.SupportedAnnotationTypes;
10.29 +import javax.annotation.processing.SupportedSourceVersion;
10.30 +import javax.lang.model.SourceVersion;
10.31 +import javax.lang.model.element.AnnotationMirror;
10.32 +import javax.lang.model.element.AnnotationValue;
10.33 +import javax.lang.model.element.Element;
10.34 +import javax.lang.model.element.ExecutableElement;
10.35 +import javax.lang.model.element.PackageElement;
10.36 +import javax.lang.model.element.TypeElement;
10.37 +import javax.tools.Diagnostic;
10.38 +import javax.tools.JavaFileObject;
10.39 +import org.apidesign.livedb.LiveDB;
10.40 +import org.openide.util.lookup.ServiceProvider;
10.41 +
10.42 +/**
10.43 + *
10.44 + * @author Jaroslav Tulach <jtulach@netbeans.org>
10.45 + */
10.46 +// BEGIN: livedb.processor
10.47 +@SupportedAnnotationTypes("org.apidesign.livedb.LiveDB")
10.48 +@SupportedSourceVersion(SourceVersion.RELEASE_6)
10.49 +@ServiceProvider(service=Processor.class)
10.50 +public final class LiveDBProcessor extends AbstractProcessor {
10.51 + @Override
10.52 + public boolean process(
10.53 + Set<? extends TypeElement> annotations, RoundEnvironment roundEnv
10.54 + ) {
10.55 + final Filer filer = processingEnv.getFiler();
10.56 + for (Element e : roundEnv.getElementsAnnotatedWith(LiveDB.class)) {
10.57 + LiveDB db = e.getAnnotation(LiveDB.class);
10.58 + PackageElement pe = (PackageElement)e;
10.59 + String clsName = pe.getQualifiedName() + "." + db.classname();
10.60 + try {
10.61 + JavaFileObject src = filer.createSourceFile(clsName, pe);
10.62 + Writer w = src.openWriter();
10.63 + Connection c = getConnection(
10.64 + db.url(), db.user(), db.password()
10.65 + );
10.66 + CallableStatement s = c.prepareCall(db.query());
10.67 + ResultSet rs = s.executeQuery();
10.68 + ResultSetMetaData md = rs.getMetaData();
10.69 + generateClassHeader(w, pe, db);
10.70 + w.append("class " + db.classname() + " {\n");
10.71 + for (int i = 1; i <= md.getColumnCount(); i++) {
10.72 + generateField(w, md, i);
10.73 + }
10.74 + generateConstructor(w, db, md);
10.75 + generateQueryMethod(w, db, md);
10.76 + w.append("}");
10.77 + w.close();
10.78 + } catch (IOException | SQLException ex) {
10.79 + processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, ex.getMessage(), e);
10.80 + }
10.81 + }
10.82 + return true;
10.83 + }
10.84 +// FINISH: livedb.processor
10.85 +
10.86 + private void generateQueryMethod(Writer w, LiveDB db, ResultSetMetaData md) throws SQLException, IOException {
10.87 + w.append(" public static List<" + db.classname() + "> ")
10.88 + .append("query() throws SQLException {\n");
10.89 + w.append(" Connection c = DriverManager.getConnection(\"")
10.90 + .append(db.url()).append("\", \"")
10.91 + .append(db.user()).append("\", \"")
10.92 + .append(db.password()).append("\");\n");
10.93 + w.append(" List<").append(db.classname())
10.94 + .append("> res = new ArrayList<")
10.95 + .append(db.classname()).append(">();\n");
10.96 + w.append(" CallableStatement s = c.prepareCall(\"")
10.97 + .append(db.query()).append("\");\n");
10.98 + w.append(" ResultSet rs = s.executeQuery();\n");
10.99 + w.append(" ResultSetMetaData md = rs.getMetaData();\n");
10.100 + w.append(" while (rs.next()) {\n");
10.101 + w.append(" res.add(new " + db.classname() + "(\n");
10.102 + for (int i = 1; i <= md.getColumnCount(); i++) {
10.103 + w.append(" (")
10.104 + .append(md.getColumnClassName(i))
10.105 + .append(")rs.getObject(" + i).append(")");
10.106 + if (i < md.getColumnCount()) {
10.107 + w.append(",\n");
10.108 + } else {
10.109 + w.append("\n");
10.110 + }
10.111 + }
10.112 + w.append(" ));\n");
10.113 + w.append(" };\n");
10.114 + w.append(" return res;\n");
10.115 + w.append(" }");
10.116 + }
10.117 +
10.118 + private void generateConstructor(Writer w, LiveDB db, ResultSetMetaData md) throws SQLException, IOException {
10.119 + w.append(" private " + db.classname() + "(\n");
10.120 + for (int i = 1; i <= md.getColumnCount(); i++) {
10.121 + w.append(" ").append(md.getColumnClassName(i))
10.122 + .append(" ").append(md.getColumnName(i));
10.123 + if (i < md.getColumnCount()) {
10.124 + w.append(",\n");
10.125 + } else {
10.126 + w.append("\n");
10.127 + }
10.128 + }
10.129 + w.append(" ) {\n");
10.130 + for (int i = 1; i <= md.getColumnCount(); i++) {
10.131 + w.append(" this.")
10.132 + .append(md.getColumnName(i))
10.133 + .append(" = ")
10.134 + .append(md.getColumnName(i))
10.135 + .append(";\n");
10.136 + }
10.137 + w.append(" }\n");
10.138 + }
10.139 +
10.140 + private void generateField(Writer w, ResultSetMetaData md, int i) throws IOException, SQLException {
10.141 + w.append(" public final ")
10.142 + .append(md.getColumnClassName(i))
10.143 + .append(" ")
10.144 + .append(md.getColumnName(i))
10.145 + .append(";\n");
10.146 + }
10.147 +
10.148 + private void generateClassHeader(Writer w, PackageElement pe, LiveDB db) throws IOException {
10.149 + w.append("package " + pe.getQualifiedName() + ";\n");
10.150 + w.append("import java.util.List;\n");
10.151 + w.append("import java.util.ArrayList;\n");
10.152 + w.append("import java.sql.*;\n");
10.153 + }
10.154 + private static Connection getConnection(String url, String user, String password)
10.155 + throws SQLException {
10.156 + final ClassLoader cl = LiveDBProcessor.class.getClassLoader();
10.157 + for (Driver d : ServiceLoader.load(Driver.class, cl)) {
10.158 +// System.out.println("looked up: " + d);
10.159 + if (d.acceptsURL(url)) {
10.160 + //System.out.println("accepts: " + d);
10.161 + Properties p = new Properties();
10.162 + p.put("user", user);
10.163 + p.put("password", password);
10.164 + return d.connect(url, p);
10.165 + }
10.166 + }
10.167 + throw new SQLException("No driver found for " + url);
10.168 + }
10.169 +
10.170 +
10.171 +
10.172 + // BEGIN: livedb.completions
10.173 + @Override
10.174 + public Iterable<? extends Completion> getCompletions(
10.175 + Element element, AnnotationMirror annotation,
10.176 + ExecutableElement member, String userText
10.177 + ) {
10.178 + if (!"query".equals(member.getSimpleName().toString())) {
10.179 + return Collections.emptyList();
10.180 + }
10.181 + if (userText == null || userText.length() <= 1) {
10.182 + return Collections.singleton(Completions.of("\"SELECT "));
10.183 + }
10.184 + if (userText.toUpperCase().matches(".*FROM *")) {
10.185 + String user = extractValue(annotation, "user");
10.186 + String password = extractValue(annotation, "password");
10.187 + String url = extractValue(annotation, "url");
10.188 + if (user == null || password == null || url == null) {
10.189 + return Collections.emptyList();
10.190 + }
10.191 + try {
10.192 + List<Completion> arr = new ArrayList<Completion>();
10.193 + Connection c = getConnection(url, user, password);
10.194 + DatabaseMetaData meta = c.getMetaData();
10.195 + ResultSet res = meta.getTables(null, null, "%", null);
10.196 + boolean ok = res.first();
10.197 + while (ok) {
10.198 + String txt = userText + res.getString("TABLE_NAME");
10.199 + arr.add(Completions.of(txt));
10.200 + ok = res.next();
10.201 + }
10.202 + return arr;
10.203 + } catch (SQLException ex) {
10.204 + throw new IllegalStateException(ex);
10.205 + }
10.206 + }
10.207 + return Collections.emptyList();
10.208 + }
10.209 + // END: livedb.completions
10.210 +
10.211 + private static String extractValue(AnnotationMirror am, String param) {
10.212 + AnnotationValue av = null;
10.213 + for (Entry<? extends ExecutableElement, ? extends AnnotationValue> entry : am.getElementValues().entrySet()) {
10.214 + if (entry.getKey().toString().equals(param + "()")) {
10.215 + av = entry.getValue();
10.216 + break;
10.217 + }
10.218 + }
10.219 + if (av == null) {
10.220 + return null;
10.221 + }
10.222 + String s = av.toString();
10.223 + if (s.startsWith("\"")) {
10.224 + s = s.substring(1);
10.225 + }
10.226 + if (s.endsWith("\"")) {
10.227 + s = s.substring(0, s.length() - 1);
10.228 + }
10.229 + return s;
10.230 + }
10.231 +}
11.1 --- a/samples/livedb/src/org/apidesign/livedb/LiveDB.java Mon Nov 11 13:17:34 2019 +0100
11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
11.3 @@ -1,22 +0,0 @@
11.4 -package org.apidesign.livedb;
11.5 -
11.6 -import java.lang.annotation.ElementType;
11.7 -import java.lang.annotation.Retention;
11.8 -import java.lang.annotation.RetentionPolicy;
11.9 -import java.lang.annotation.Target;
11.10 -
11.11 -/**
11.12 - *
11.13 - * @author Jaroslav Tulach <jtulach@netbeans.org>
11.14 - */
11.15 -// BEGIN: livedb.connection.annotation
11.16 -@Target(ElementType.PACKAGE)
11.17 -@Retention(RetentionPolicy.SOURCE)
11.18 -public @interface LiveDB {
11.19 - String url();
11.20 - String user();
11.21 - String password();
11.22 - String query();
11.23 - String classname();
11.24 -}
11.25 -// END: livedb.connection.annotation
12.1 --- a/samples/livedb/src/org/apidesign/livedb/impl/LiveDBProcessor.java Mon Nov 11 13:17:34 2019 +0100
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,229 +0,0 @@
12.4 -package org.apidesign.livedb.impl;
12.5 -
12.6 -import java.io.IOException;
12.7 -import java.io.Writer;
12.8 -import java.sql.CallableStatement;
12.9 -import java.sql.Connection;
12.10 -import java.sql.DatabaseMetaData;
12.11 -import java.sql.Driver;
12.12 -import java.sql.ResultSet;
12.13 -import java.sql.ResultSetMetaData;
12.14 -import java.sql.SQLException;
12.15 -import java.util.ArrayList;
12.16 -import java.util.Collections;
12.17 -import java.util.List;
12.18 -import java.util.Map.Entry;
12.19 -import java.util.Properties;
12.20 -import java.util.ServiceLoader;
12.21 -import java.util.Set;
12.22 -import javax.annotation.processing.AbstractProcessor;
12.23 -import javax.annotation.processing.Completion;
12.24 -import javax.annotation.processing.Completions;
12.25 -import javax.annotation.processing.Filer;
12.26 -import javax.annotation.processing.Processor;
12.27 -import javax.annotation.processing.RoundEnvironment;
12.28 -import javax.annotation.processing.SupportedAnnotationTypes;
12.29 -import javax.annotation.processing.SupportedSourceVersion;
12.30 -import javax.lang.model.SourceVersion;
12.31 -import javax.lang.model.element.AnnotationMirror;
12.32 -import javax.lang.model.element.AnnotationValue;
12.33 -import javax.lang.model.element.Element;
12.34 -import javax.lang.model.element.ExecutableElement;
12.35 -import javax.lang.model.element.PackageElement;
12.36 -import javax.lang.model.element.TypeElement;
12.37 -import javax.tools.JavaFileObject;
12.38 -import org.apidesign.livedb.LiveDB;
12.39 -import org.openide.util.lookup.ServiceProvider;
12.40 -
12.41 -/**
12.42 - *
12.43 - * @author Jaroslav Tulach <jtulach@netbeans.org>
12.44 - */
12.45 -// BEGIN: livedb.processor
12.46 -@SupportedAnnotationTypes("org.apidesign.livedb.LiveDB")
12.47 -@SupportedSourceVersion(SourceVersion.RELEASE_6)
12.48 -@ServiceProvider(service=Processor.class)
12.49 -public final class LiveDBProcessor extends AbstractProcessor {
12.50 - @Override
12.51 - public boolean process(
12.52 - Set<? extends TypeElement> annotations, RoundEnvironment roundEnv
12.53 - ) {
12.54 - final Filer filer = processingEnv.getFiler();
12.55 - for (Element e : roundEnv.getElementsAnnotatedWith(LiveDB.class)) {
12.56 - LiveDB db = e.getAnnotation(LiveDB.class);
12.57 - PackageElement pe = (PackageElement)e;
12.58 - String clsName = pe.getQualifiedName() + "." + db.classname();
12.59 - try {
12.60 - JavaFileObject src = filer.createSourceFile(clsName, pe);
12.61 - Writer w = src.openWriter();
12.62 - Connection c = getConnection(
12.63 - db.url(), db.user(), db.password()
12.64 - );
12.65 - CallableStatement s = c.prepareCall(db.query());
12.66 - ResultSet rs = s.executeQuery();
12.67 - ResultSetMetaData md = rs.getMetaData();
12.68 - generateClassHeader(w, pe, db);
12.69 - w.append("class " + db.classname() + " {\n");
12.70 - for (int i = 1; i <= md.getColumnCount(); i++) {
12.71 - generateField(w, md, i);
12.72 - }
12.73 - generateConstructor(w, db, md);
12.74 - generateQueryMethod(w, db, md);
12.75 - w.append("}");
12.76 - w.close();
12.77 - } catch (IOException ex) {
12.78 - throw new IllegalStateException(ex);
12.79 - } catch (SQLException ex) {
12.80 - throw new IllegalStateException(ex);
12.81 - }
12.82 - }
12.83 - return true;
12.84 - }
12.85 -// FINISH: livedb.processor
12.86 -
12.87 - private void generateQueryMethod(Writer w, LiveDB db, ResultSetMetaData md) throws SQLException, IOException {
12.88 - w.append(" public static List<" + db.classname() + "> ")
12.89 - .append("query() throws SQLException {\n");
12.90 - w.append(" Connection c = DriverManager.getConnection(\"")
12.91 - .append(db.url()).append("\", \"")
12.92 - .append(db.user()).append("\", \"")
12.93 - .append(db.password()).append("\");\n");
12.94 - w.append(" List<").append(db.classname())
12.95 - .append("> res = new ArrayList<")
12.96 - .append(db.classname()).append(">();\n");
12.97 - w.append(" CallableStatement s = c.prepareCall(\"")
12.98 - .append(db.query()).append("\");\n");
12.99 - w.append(" ResultSet rs = s.executeQuery();\n");
12.100 - w.append(" ResultSetMetaData md = rs.getMetaData();\n");
12.101 - w.append(" while (rs.next()) {\n");
12.102 - w.append(" res.add(new " + db.classname() + "(\n");
12.103 - for (int i = 1; i <= md.getColumnCount(); i++) {
12.104 - w.append(" (")
12.105 - .append(md.getColumnClassName(i))
12.106 - .append(")rs.getObject(" + i).append(")");
12.107 - if (i < md.getColumnCount()) {
12.108 - w.append(",\n");
12.109 - } else {
12.110 - w.append("\n");
12.111 - }
12.112 - }
12.113 - w.append(" ));\n");
12.114 - w.append(" };\n");
12.115 - w.append(" return res;\n");
12.116 - w.append(" }");
12.117 - }
12.118 -
12.119 - private void generateConstructor(Writer w, LiveDB db, ResultSetMetaData md) throws SQLException, IOException {
12.120 - w.append(" private " + db.classname() + "(\n");
12.121 - for (int i = 1; i <= md.getColumnCount(); i++) {
12.122 - w.append(" ").append(md.getColumnClassName(i))
12.123 - .append(" ").append(md.getColumnName(i));
12.124 - if (i < md.getColumnCount()) {
12.125 - w.append(",\n");
12.126 - } else {
12.127 - w.append("\n");
12.128 - }
12.129 - }
12.130 - w.append(" ) {\n");
12.131 - for (int i = 1; i <= md.getColumnCount(); i++) {
12.132 - w.append(" this.")
12.133 - .append(md.getColumnName(i))
12.134 - .append(" = ")
12.135 - .append(md.getColumnName(i))
12.136 - .append(";\n");
12.137 - }
12.138 - w.append(" }\n");
12.139 - }
12.140 -
12.141 - private void generateField(Writer w, ResultSetMetaData md, int i) throws IOException, SQLException {
12.142 - w.append(" public final ")
12.143 - .append(md.getColumnClassName(i))
12.144 - .append(" ")
12.145 - .append(md.getColumnName(i))
12.146 - .append(";\n");
12.147 - }
12.148 -
12.149 - private void generateClassHeader(Writer w, PackageElement pe, LiveDB db) throws IOException {
12.150 - w.append("package " + pe.getQualifiedName() + ";\n");
12.151 - w.append("import java.util.List;\n");
12.152 - w.append("import java.util.ArrayList;\n");
12.153 - w.append("import java.sql.*;\n");
12.154 - }
12.155 - private static Connection getConnection(String url, String user, String password)
12.156 - throws SQLException {
12.157 - final ClassLoader cl = LiveDBProcessor.class.getClassLoader();
12.158 - for (Driver d : ServiceLoader.load(Driver.class, cl)) {
12.159 -// System.out.println("looked up: " + d);
12.160 - if (d.acceptsURL(url)) {
12.161 - //System.out.println("accepts: " + d);
12.162 - Properties p = new Properties();
12.163 - p.put("user", user);
12.164 - p.put("password", password);
12.165 - return d.connect(url, p);
12.166 - }
12.167 - }
12.168 - throw new SQLException("No driver found for " + url);
12.169 - }
12.170 -
12.171 -
12.172 -
12.173 - // BEGIN: livedb.completions
12.174 - @Override
12.175 - public Iterable<? extends Completion> getCompletions(
12.176 - Element element, AnnotationMirror annotation,
12.177 - ExecutableElement member, String userText
12.178 - ) {
12.179 - if (!"query".equals(member.getSimpleName().toString())) {
12.180 - return Collections.emptyList();
12.181 - }
12.182 - if (userText == null || userText.length() <= 1) {
12.183 - return Collections.singleton(Completions.of("\"SELECT "));
12.184 - }
12.185 - if (userText.toUpperCase().matches(".*FROM *")) {
12.186 - String user = extractValue(annotation, "user");
12.187 - String password = extractValue(annotation, "password");
12.188 - String url = extractValue(annotation, "url");
12.189 - if (user == null || password == null || url == null) {
12.190 - return Collections.emptyList();
12.191 - }
12.192 - try {
12.193 - List<Completion> arr = new ArrayList<Completion>();
12.194 - Connection c = getConnection(url, user, password);
12.195 - DatabaseMetaData meta = c.getMetaData();
12.196 - ResultSet res = meta.getTables(null, null, "%", null);
12.197 - boolean ok = res.first();
12.198 - while (ok) {
12.199 - String txt = userText + res.getString("TABLE_NAME");
12.200 - arr.add(Completions.of(txt));
12.201 - ok = res.next();
12.202 - }
12.203 - return arr;
12.204 - } catch (SQLException ex) {
12.205 - throw new IllegalStateException(ex);
12.206 - }
12.207 - }
12.208 - return Collections.emptyList();
12.209 - }
12.210 - // END: livedb.completions
12.211 -
12.212 - private static String extractValue(AnnotationMirror am, String param) {
12.213 - AnnotationValue av = null;
12.214 - for (Entry<? extends ExecutableElement, ? extends AnnotationValue> entry : am.getElementValues().entrySet()) {
12.215 - if (entry.getKey().toString().equals(param + "()")) {
12.216 - av = entry.getValue();
12.217 - break;
12.218 - }
12.219 - }
12.220 - if (av == null) {
12.221 - return null;
12.222 - }
12.223 - String s = av.toString();
12.224 - if (s.startsWith("\"")) {
12.225 - s = s.substring(1);
12.226 - }
12.227 - if (s.endsWith("\"")) {
12.228 - s = s.substring(0, s.length() - 1);
12.229 - }
12.230 - return s;
12.231 - }
12.232 -}
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/samples/livedb/src/test/java/org/apidesign/livedb/example/LiveDBTest.java Tue Nov 12 08:55:35 2019 +0100
13.3 @@ -0,0 +1,28 @@
13.4 +package org.apidesign.livedb.example;
13.5 +
13.6 +import java.sql.SQLException;
13.7 +import java.util.List;
13.8 +import static junit.framework.TestCase.assertEquals;
13.9 +import org.junit.Test;
13.10 +
13.11 +/**
13.12 + *
13.13 + * @author Jaroslav Tulach <jtulach@netbeans.org>
13.14 + */
13.15 +public class LiveDBTest {
13.16 +
13.17 + public LiveDBTest() {
13.18 + }
13.19 +
13.20 + @Test
13.21 + public void testSomeMethod() throws SQLException {
13.22 + // BEGIN: livedb.test
13.23 + List<Age> ages = Age.query();
13.24 + assertEquals("One record", 1, ages.size());
13.25 + Age age = ages.get(0);
13.26 + assertEquals("name is apidesign", "apidesign", age.NAME);
13.27 + assertEquals("it is three years old", 3, age.AGE.intValue());
13.28 + // END: livedb.test
13.29 + }
13.30 +
13.31 +}
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/samples/livedb/src/test/java/org/apidesign/livedb/example/package-info.java Tue Nov 12 08:55:35 2019 +0100
14.3 @@ -0,0 +1,11 @@
14.4 +
14.5 +// BEGIN: livedb.connect
14.6 +@LiveDB(
14.7 + classname="Age", password="j1", user="j1",
14.8 + query="select * from APP.AGE",
14.9 + url="jdbc:derby:classpath:db"
14.10 +)
14.11 +package org.apidesign.livedb.example;
14.12 +// END: livedb.connect
14.13 +
14.14 +import org.apidesign.livedb.LiveDB;
15.1 --- a/samples/livedb/test/org/apidesign/livedb/example/LiveDBTest.java Mon Nov 11 13:17:34 2019 +0100
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,27 +0,0 @@
15.4 -package org.apidesign.livedb.example;
15.5 -
15.6 -import java.sql.SQLException;
15.7 -import java.util.List;
15.8 -import junit.framework.TestCase;
15.9 -
15.10 -/**
15.11 - *
15.12 - * @author Jaroslav Tulach <jtulach@netbeans.org>
15.13 - */
15.14 -public class LiveDBTest extends TestCase {
15.15 -
15.16 - public LiveDBTest(String testName) {
15.17 - super(testName);
15.18 - }
15.19 -
15.20 - public void testSomeMethod() throws SQLException {
15.21 - // BEGIN: livedb.test
15.22 - List<Age> ages = Age.query();
15.23 - assertEquals("One record", 1, ages.size());
15.24 - Age age = ages.get(0);
15.25 - assertEquals("name is apidesign", "apidesign", age.NAME);
15.26 - assertEquals("it is three years old", 3, age.AGE.intValue());
15.27 - // END: livedb.test
15.28 - }
15.29 -
15.30 -}
16.1 --- a/samples/livedb/test/org/apidesign/livedb/example/package-info.java Mon Nov 11 13:17:34 2019 +0100
16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
16.3 @@ -1,11 +0,0 @@
16.4 -
16.5 -// BEGIN: livedb.connect
16.6 -@LiveDB(
16.7 - classname="Age", password="j1", user="j1",
16.8 - query="select * from APP.AGE",
16.9 - url="jdbc:derby:classpath:db"
16.10 -)
16.11 -package org.apidesign.livedb.example;
16.12 -// END: livedb.connect
16.13 -
16.14 -import org.apidesign.livedb.LiveDB;