1.1 --- a/java/jdbc-dk-driver/build.xml Mon Mar 04 20:15:24 2019 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,73 +0,0 @@
1.4 -<?xml version="1.0" encoding="UTF-8"?>
1.5 -<!-- You may freely edit this file. See commented blocks below for -->
1.6 -<!-- some examples of how to customize the build. -->
1.7 -<!-- (If you delete it and reopen the project it will be recreated.) -->
1.8 -<!-- By default, only the Clean and Build commands use this build script. -->
1.9 -<!-- Commands such as Run, Debug, and Test only use this build script if -->
1.10 -<!-- the Compile on Save feature is turned off for the project. -->
1.11 -<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
1.12 -<!-- in the project's Project Properties dialog box.-->
1.13 -<project name="jdbc-dk-driver" default="default" basedir=".">
1.14 - <description>Builds, tests, and runs the project jdbc-dk-driver.</description>
1.15 - <import file="nbproject/build-impl.xml"/>
1.16 - <!--
1.17 -
1.18 - There exist several targets which are by default empty and which can be
1.19 - used for execution of your tasks. These targets are usually executed
1.20 - before and after some main targets. They are:
1.21 -
1.22 - -pre-init: called before initialization of project properties
1.23 - -post-init: called after initialization of project properties
1.24 - -pre-compile: called before javac compilation
1.25 - -post-compile: called after javac compilation
1.26 - -pre-compile-single: called before javac compilation of single file
1.27 - -post-compile-single: called after javac compilation of single file
1.28 - -pre-compile-test: called before javac compilation of JUnit tests
1.29 - -post-compile-test: called after javac compilation of JUnit tests
1.30 - -pre-compile-test-single: called before javac compilation of single JUnit test
1.31 - -post-compile-test-single: called after javac compilation of single JUunit test
1.32 - -pre-jar: called before JAR building
1.33 - -post-jar: called after JAR building
1.34 - -post-clean: called after cleaning build products
1.35 -
1.36 - (Targets beginning with '-' are not intended to be called on their own.)
1.37 -
1.38 - Example of inserting an obfuscator after compilation could look like this:
1.39 -
1.40 - <target name="-post-compile">
1.41 - <obfuscate>
1.42 - <fileset dir="${build.classes.dir}"/>
1.43 - </obfuscate>
1.44 - </target>
1.45 -
1.46 - For list of available properties check the imported
1.47 - nbproject/build-impl.xml file.
1.48 -
1.49 -
1.50 - Another way to customize the build is by overriding existing main targets.
1.51 - The targets of interest are:
1.52 -
1.53 - -init-macrodef-javac: defines macro for javac compilation
1.54 - -init-macrodef-junit: defines macro for junit execution
1.55 - -init-macrodef-debug: defines macro for class debugging
1.56 - -init-macrodef-java: defines macro for class execution
1.57 - -do-jar: JAR building
1.58 - run: execution of project
1.59 - -javadoc-build: Javadoc generation
1.60 - test-report: JUnit report generation
1.61 -
1.62 - An example of overriding the target for project execution could look like this:
1.63 -
1.64 - <target name="run" depends="jdbc-dk-driver-impl.jar">
1.65 - <exec dir="bin" executable="launcher.exe">
1.66 - <arg file="${dist.jar}"/>
1.67 - </exec>
1.68 - </target>
1.69 -
1.70 - Notice that the overridden target depends on the jar target and not only on
1.71 - the compile target as the regular run target does. Again, for a list of available
1.72 - properties which you can use, check the target you are overriding in the
1.73 - nbproject/build-impl.xml file.
1.74 -
1.75 - -->
1.76 -</project>
2.1 --- a/java/jdbc-dk-driver/conf/META-INF/services/java.sql.Driver Mon Mar 04 20:15:24 2019 +0100
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,1 +0,0 @@
2.4 -info.globalcode.sql.dk.jdbc.Driver
3.1 --- a/java/jdbc-dk-driver/libs/sql-dk Mon Mar 04 20:15:24 2019 +0100
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,1 +0,0 @@
3.4 -../../sql-dk/src
3.5 \ No newline at end of file
4.1 --- a/java/jdbc-dk-driver/nbproject/build-impl.xml Mon Mar 04 20:15:24 2019 +0100
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,1438 +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:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="jdbc-dk-driver-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 depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
4.60 - <property name="platform.java" value="${java.home}/bin/java"/>
4.61 - <available file="${manifest.file}" property="manifest.available"/>
4.62 - <condition property="splashscreen.available">
4.63 - <and>
4.64 - <not>
4.65 - <equals arg1="${application.splash}" arg2="" trim="true"/>
4.66 - </not>
4.67 - <available file="${application.splash}"/>
4.68 - </and>
4.69 - </condition>
4.70 - <condition property="main.class.available">
4.71 - <and>
4.72 - <isset property="main.class"/>
4.73 - <not>
4.74 - <equals arg1="${main.class}" arg2="" trim="true"/>
4.75 - </not>
4.76 - </and>
4.77 - </condition>
4.78 - <condition property="profile.available">
4.79 - <and>
4.80 - <isset property="javac.profile"/>
4.81 - <length length="0" string="${javac.profile}" when="greater"/>
4.82 - <matches pattern="((1\.[89])|9)(\..*)?" string="${javac.source}"/>
4.83 - </and>
4.84 - </condition>
4.85 - <condition property="do.archive">
4.86 - <or>
4.87 - <not>
4.88 - <istrue value="${jar.archive.disabled}"/>
4.89 - </not>
4.90 - <istrue value="${not.archive.disabled}"/>
4.91 - </or>
4.92 - </condition>
4.93 - <condition property="do.mkdist">
4.94 - <and>
4.95 - <isset property="do.archive"/>
4.96 - <isset property="libs.CopyLibs.classpath"/>
4.97 - <not>
4.98 - <istrue value="${mkdist.disabled}"/>
4.99 - </not>
4.100 - </and>
4.101 - </condition>
4.102 - <condition property="do.archive+manifest.available">
4.103 - <and>
4.104 - <isset property="manifest.available"/>
4.105 - <istrue value="${do.archive}"/>
4.106 - </and>
4.107 - </condition>
4.108 - <condition property="do.archive+main.class.available">
4.109 - <and>
4.110 - <isset property="main.class.available"/>
4.111 - <istrue value="${do.archive}"/>
4.112 - </and>
4.113 - </condition>
4.114 - <condition property="do.archive+splashscreen.available">
4.115 - <and>
4.116 - <isset property="splashscreen.available"/>
4.117 - <istrue value="${do.archive}"/>
4.118 - </and>
4.119 - </condition>
4.120 - <condition property="do.archive+profile.available">
4.121 - <and>
4.122 - <isset property="profile.available"/>
4.123 - <istrue value="${do.archive}"/>
4.124 - </and>
4.125 - </condition>
4.126 - <condition property="have.tests">
4.127 - <or>
4.128 - <available file="${test.src.dir}"/>
4.129 - </or>
4.130 - </condition>
4.131 - <condition property="have.sources">
4.132 - <or>
4.133 - <available file="${src.conf.dir}"/>
4.134 - <available file="${src.dir}"/>
4.135 - <available file="${src.sql-dk.dir}"/>
4.136 - </or>
4.137 - </condition>
4.138 - <condition property="netbeans.home+have.tests">
4.139 - <and>
4.140 - <isset property="netbeans.home"/>
4.141 - <isset property="have.tests"/>
4.142 - </and>
4.143 - </condition>
4.144 - <condition property="no.javadoc.preview">
4.145 - <and>
4.146 - <isset property="javadoc.preview"/>
4.147 - <isfalse value="${javadoc.preview}"/>
4.148 - </and>
4.149 - </condition>
4.150 - <property name="run.jvmargs" value=""/>
4.151 - <property name="run.jvmargs.ide" value=""/>
4.152 - <property name="javac.compilerargs" value=""/>
4.153 - <property name="work.dir" value="${basedir}"/>
4.154 - <condition property="no.deps">
4.155 - <and>
4.156 - <istrue value="${no.dependencies}"/>
4.157 - </and>
4.158 - </condition>
4.159 - <property name="javac.debug" value="true"/>
4.160 - <property name="javadoc.preview" value="true"/>
4.161 - <property name="application.args" value=""/>
4.162 - <property name="source.encoding" value="${file.encoding}"/>
4.163 - <property name="runtime.encoding" value="${source.encoding}"/>
4.164 - <property name="manifest.encoding" value="${source.encoding}"/>
4.165 - <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
4.166 - <and>
4.167 - <isset property="javadoc.encoding"/>
4.168 - <not>
4.169 - <equals arg1="${javadoc.encoding}" arg2=""/>
4.170 - </not>
4.171 - </and>
4.172 - </condition>
4.173 - <property name="javadoc.encoding.used" value="${source.encoding}"/>
4.174 - <property name="includes" value="**"/>
4.175 - <property name="excludes" value=""/>
4.176 - <property name="do.depend" value="false"/>
4.177 - <condition property="do.depend.true">
4.178 - <istrue value="${do.depend}"/>
4.179 - </condition>
4.180 - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
4.181 - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
4.182 - <and>
4.183 - <isset property="endorsed.classpath"/>
4.184 - <not>
4.185 - <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
4.186 - </not>
4.187 - </and>
4.188 - </condition>
4.189 - <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
4.190 - <isset property="profile.available"/>
4.191 - </condition>
4.192 - <condition else="false" property="jdkBug6558476">
4.193 - <and>
4.194 - <matches pattern="1\.[56]" string="${java.specification.version}"/>
4.195 - <not>
4.196 - <os family="unix"/>
4.197 - </not>
4.198 - </and>
4.199 - </condition>
4.200 - <condition else="false" property="javac.fork">
4.201 - <or>
4.202 - <istrue value="${jdkBug6558476}"/>
4.203 - <istrue value="${javac.external.vm}"/>
4.204 - </or>
4.205 - </condition>
4.206 - <property name="jar.index" value="false"/>
4.207 - <property name="jar.index.metainf" value="${jar.index}"/>
4.208 - <property name="copylibs.rebase" value="true"/>
4.209 - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
4.210 - <condition property="junit.available">
4.211 - <or>
4.212 - <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
4.213 - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
4.214 - </or>
4.215 - </condition>
4.216 - <condition property="testng.available">
4.217 - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
4.218 - </condition>
4.219 - <condition property="junit+testng.available">
4.220 - <and>
4.221 - <istrue value="${junit.available}"/>
4.222 - <istrue value="${testng.available}"/>
4.223 - </and>
4.224 - </condition>
4.225 - <condition else="testng" property="testng.mode" value="mixed">
4.226 - <istrue value="${junit+testng.available}"/>
4.227 - </condition>
4.228 - <condition else="" property="testng.debug.mode" value="-mixed">
4.229 - <istrue value="${junit+testng.available}"/>
4.230 - </condition>
4.231 - <property name="java.failonerror" value="true"/>
4.232 - </target>
4.233 - <target name="-post-init">
4.234 - <!-- Empty placeholder for easier customization. -->
4.235 - <!-- You can override this target in the ../build.xml file. -->
4.236 - </target>
4.237 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
4.238 - <fail unless="src.conf.dir">Must set src.conf.dir</fail>
4.239 - <fail unless="src.dir">Must set src.dir</fail>
4.240 - <fail unless="src.sql-dk.dir">Must set src.sql-dk.dir</fail>
4.241 - <fail unless="test.src.dir">Must set test.src.dir</fail>
4.242 - <fail unless="build.dir">Must set build.dir</fail>
4.243 - <fail unless="dist.dir">Must set dist.dir</fail>
4.244 - <fail unless="build.classes.dir">Must set build.classes.dir</fail>
4.245 - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
4.246 - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
4.247 - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
4.248 - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
4.249 - <fail unless="dist.jar">Must set dist.jar</fail>
4.250 - </target>
4.251 - <target name="-init-macrodef-property">
4.252 - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
4.253 - <attribute name="name"/>
4.254 - <attribute name="value"/>
4.255 - <sequential>
4.256 - <property name="@{name}" value="${@{value}}"/>
4.257 - </sequential>
4.258 - </macrodef>
4.259 - </target>
4.260 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
4.261 - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
4.262 - <attribute default="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}" name="srcdir"/>
4.263 - <attribute default="${build.classes.dir}" name="destdir"/>
4.264 - <attribute default="${javac.classpath}" name="classpath"/>
4.265 - <attribute default="${javac.processorpath}" name="processorpath"/>
4.266 - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
4.267 - <attribute default="${includes}" name="includes"/>
4.268 - <attribute default="${excludes}" name="excludes"/>
4.269 - <attribute default="${javac.debug}" name="debug"/>
4.270 - <attribute default="${empty.dir}" name="sourcepath"/>
4.271 - <attribute default="${empty.dir}" name="gensrcdir"/>
4.272 - <element name="customize" optional="true"/>
4.273 - <sequential>
4.274 - <property location="${build.dir}/empty" name="empty.dir"/>
4.275 - <mkdir dir="${empty.dir}"/>
4.276 - <mkdir dir="@{apgeneratedsrcdir}"/>
4.277 - <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.278 - <src>
4.279 - <dirset dir="@{gensrcdir}" erroronmissingdir="false">
4.280 - <include name="*"/>
4.281 - </dirset>
4.282 - </src>
4.283 - <classpath>
4.284 - <path path="@{classpath}"/>
4.285 - </classpath>
4.286 - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
4.287 - <compilerarg line="${javac.profile.cmd.line.arg}"/>
4.288 - <compilerarg line="${javac.compilerargs}"/>
4.289 - <compilerarg value="-processorpath"/>
4.290 - <compilerarg path="@{processorpath}:${empty.dir}"/>
4.291 - <compilerarg line="${ap.processors.internal}"/>
4.292 - <compilerarg line="${annotation.processing.processor.options}"/>
4.293 - <compilerarg value="-s"/>
4.294 - <compilerarg path="@{apgeneratedsrcdir}"/>
4.295 - <compilerarg line="${ap.proc.none.internal}"/>
4.296 - <customize/>
4.297 - </javac>
4.298 - </sequential>
4.299 - </macrodef>
4.300 - </target>
4.301 - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
4.302 - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
4.303 - <attribute default="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}" name="srcdir"/>
4.304 - <attribute default="${build.classes.dir}" name="destdir"/>
4.305 - <attribute default="${javac.classpath}" name="classpath"/>
4.306 - <attribute default="${javac.processorpath}" name="processorpath"/>
4.307 - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
4.308 - <attribute default="${includes}" name="includes"/>
4.309 - <attribute default="${excludes}" name="excludes"/>
4.310 - <attribute default="${javac.debug}" name="debug"/>
4.311 - <attribute default="${empty.dir}" name="sourcepath"/>
4.312 - <attribute default="${empty.dir}" name="gensrcdir"/>
4.313 - <element name="customize" optional="true"/>
4.314 - <sequential>
4.315 - <property location="${build.dir}/empty" name="empty.dir"/>
4.316 - <mkdir dir="${empty.dir}"/>
4.317 - <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.318 - <src>
4.319 - <dirset dir="@{gensrcdir}" erroronmissingdir="false">
4.320 - <include name="*"/>
4.321 - </dirset>
4.322 - </src>
4.323 - <classpath>
4.324 - <path path="@{classpath}"/>
4.325 - </classpath>
4.326 - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
4.327 - <compilerarg line="${javac.profile.cmd.line.arg}"/>
4.328 - <compilerarg line="${javac.compilerargs}"/>
4.329 - <customize/>
4.330 - </javac>
4.331 - </sequential>
4.332 - </macrodef>
4.333 - </target>
4.334 - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
4.335 - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
4.336 - <attribute default="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}" name="srcdir"/>
4.337 - <attribute default="${build.classes.dir}" name="destdir"/>
4.338 - <attribute default="${javac.classpath}" name="classpath"/>
4.339 - <sequential>
4.340 - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
4.341 - <classpath>
4.342 - <path path="@{classpath}"/>
4.343 - </classpath>
4.344 - </depend>
4.345 - </sequential>
4.346 - </macrodef>
4.347 - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
4.348 - <attribute default="${build.classes.dir}" name="destdir"/>
4.349 - <sequential>
4.350 - <fail unless="javac.includes">Must set javac.includes</fail>
4.351 - <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
4.352 - <path>
4.353 - <filelist dir="@{destdir}" files="${javac.includes}"/>
4.354 - </path>
4.355 - <globmapper from="*.java" to="*.class"/>
4.356 - </pathconvert>
4.357 - <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
4.358 - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
4.359 - <delete>
4.360 - <files includesfile="${javac.includesfile.binary}"/>
4.361 - </delete>
4.362 - <delete>
4.363 - <fileset file="${javac.includesfile.binary}"/>
4.364 - </delete>
4.365 - </sequential>
4.366 - </macrodef>
4.367 - </target>
4.368 - <target if="${junit.available}" name="-init-macrodef-junit-init">
4.369 - <condition else="false" property="nb.junit.batch" value="true">
4.370 - <and>
4.371 - <istrue value="${junit.available}"/>
4.372 - <not>
4.373 - <isset property="test.method"/>
4.374 - </not>
4.375 - </and>
4.376 - </condition>
4.377 - <condition else="false" property="nb.junit.single" value="true">
4.378 - <and>
4.379 - <istrue value="${junit.available}"/>
4.380 - <isset property="test.method"/>
4.381 - </and>
4.382 - </condition>
4.383 - </target>
4.384 - <target name="-init-test-properties">
4.385 - <property name="test.binaryincludes" value="<nothing>"/>
4.386 - <property name="test.binarytestincludes" value=""/>
4.387 - <property name="test.binaryexcludes" value=""/>
4.388 - </target>
4.389 - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
4.390 - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
4.391 - <attribute default="${includes}" name="includes"/>
4.392 - <attribute default="${excludes}" name="excludes"/>
4.393 - <attribute default="**" name="testincludes"/>
4.394 - <attribute default="" name="testmethods"/>
4.395 - <element name="customize" optional="true"/>
4.396 - <sequential>
4.397 - <property name="junit.forkmode" value="perTest"/>
4.398 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
4.399 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
4.400 - <syspropertyset>
4.401 - <propertyref prefix="test-sys-prop."/>
4.402 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.403 - </syspropertyset>
4.404 - <formatter type="brief" usefile="false"/>
4.405 - <formatter type="xml"/>
4.406 - <jvmarg value="-ea"/>
4.407 - <customize/>
4.408 - </junit>
4.409 - </sequential>
4.410 - </macrodef>
4.411 - </target>
4.412 - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
4.413 - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
4.414 - <attribute default="${includes}" name="includes"/>
4.415 - <attribute default="${excludes}" name="excludes"/>
4.416 - <attribute default="**" name="testincludes"/>
4.417 - <attribute default="" name="testmethods"/>
4.418 - <element name="customize" optional="true"/>
4.419 - <sequential>
4.420 - <property name="junit.forkmode" value="perTest"/>
4.421 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
4.422 - <batchtest todir="${build.test.results.dir}">
4.423 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
4.424 - <filename name="@{testincludes}"/>
4.425 - </fileset>
4.426 - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
4.427 - <filename name="${test.binarytestincludes}"/>
4.428 - </fileset>
4.429 - </batchtest>
4.430 - <syspropertyset>
4.431 - <propertyref prefix="test-sys-prop."/>
4.432 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.433 - </syspropertyset>
4.434 - <formatter type="brief" usefile="false"/>
4.435 - <formatter type="xml"/>
4.436 - <jvmarg value="-ea"/>
4.437 - <customize/>
4.438 - </junit>
4.439 - </sequential>
4.440 - </macrodef>
4.441 - </target>
4.442 - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
4.443 - <target if="${testng.available}" name="-init-macrodef-testng">
4.444 - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
4.445 - <attribute default="${includes}" name="includes"/>
4.446 - <attribute default="${excludes}" name="excludes"/>
4.447 - <attribute default="**" name="testincludes"/>
4.448 - <attribute default="" name="testmethods"/>
4.449 - <element name="customize" optional="true"/>
4.450 - <sequential>
4.451 - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
4.452 - <isset property="test.method"/>
4.453 - </condition>
4.454 - <union id="test.set">
4.455 - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
4.456 - <filename name="@{testincludes}"/>
4.457 - </fileset>
4.458 - </union>
4.459 - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
4.460 - <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="jdbc-dk-driver" testname="TestNG tests" workingDir="${work.dir}">
4.461 - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
4.462 - <propertyset>
4.463 - <propertyref prefix="test-sys-prop."/>
4.464 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.465 - </propertyset>
4.466 - <customize/>
4.467 - </testng>
4.468 - </sequential>
4.469 - </macrodef>
4.470 - </target>
4.471 - <target name="-init-macrodef-test-impl">
4.472 - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.473 - <attribute default="${includes}" name="includes"/>
4.474 - <attribute default="${excludes}" name="excludes"/>
4.475 - <attribute default="**" name="testincludes"/>
4.476 - <attribute default="" name="testmethods"/>
4.477 - <element implicit="true" name="customize" optional="true"/>
4.478 - <sequential>
4.479 - <echo>No tests executed.</echo>
4.480 - </sequential>
4.481 - </macrodef>
4.482 - </target>
4.483 - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
4.484 - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.485 - <attribute default="${includes}" name="includes"/>
4.486 - <attribute default="${excludes}" name="excludes"/>
4.487 - <attribute default="**" name="testincludes"/>
4.488 - <attribute default="" name="testmethods"/>
4.489 - <element implicit="true" name="customize" optional="true"/>
4.490 - <sequential>
4.491 - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.492 - <customize/>
4.493 - </j2seproject3:junit>
4.494 - </sequential>
4.495 - </macrodef>
4.496 - </target>
4.497 - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
4.498 - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.499 - <attribute default="${includes}" name="includes"/>
4.500 - <attribute default="${excludes}" name="excludes"/>
4.501 - <attribute default="**" name="testincludes"/>
4.502 - <attribute default="" name="testmethods"/>
4.503 - <element implicit="true" name="customize" optional="true"/>
4.504 - <sequential>
4.505 - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.506 - <customize/>
4.507 - </j2seproject3:testng>
4.508 - </sequential>
4.509 - </macrodef>
4.510 - </target>
4.511 - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
4.512 - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
4.513 - <attribute default="${includes}" name="includes"/>
4.514 - <attribute default="${excludes}" name="excludes"/>
4.515 - <attribute default="**" name="testincludes"/>
4.516 - <attribute default="" name="testmethods"/>
4.517 - <sequential>
4.518 - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.519 - <customize>
4.520 - <classpath>
4.521 - <path path="${run.test.classpath}"/>
4.522 - </classpath>
4.523 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.524 - <jvmarg line="${run.jvmargs}"/>
4.525 - <jvmarg line="${run.jvmargs.ide}"/>
4.526 - </customize>
4.527 - </j2seproject3:test-impl>
4.528 - </sequential>
4.529 - </macrodef>
4.530 - </target>
4.531 - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
4.532 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.533 - <attribute default="${includes}" name="includes"/>
4.534 - <attribute default="${excludes}" name="excludes"/>
4.535 - <attribute default="**" name="testincludes"/>
4.536 - <attribute default="" name="testmethods"/>
4.537 - <element name="customize" optional="true"/>
4.538 - <sequential>
4.539 - <property name="junit.forkmode" value="perTest"/>
4.540 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
4.541 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
4.542 - <syspropertyset>
4.543 - <propertyref prefix="test-sys-prop."/>
4.544 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.545 - </syspropertyset>
4.546 - <formatter type="brief" usefile="false"/>
4.547 - <formatter type="xml"/>
4.548 - <jvmarg value="-ea"/>
4.549 - <jvmarg line="${debug-args-line}"/>
4.550 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
4.551 - <customize/>
4.552 - </junit>
4.553 - </sequential>
4.554 - </macrodef>
4.555 - </target>
4.556 - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
4.557 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.558 - <attribute default="${includes}" name="includes"/>
4.559 - <attribute default="${excludes}" name="excludes"/>
4.560 - <attribute default="**" name="testincludes"/>
4.561 - <attribute default="" name="testmethods"/>
4.562 - <element name="customize" optional="true"/>
4.563 - <sequential>
4.564 - <property name="junit.forkmode" value="perTest"/>
4.565 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
4.566 - <batchtest todir="${build.test.results.dir}">
4.567 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
4.568 - <filename name="@{testincludes}"/>
4.569 - </fileset>
4.570 - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
4.571 - <filename name="${test.binarytestincludes}"/>
4.572 - </fileset>
4.573 - </batchtest>
4.574 - <syspropertyset>
4.575 - <propertyref prefix="test-sys-prop."/>
4.576 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.577 - </syspropertyset>
4.578 - <formatter type="brief" usefile="false"/>
4.579 - <formatter type="xml"/>
4.580 - <jvmarg value="-ea"/>
4.581 - <jvmarg line="${debug-args-line}"/>
4.582 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
4.583 - <customize/>
4.584 - </junit>
4.585 - </sequential>
4.586 - </macrodef>
4.587 - </target>
4.588 - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
4.589 - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.590 - <attribute default="${includes}" name="includes"/>
4.591 - <attribute default="${excludes}" name="excludes"/>
4.592 - <attribute default="**" name="testincludes"/>
4.593 - <attribute default="" name="testmethods"/>
4.594 - <element implicit="true" name="customize" optional="true"/>
4.595 - <sequential>
4.596 - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.597 - <customize/>
4.598 - </j2seproject3:junit-debug>
4.599 - </sequential>
4.600 - </macrodef>
4.601 - </target>
4.602 - <target if="${testng.available}" name="-init-macrodef-testng-debug">
4.603 - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.604 - <attribute default="${main.class}" name="testClass"/>
4.605 - <attribute default="" name="testMethod"/>
4.606 - <element name="customize2" optional="true"/>
4.607 - <sequential>
4.608 - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
4.609 - <isset property="test.method"/>
4.610 - </condition>
4.611 - <condition else="-suitename jdbc-dk-driver -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
4.612 - <matches pattern=".*\.xml" string="@{testClass}"/>
4.613 - </condition>
4.614 - <delete dir="${build.test.results.dir}" quiet="true"/>
4.615 - <mkdir dir="${build.test.results.dir}"/>
4.616 - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
4.617 - <customize>
4.618 - <customize2/>
4.619 - <jvmarg value="-ea"/>
4.620 - <arg line="${testng.debug.mode}"/>
4.621 - <arg line="-d ${build.test.results.dir}"/>
4.622 - <arg line="-listener org.testng.reporters.VerboseReporter"/>
4.623 - <arg line="${testng.cmd.args}"/>
4.624 - </customize>
4.625 - </j2seproject3:debug>
4.626 - </sequential>
4.627 - </macrodef>
4.628 - </target>
4.629 - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
4.630 - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.631 - <attribute default="${main.class}" name="testClass"/>
4.632 - <attribute default="" name="testMethod"/>
4.633 - <element implicit="true" name="customize2" optional="true"/>
4.634 - <sequential>
4.635 - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
4.636 - <customize2/>
4.637 - </j2seproject3:testng-debug>
4.638 - </sequential>
4.639 - </macrodef>
4.640 - </target>
4.641 - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
4.642 - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.643 - <attribute default="${includes}" name="includes"/>
4.644 - <attribute default="${excludes}" name="excludes"/>
4.645 - <attribute default="**" name="testincludes"/>
4.646 - <attribute default="" name="testmethods"/>
4.647 - <attribute default="${main.class}" name="testClass"/>
4.648 - <attribute default="" name="testMethod"/>
4.649 - <sequential>
4.650 - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.651 - <customize>
4.652 - <classpath>
4.653 - <path path="${run.test.classpath}"/>
4.654 - </classpath>
4.655 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.656 - <jvmarg line="${run.jvmargs}"/>
4.657 - <jvmarg line="${run.jvmargs.ide}"/>
4.658 - </customize>
4.659 - </j2seproject3:test-debug-impl>
4.660 - </sequential>
4.661 - </macrodef>
4.662 - </target>
4.663 - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
4.664 - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.665 - <attribute default="${includes}" name="includes"/>
4.666 - <attribute default="${excludes}" name="excludes"/>
4.667 - <attribute default="**" name="testincludes"/>
4.668 - <attribute default="" name="testmethods"/>
4.669 - <attribute default="${main.class}" name="testClass"/>
4.670 - <attribute default="" name="testMethod"/>
4.671 - <sequential>
4.672 - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
4.673 - <customize2>
4.674 - <syspropertyset>
4.675 - <propertyref prefix="test-sys-prop."/>
4.676 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.677 - </syspropertyset>
4.678 - </customize2>
4.679 - </j2seproject3:testng-debug-impl>
4.680 - </sequential>
4.681 - </macrodef>
4.682 - </target>
4.683 - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
4.684 - <!--
4.685 - pre NB7.2 profiling section; consider it deprecated
4.686 - -->
4.687 - <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.688 - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
4.689 - <!-- Empty placeholder for easier customization. -->
4.690 - <!-- You can override this target in the ../build.xml file. -->
4.691 - </target>
4.692 - <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
4.693 - <!-- Empty placeholder for easier customization. -->
4.694 - <!-- You can override this target in the ../build.xml file. -->
4.695 - </target>
4.696 - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
4.697 - <macrodef name="resolve">
4.698 - <attribute name="name"/>
4.699 - <attribute name="value"/>
4.700 - <sequential>
4.701 - <property name="@{name}" value="${env.@{value}}"/>
4.702 - </sequential>
4.703 - </macrodef>
4.704 - <macrodef name="profile">
4.705 - <attribute default="${main.class}" name="classname"/>
4.706 - <element name="customize" optional="true"/>
4.707 - <sequential>
4.708 - <property environment="env"/>
4.709 - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
4.710 - <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
4.711 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.712 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
4.713 - <jvmarg line="${profiler.info.jvmargs}"/>
4.714 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
4.715 - <arg line="${application.args}"/>
4.716 - <classpath>
4.717 - <path path="${run.classpath}"/>
4.718 - </classpath>
4.719 - <syspropertyset>
4.720 - <propertyref prefix="run-sys-prop."/>
4.721 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
4.722 - </syspropertyset>
4.723 - <customize/>
4.724 - </java>
4.725 - </sequential>
4.726 - </macrodef>
4.727 - </target>
4.728 - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
4.729 - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
4.730 - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
4.731 - </target>
4.732 - <!--
4.733 - end of pre NB7.2 profiling section
4.734 - -->
4.735 - <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
4.736 - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
4.737 - <attribute default="${main.class}" name="name"/>
4.738 - <attribute default="${debug.classpath}" name="classpath"/>
4.739 - <attribute default="" name="stopclassname"/>
4.740 - <sequential>
4.741 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
4.742 - <classpath>
4.743 - <path path="@{classpath}"/>
4.744 - </classpath>
4.745 - </nbjpdastart>
4.746 - </sequential>
4.747 - </macrodef>
4.748 - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
4.749 - <attribute default="${build.classes.dir}" name="dir"/>
4.750 - <sequential>
4.751 - <nbjpdareload>
4.752 - <fileset dir="@{dir}" includes="${fix.classes}">
4.753 - <include name="${fix.includes}*.class"/>
4.754 - </fileset>
4.755 - </nbjpdareload>
4.756 - </sequential>
4.757 - </macrodef>
4.758 - </target>
4.759 - <target name="-init-debug-args">
4.760 - <property name="version-output" value="java version "${ant.java.version}"/>
4.761 - <condition property="have-jdk-older-than-1.4">
4.762 - <or>
4.763 - <contains string="${version-output}" substring="java version "1.0"/>
4.764 - <contains string="${version-output}" substring="java version "1.1"/>
4.765 - <contains string="${version-output}" substring="java version "1.2"/>
4.766 - <contains string="${version-output}" substring="java version "1.3"/>
4.767 - </or>
4.768 - </condition>
4.769 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
4.770 - <istrue value="${have-jdk-older-than-1.4}"/>
4.771 - </condition>
4.772 - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
4.773 - <os family="windows"/>
4.774 - </condition>
4.775 - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
4.776 - <isset property="debug.transport"/>
4.777 - </condition>
4.778 - </target>
4.779 - <target depends="-init-debug-args" name="-init-macrodef-debug">
4.780 - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.781 - <attribute default="${main.class}" name="classname"/>
4.782 - <attribute default="${debug.classpath}" name="classpath"/>
4.783 - <element name="customize" optional="true"/>
4.784 - <sequential>
4.785 - <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
4.786 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.787 - <jvmarg line="${debug-args-line}"/>
4.788 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
4.789 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
4.790 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
4.791 - <jvmarg line="${run.jvmargs}"/>
4.792 - <jvmarg line="${run.jvmargs.ide}"/>
4.793 - <classpath>
4.794 - <path path="@{classpath}"/>
4.795 - </classpath>
4.796 - <syspropertyset>
4.797 - <propertyref prefix="run-sys-prop."/>
4.798 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
4.799 - </syspropertyset>
4.800 - <customize/>
4.801 - </java>
4.802 - </sequential>
4.803 - </macrodef>
4.804 - </target>
4.805 - <target name="-init-macrodef-java">
4.806 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
4.807 - <attribute default="${main.class}" name="classname"/>
4.808 - <attribute default="${run.classpath}" name="classpath"/>
4.809 - <attribute default="jvm" name="jvm"/>
4.810 - <element name="customize" optional="true"/>
4.811 - <sequential>
4.812 - <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
4.813 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.814 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
4.815 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
4.816 - <jvmarg line="${run.jvmargs}"/>
4.817 - <jvmarg line="${run.jvmargs.ide}"/>
4.818 - <classpath>
4.819 - <path path="@{classpath}"/>
4.820 - </classpath>
4.821 - <syspropertyset>
4.822 - <propertyref prefix="run-sys-prop."/>
4.823 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
4.824 - </syspropertyset>
4.825 - <customize/>
4.826 - </java>
4.827 - </sequential>
4.828 - </macrodef>
4.829 - </target>
4.830 - <target name="-init-macrodef-copylibs">
4.831 - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
4.832 - <attribute default="${manifest.file}" name="manifest"/>
4.833 - <element name="customize" optional="true"/>
4.834 - <sequential>
4.835 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
4.836 - <pathconvert property="run.classpath.without.build.classes.dir">
4.837 - <path path="${run.classpath}"/>
4.838 - <map from="${build.classes.dir.resolved}" to=""/>
4.839 - </pathconvert>
4.840 - <pathconvert pathsep=" " property="jar.classpath">
4.841 - <path path="${run.classpath.without.build.classes.dir}"/>
4.842 - <chainedmapper>
4.843 - <flattenmapper/>
4.844 - <filtermapper>
4.845 - <replacestring from=" " to="%20"/>
4.846 - </filtermapper>
4.847 - <globmapper from="*" to="lib/*"/>
4.848 - </chainedmapper>
4.849 - </pathconvert>
4.850 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
4.851 - <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.852 - <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
4.853 - <manifest>
4.854 - <attribute name="Class-Path" value="${jar.classpath}"/>
4.855 - <customize/>
4.856 - </manifest>
4.857 - </copylibs>
4.858 - </sequential>
4.859 - </macrodef>
4.860 - </target>
4.861 - <target name="-init-presetdef-jar">
4.862 - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
4.863 - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
4.864 - <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
4.865 - </jar>
4.866 - </presetdef>
4.867 - </target>
4.868 - <target name="-init-ap-cmdline-properties">
4.869 - <property name="annotation.processing.enabled" value="true"/>
4.870 - <property name="annotation.processing.processors.list" value=""/>
4.871 - <property name="annotation.processing.processor.options" value=""/>
4.872 - <property name="annotation.processing.run.all.processors" value="true"/>
4.873 - <property name="javac.processorpath" value="${javac.classpath}"/>
4.874 - <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
4.875 - <condition property="ap.supported.internal" value="true">
4.876 - <not>
4.877 - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
4.878 - </not>
4.879 - </condition>
4.880 - </target>
4.881 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
4.882 - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
4.883 - <isfalse value="${annotation.processing.run.all.processors}"/>
4.884 - </condition>
4.885 - <condition else="" property="ap.proc.none.internal" value="-proc:none">
4.886 - <isfalse value="${annotation.processing.enabled}"/>
4.887 - </condition>
4.888 - </target>
4.889 - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
4.890 - <property name="ap.cmd.line.internal" value=""/>
4.891 - </target>
4.892 - <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.893 - <!--
4.894 - ===================
4.895 - COMPILATION SECTION
4.896 - ===================
4.897 - -->
4.898 - <target name="-deps-jar-init" unless="built-jar.properties">
4.899 - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
4.900 - <delete file="${built-jar.properties}" quiet="true"/>
4.901 - </target>
4.902 - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
4.903 - <echo level="warn" message="Cycle detected: jdbc-dk-driver was already built"/>
4.904 - </target>
4.905 - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
4.906 - <mkdir dir="${build.dir}"/>
4.907 - <touch file="${built-jar.properties}" verbose="false"/>
4.908 - <property file="${built-jar.properties}" prefix="already.built.jar."/>
4.909 - <antcall target="-warn-already-built-jar"/>
4.910 - <propertyfile file="${built-jar.properties}">
4.911 - <entry key="${basedir}" value=""/>
4.912 - </propertyfile>
4.913 - </target>
4.914 - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
4.915 - <target depends="init" name="-check-automatic-build">
4.916 - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
4.917 - </target>
4.918 - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
4.919 - <antcall target="clean"/>
4.920 - </target>
4.921 - <target depends="init,deps-jar" name="-pre-pre-compile">
4.922 - <mkdir dir="${build.classes.dir}"/>
4.923 - </target>
4.924 - <target name="-pre-compile">
4.925 - <!-- Empty placeholder for easier customization. -->
4.926 - <!-- You can override this target in the ../build.xml file. -->
4.927 - </target>
4.928 - <target if="do.depend.true" name="-compile-depend">
4.929 - <pathconvert property="build.generated.subdirs">
4.930 - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
4.931 - <include name="*"/>
4.932 - </dirset>
4.933 - </pathconvert>
4.934 - <j2seproject3:depend srcdir="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}:${build.generated.subdirs}"/>
4.935 - </target>
4.936 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
4.937 - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
4.938 - <copy todir="${build.classes.dir}">
4.939 - <fileset dir="${src.conf.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
4.940 - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
4.941 - <fileset dir="${src.sql-dk.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
4.942 - </copy>
4.943 - </target>
4.944 - <target if="has.persistence.xml" name="-copy-persistence-xml">
4.945 - <mkdir dir="${build.classes.dir}/META-INF"/>
4.946 - <copy todir="${build.classes.dir}/META-INF">
4.947 - <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
4.948 - </copy>
4.949 - </target>
4.950 - <target name="-post-compile">
4.951 - <!-- Empty placeholder for easier customization. -->
4.952 - <!-- You can override this target in the ../build.xml file. -->
4.953 - </target>
4.954 - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
4.955 - <target name="-pre-compile-single">
4.956 - <!-- Empty placeholder for easier customization. -->
4.957 - <!-- You can override this target in the ../build.xml file. -->
4.958 - </target>
4.959 - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
4.960 - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
4.961 - <j2seproject3:force-recompile/>
4.962 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}"/>
4.963 - </target>
4.964 - <target name="-post-compile-single">
4.965 - <!-- Empty placeholder for easier customization. -->
4.966 - <!-- You can override this target in the ../build.xml file. -->
4.967 - </target>
4.968 - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
4.969 - <!--
4.970 - ====================
4.971 - JAR BUILDING SECTION
4.972 - ====================
4.973 - -->
4.974 - <target depends="init" name="-pre-pre-jar">
4.975 - <dirname file="${dist.jar}" property="dist.jar.dir"/>
4.976 - <mkdir dir="${dist.jar.dir}"/>
4.977 - </target>
4.978 - <target name="-pre-jar">
4.979 - <!-- Empty placeholder for easier customization. -->
4.980 - <!-- You can override this target in the ../build.xml file. -->
4.981 - </target>
4.982 - <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
4.983 - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
4.984 - <touch file="${tmp.manifest.file}" verbose="false"/>
4.985 - </target>
4.986 - <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
4.987 - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
4.988 - <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
4.989 - </target>
4.990 - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
4.991 - <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
4.992 - <attribute name="Main-Class" value="${main.class}"/>
4.993 - </manifest>
4.994 - </target>
4.995 - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
4.996 - <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
4.997 - <attribute name="Profile" value="${javac.profile}"/>
4.998 - </manifest>
4.999 - </target>
4.1000 - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
4.1001 - <basename file="${application.splash}" property="splashscreen.basename"/>
4.1002 - <mkdir dir="${build.classes.dir}/META-INF"/>
4.1003 - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
4.1004 - <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
4.1005 - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
4.1006 - </manifest>
4.1007 - </target>
4.1008 - <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" if="do.mkdist" name="-do-jar-copylibs">
4.1009 - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
4.1010 - <echo level="info">To run this application from the command line without Ant, try:</echo>
4.1011 - <property location="${dist.jar}" name="dist.jar.resolved"/>
4.1012 - <echo level="info">java -jar "${dist.jar.resolved}"</echo>
4.1013 - </target>
4.1014 - <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" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
4.1015 - <j2seproject1:jar manifest="${tmp.manifest.file}"/>
4.1016 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
4.1017 - <property location="${dist.jar}" name="dist.jar.resolved"/>
4.1018 - <pathconvert property="run.classpath.with.dist.jar">
4.1019 - <path path="${run.classpath}"/>
4.1020 - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
4.1021 - </pathconvert>
4.1022 - <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}">
4.1023 - <isset property="main.class.available"/>
4.1024 - </condition>
4.1025 - <condition else="debug" property="jar.usage.level" value="info">
4.1026 - <isset property="main.class.available"/>
4.1027 - </condition>
4.1028 - <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
4.1029 - </target>
4.1030 - <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
4.1031 - <delete>
4.1032 - <fileset file="${tmp.manifest.file}"/>
4.1033 - </delete>
4.1034 - </target>
4.1035 - <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.1036 - <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.1037 - <target name="-post-jar">
4.1038 - <!-- Empty placeholder for easier customization. -->
4.1039 - <!-- You can override this target in the ../build.xml file. -->
4.1040 - </target>
4.1041 - <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
4.1042 - <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
4.1043 - <!--
4.1044 - =================
4.1045 - EXECUTION SECTION
4.1046 - =================
4.1047 - -->
4.1048 - <target depends="init,compile" description="Run a main class." name="run">
4.1049 - <j2seproject1:java>
4.1050 - <customize>
4.1051 - <arg line="${application.args}"/>
4.1052 - </customize>
4.1053 - </j2seproject1:java>
4.1054 - </target>
4.1055 - <target name="-do-not-recompile">
4.1056 - <property name="javac.includes.binary" value=""/>
4.1057 - </target>
4.1058 - <target depends="init,compile-single" name="run-single">
4.1059 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1060 - <j2seproject1:java classname="${run.class}"/>
4.1061 - </target>
4.1062 - <target depends="init,compile-test-single" name="run-test-with-main">
4.1063 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1064 - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
4.1065 - </target>
4.1066 - <!--
4.1067 - =================
4.1068 - DEBUGGING SECTION
4.1069 - =================
4.1070 - -->
4.1071 - <target depends="init" if="netbeans.home" name="-debug-start-debugger">
4.1072 - <j2seproject1:nbjpdastart name="${debug.class}"/>
4.1073 - </target>
4.1074 - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
4.1075 - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
4.1076 - </target>
4.1077 - <target depends="init,compile" name="-debug-start-debuggee">
4.1078 - <j2seproject3:debug>
4.1079 - <customize>
4.1080 - <arg line="${application.args}"/>
4.1081 - </customize>
4.1082 - </j2seproject3:debug>
4.1083 - </target>
4.1084 - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
4.1085 - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
4.1086 - <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
4.1087 - </target>
4.1088 - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
4.1089 - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
4.1090 - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
4.1091 - <j2seproject3:debug classname="${debug.class}"/>
4.1092 - </target>
4.1093 - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
4.1094 - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
4.1095 - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
4.1096 - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
4.1097 - </target>
4.1098 - <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.1099 - <target depends="init" name="-pre-debug-fix">
4.1100 - <fail unless="fix.includes">Must set fix.includes</fail>
4.1101 - <property name="javac.includes" value="${fix.includes}.java"/>
4.1102 - </target>
4.1103 - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
4.1104 - <j2seproject1:nbjpdareload/>
4.1105 - </target>
4.1106 - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
4.1107 - <!--
4.1108 - =================
4.1109 - PROFILING SECTION
4.1110 - =================
4.1111 - -->
4.1112 - <!--
4.1113 - pre NB7.2 profiler integration
4.1114 - -->
4.1115 - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
4.1116 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1117 - <nbprofiledirect>
4.1118 - <classpath>
4.1119 - <path path="${run.classpath}"/>
4.1120 - </classpath>
4.1121 - </nbprofiledirect>
4.1122 - <profile/>
4.1123 - </target>
4.1124 - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
4.1125 - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
4.1126 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1127 - <nbprofiledirect>
4.1128 - <classpath>
4.1129 - <path path="${run.classpath}"/>
4.1130 - </classpath>
4.1131 - </nbprofiledirect>
4.1132 - <profile classname="${profile.class}"/>
4.1133 - </target>
4.1134 - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
4.1135 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1136 - <nbprofiledirect>
4.1137 - <classpath>
4.1138 - <path path="${run.classpath}"/>
4.1139 - </classpath>
4.1140 - </nbprofiledirect>
4.1141 - <profile classname="sun.applet.AppletViewer">
4.1142 - <customize>
4.1143 - <arg value="${applet.url}"/>
4.1144 - </customize>
4.1145 - </profile>
4.1146 - </target>
4.1147 - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
4.1148 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1149 - <nbprofiledirect>
4.1150 - <classpath>
4.1151 - <path path="${run.test.classpath}"/>
4.1152 - </classpath>
4.1153 - </nbprofiledirect>
4.1154 - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
4.1155 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
4.1156 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
4.1157 - <jvmarg line="${profiler.info.jvmargs}"/>
4.1158 - <test name="${profile.class}"/>
4.1159 - <classpath>
4.1160 - <path path="${run.test.classpath}"/>
4.1161 - </classpath>
4.1162 - <syspropertyset>
4.1163 - <propertyref prefix="test-sys-prop."/>
4.1164 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.1165 - </syspropertyset>
4.1166 - <formatter type="brief" usefile="false"/>
4.1167 - <formatter type="xml"/>
4.1168 - </junit>
4.1169 - </target>
4.1170 - <!--
4.1171 - end of pre NB72 profiling section
4.1172 - -->
4.1173 - <target if="netbeans.home" name="-profile-check">
4.1174 - <condition property="profiler.configured">
4.1175 - <or>
4.1176 - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
4.1177 - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
4.1178 - </or>
4.1179 - </condition>
4.1180 - </target>
4.1181 - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
4.1182 - <startprofiler/>
4.1183 - <antcall target="run"/>
4.1184 - </target>
4.1185 - <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.1186 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1187 - <startprofiler/>
4.1188 - <antcall target="run-single"/>
4.1189 - </target>
4.1190 - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
4.1191 - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
4.1192 - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
4.1193 - <startprofiler/>
4.1194 - <antcall target="test-single"/>
4.1195 - </target>
4.1196 - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
4.1197 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1198 - <startprofiler/>
4.1199 - <antcall target="run-test-with-main"/>
4.1200 - </target>
4.1201 - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
4.1202 - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
4.1203 - <startprofiler/>
4.1204 - <antcall target="run-applet"/>
4.1205 - </target>
4.1206 - <!--
4.1207 - ===============
4.1208 - JAVADOC SECTION
4.1209 - ===============
4.1210 - -->
4.1211 - <target depends="init" if="have.sources" name="-javadoc-build">
4.1212 - <mkdir dir="${dist.javadoc.dir}"/>
4.1213 - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
4.1214 - <and>
4.1215 - <isset property="endorsed.classpath.cmd.line.arg"/>
4.1216 - <not>
4.1217 - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
4.1218 - </not>
4.1219 - </and>
4.1220 - </condition>
4.1221 - <condition else="" property="bug5101868workaround" value="*.java">
4.1222 - <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
4.1223 - </condition>
4.1224 - <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.1225 - <classpath>
4.1226 - <path path="${javac.classpath}"/>
4.1227 - </classpath>
4.1228 - <fileset dir="${src.conf.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
4.1229 - <filename name="**/*.java"/>
4.1230 - </fileset>
4.1231 - <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
4.1232 - <filename name="**/*.java"/>
4.1233 - </fileset>
4.1234 - <fileset dir="${src.sql-dk.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
4.1235 - <filename name="**/*.java"/>
4.1236 - </fileset>
4.1237 - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
4.1238 - <include name="**/*.java"/>
4.1239 - <exclude name="*.java"/>
4.1240 - </fileset>
4.1241 - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
4.1242 - </javadoc>
4.1243 - <copy todir="${dist.javadoc.dir}">
4.1244 - <fileset dir="${src.conf.dir}" excludes="${excludes}" includes="${includes}">
4.1245 - <filename name="**/doc-files/**"/>
4.1246 - </fileset>
4.1247 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
4.1248 - <filename name="**/doc-files/**"/>
4.1249 - </fileset>
4.1250 - <fileset dir="${src.sql-dk.dir}" excludes="${excludes}" includes="${includes}">
4.1251 - <filename name="**/doc-files/**"/>
4.1252 - </fileset>
4.1253 - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
4.1254 - <include name="**/doc-files/**"/>
4.1255 - </fileset>
4.1256 - </copy>
4.1257 - </target>
4.1258 - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
4.1259 - <nbbrowse file="${dist.javadoc.dir}/index.html"/>
4.1260 - </target>
4.1261 - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
4.1262 - <!--
4.1263 - =========================
4.1264 - TEST COMPILATION SECTION
4.1265 - =========================
4.1266 - -->
4.1267 - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
4.1268 - <mkdir dir="${build.test.classes.dir}"/>
4.1269 - </target>
4.1270 - <target name="-pre-compile-test">
4.1271 - <!-- Empty placeholder for easier customization. -->
4.1272 - <!-- You can override this target in the ../build.xml file. -->
4.1273 - </target>
4.1274 - <target if="do.depend.true" name="-compile-test-depend">
4.1275 - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
4.1276 - </target>
4.1277 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
4.1278 - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
4.1279 - <copy todir="${build.test.classes.dir}">
4.1280 - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
4.1281 - </copy>
4.1282 - </target>
4.1283 - <target name="-post-compile-test">
4.1284 - <!-- Empty placeholder for easier customization. -->
4.1285 - <!-- You can override this target in the ../build.xml file. -->
4.1286 - </target>
4.1287 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
4.1288 - <target name="-pre-compile-test-single">
4.1289 - <!-- Empty placeholder for easier customization. -->
4.1290 - <!-- You can override this target in the ../build.xml file. -->
4.1291 - </target>
4.1292 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
4.1293 - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
4.1294 - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
4.1295 - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
4.1296 - <copy todir="${build.test.classes.dir}">
4.1297 - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
4.1298 - </copy>
4.1299 - </target>
4.1300 - <target name="-post-compile-test-single">
4.1301 - <!-- Empty placeholder for easier customization. -->
4.1302 - <!-- You can override this target in the ../build.xml file. -->
4.1303 - </target>
4.1304 - <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.1305 - <!--
4.1306 - =======================
4.1307 - TEST EXECUTION SECTION
4.1308 - =======================
4.1309 - -->
4.1310 - <target depends="init" if="have.tests" name="-pre-test-run">
4.1311 - <mkdir dir="${build.test.results.dir}"/>
4.1312 - </target>
4.1313 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
4.1314 - <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
4.1315 - </target>
4.1316 - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
4.1317 - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
4.1318 - </target>
4.1319 - <target depends="init" if="have.tests" name="test-report"/>
4.1320 - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
4.1321 - <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.1322 - <target depends="init" if="have.tests" name="-pre-test-run-single">
4.1323 - <mkdir dir="${build.test.results.dir}"/>
4.1324 - </target>
4.1325 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
4.1326 - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
4.1327 - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
4.1328 - </target>
4.1329 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
4.1330 - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
4.1331 - </target>
4.1332 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
4.1333 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
4.1334 - <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
4.1335 - <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
4.1336 - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
4.1337 - </target>
4.1338 - <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.1339 - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
4.1340 - </target>
4.1341 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
4.1342 - <!--
4.1343 - =======================
4.1344 - TEST DEBUGGING SECTION
4.1345 - =======================
4.1346 - -->
4.1347 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
4.1348 - <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
4.1349 - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
4.1350 - </target>
4.1351 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
4.1352 - <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
4.1353 - <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
4.1354 - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
4.1355 - </target>
4.1356 - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
4.1357 - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
4.1358 - </target>
4.1359 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
4.1360 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
4.1361 - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
4.1362 - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
4.1363 - </target>
4.1364 - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
4.1365 - <!--
4.1366 - =========================
4.1367 - APPLET EXECUTION SECTION
4.1368 - =========================
4.1369 - -->
4.1370 - <target depends="init,compile-single" name="run-applet">
4.1371 - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
4.1372 - <j2seproject1:java classname="sun.applet.AppletViewer">
4.1373 - <customize>
4.1374 - <arg value="${applet.url}"/>
4.1375 - </customize>
4.1376 - </j2seproject1:java>
4.1377 - </target>
4.1378 - <!--
4.1379 - =========================
4.1380 - APPLET DEBUGGING SECTION
4.1381 - =========================
4.1382 - -->
4.1383 - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
4.1384 - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
4.1385 - <j2seproject3:debug classname="sun.applet.AppletViewer">
4.1386 - <customize>
4.1387 - <arg value="${applet.url}"/>
4.1388 - </customize>
4.1389 - </j2seproject3:debug>
4.1390 - </target>
4.1391 - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
4.1392 - <!--
4.1393 - ===============
4.1394 - CLEANUP SECTION
4.1395 - ===============
4.1396 - -->
4.1397 - <target name="-deps-clean-init" unless="built-clean.properties">
4.1398 - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
4.1399 - <delete file="${built-clean.properties}" quiet="true"/>
4.1400 - </target>
4.1401 - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
4.1402 - <echo level="warn" message="Cycle detected: jdbc-dk-driver was already built"/>
4.1403 - </target>
4.1404 - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
4.1405 - <mkdir dir="${build.dir}"/>
4.1406 - <touch file="${built-clean.properties}" verbose="false"/>
4.1407 - <property file="${built-clean.properties}" prefix="already.built.clean."/>
4.1408 - <antcall target="-warn-already-built-clean"/>
4.1409 - <propertyfile file="${built-clean.properties}">
4.1410 - <entry key="${basedir}" value=""/>
4.1411 - </propertyfile>
4.1412 - </target>
4.1413 - <target depends="init" name="-do-clean">
4.1414 - <delete dir="${build.dir}"/>
4.1415 - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
4.1416 - </target>
4.1417 - <target name="-post-clean">
4.1418 - <!-- Empty placeholder for easier customization. -->
4.1419 - <!-- You can override this target in the ../build.xml file. -->
4.1420 - </target>
4.1421 - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
4.1422 - <target name="-check-call-dep">
4.1423 - <property file="${call.built.properties}" prefix="already.built."/>
4.1424 - <condition property="should.call.dep">
4.1425 - <and>
4.1426 - <not>
4.1427 - <isset property="already.built.${call.subproject}"/>
4.1428 - </not>
4.1429 - <available file="${call.script}"/>
4.1430 - </and>
4.1431 - </condition>
4.1432 - </target>
4.1433 - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
4.1434 - <ant antfile="${call.script}" inheritall="false" target="${call.target}">
4.1435 - <propertyset>
4.1436 - <propertyref prefix="transfer."/>
4.1437 - <mapper from="transfer.*" to="*" type="glob"/>
4.1438 - </propertyset>
4.1439 - </ant>
4.1440 - </target>
4.1441 -</project>
5.1 --- a/java/jdbc-dk-driver/nbproject/genfiles.properties Mon Mar 04 20:15:24 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=50d83c90
5.5 -build.xml.script.CRC32=3b53b17c
5.6 -build.xml.stylesheet.CRC32=8064a381@1.75.2.48
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=50d83c90
5.10 -nbproject/build-impl.xml.script.CRC32=71784fcc
5.11 -nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48
6.1 --- a/java/jdbc-dk-driver/nbproject/project.properties Mon Mar 04 20:15:24 2019 +0100
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,75 +0,0 @@
6.4 -annotation.processing.enabled=true
6.5 -annotation.processing.enabled.in.editor=false
6.6 -annotation.processing.processors.list=
6.7 -annotation.processing.run.all.processors=true
6.8 -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
6.9 -application.title=jdbc-dk-driver
6.10 -application.vendor=fiki
6.11 -build.classes.dir=${build.dir}/classes
6.12 -build.classes.excludes=**/*.java,**/*.form
6.13 -# This directory is removed when the project is cleaned:
6.14 -build.dir=build
6.15 -build.generated.dir=${build.dir}/generated
6.16 -build.generated.sources.dir=${build.dir}/generated-sources
6.17 -# Only compile against the classpath explicitly listed here:
6.18 -build.sysclasspath=ignore
6.19 -build.test.classes.dir=${build.dir}/test/classes
6.20 -build.test.results.dir=${build.dir}/test/results
6.21 -# Uncomment to specify the preferred debugger connection transport:
6.22 -#debug.transport=dt_socket
6.23 -debug.classpath=\
6.24 - ${run.classpath}
6.25 -debug.test.classpath=\
6.26 - ${run.test.classpath}
6.27 -# Files in build.classes.dir which should be excluded from distribution jar
6.28 -dist.archive.excludes=
6.29 -# This directory is removed when the project is cleaned:
6.30 -dist.dir=dist
6.31 -dist.jar=${dist.dir}/jdbc-dk-driver.jar
6.32 -dist.javadoc.dir=${dist.dir}/javadoc
6.33 -endorsed.classpath=
6.34 -excludes=
6.35 -includes=**
6.36 -jar.compress=false
6.37 -javac.classpath=
6.38 -# Space-separated list of extra javac options
6.39 -javac.compilerargs=
6.40 -javac.deprecation=false
6.41 -javac.processorpath=\
6.42 - ${javac.classpath}
6.43 -javac.source=1.8
6.44 -javac.target=1.8
6.45 -javac.test.classpath=\
6.46 - ${javac.classpath}:\
6.47 - ${build.classes.dir}
6.48 -javac.test.processorpath=\
6.49 - ${javac.test.classpath}
6.50 -javadoc.additionalparam=
6.51 -javadoc.author=false
6.52 -javadoc.encoding=${source.encoding}
6.53 -javadoc.noindex=false
6.54 -javadoc.nonavbar=false
6.55 -javadoc.notree=false
6.56 -javadoc.private=false
6.57 -javadoc.splitindex=true
6.58 -javadoc.use=true
6.59 -javadoc.version=false
6.60 -javadoc.windowtitle=
6.61 -meta.inf.dir=${src.dir}/META-INF
6.62 -mkdist.disabled=true
6.63 -platform.active=default_platform
6.64 -run.classpath=\
6.65 - ${javac.classpath}:\
6.66 - ${build.classes.dir}
6.67 -# Space-separated list of JVM arguments used when running the project.
6.68 -# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
6.69 -# To set system properties for unit tests define test-sys-prop.name=value:
6.70 -run.jvmargs=
6.71 -run.test.classpath=\
6.72 - ${javac.test.classpath}:\
6.73 - ${build.test.classes.dir}
6.74 -source.encoding=UTF-8
6.75 -src.conf.dir=conf
6.76 -src.dir=src
6.77 -src.sql-dk.dir=libs/sql-dk
6.78 -test.src.dir=test
7.1 --- a/java/jdbc-dk-driver/nbproject/project.xml Mon Mar 04 20:15:24 2019 +0100
7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
7.3 @@ -1,17 +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>jdbc-dk-driver</name>
7.10 - <source-roots>
7.11 - <root id="src.conf.dir" name="Config"/>
7.12 - <root id="src.dir"/>
7.13 - <root id="src.sql-dk.dir"/>
7.14 - </source-roots>
7.15 - <test-roots>
7.16 - <root id="test.src.dir"/>
7.17 - </test-roots>
7.18 - </data>
7.19 - </configuration>
7.20 -</project>
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/java/jdbc-dk-driver/pom.xml Mon Mar 04 22:02:52 2019 +0100
8.3 @@ -0,0 +1,21 @@
8.4 +<?xml version="1.0" encoding="UTF-8"?>
8.5 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
8.6 + <modelVersion>4.0.0</modelVersion>
8.7 + <groupId>info.globalcode.sql.dk</groupId>
8.8 + <artifactId>jdbc-dk-driver</artifactId>
8.9 + <version>0.10-SNAPSHOT</version>
8.10 + <packaging>jar</packaging>
8.11 + <dependencies>
8.12 + <dependency>
8.13 + <groupId>info.globalcode.sql.dk</groupId>
8.14 + <artifactId>sql-dk</artifactId>
8.15 + <version>${project.version}</version>
8.16 + <type>jar</type>
8.17 + </dependency>
8.18 + </dependencies>
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 + </properties>
8.24 +</project>
9.1 --- a/java/jdbc-dk-driver/src/info/globalcode/sql/dk/jdbc/Driver.java Mon Mar 04 20:15:24 2019 +0100
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,157 +0,0 @@
9.4 -/**
9.5 - * SQL-DK
9.6 - * Copyright © 2015 František Kučera (frantovo.cz)
9.7 - *
9.8 - * This program is free software: you can redistribute it and/or modify
9.9 - * it under the terms of the GNU General Public License as published by
9.10 - * the Free Software Foundation, either version 3 of the License, or
9.11 - * (at your option) any later version.
9.12 - *
9.13 - * This program is distributed in the hope that it will be useful,
9.14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
9.15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9.16 - * GNU General Public License for more details.
9.17 - *
9.18 - * You should have received a copy of the GNU General Public License
9.19 - * along with this program. If not, see <http://www.gnu.org/licenses/>.
9.20 - */
9.21 -package info.globalcode.sql.dk.jdbc;
9.22 -
9.23 -import info.globalcode.sql.dk.Constants;
9.24 -import info.globalcode.sql.dk.configuration.Configuration;
9.25 -import info.globalcode.sql.dk.configuration.ConfigurationException;
9.26 -import info.globalcode.sql.dk.configuration.DatabaseDefinition;
9.27 -import info.globalcode.sql.dk.configuration.Loader;
9.28 -import info.globalcode.sql.dk.configuration.Properties;
9.29 -import info.globalcode.sql.dk.configuration.Property;
9.30 -import java.sql.Connection;
9.31 -import java.sql.DriverManager;
9.32 -import java.sql.DriverPropertyInfo;
9.33 -import java.sql.SQLException;
9.34 -import java.sql.SQLFeatureNotSupportedException;
9.35 -import java.util.logging.Level;
9.36 -import java.util.logging.Logger;
9.37 -
9.38 -/**
9.39 - * <p>
9.40 - * Meta JDBC driver that works as redirector/router. It loads SQL-DK's configuration file and
9.41 - * instantiates a real JDBC connection (PostgreSQL, MariDB etc.) of given name.
9.42 - * </p>
9.43 - *
9.44 - * <p>
9.45 - * Raison d'être: user can define his/her database connections just once (in SQL-DK's configuration)
9.46 - * and use them in many other programs – there is no need to define the connection (hostname,
9.47 - * username, password, properties…) in each application again and again. User will simply connect to
9.48 - * e.g. <code>jdbc:sql-dk://my-connection</code> and this driver reads parameters of
9.49 - * <code>my-connection</code> from SQL-DK's configuration and returns real driver implementation.
9.50 - * </p>
9.51 - *
9.52 - * <p>
9.53 - * Of course, the real JDBC driver for given database is still needed on the class path.
9.54 - * </p>
9.55 - *
9.56 - * <p>
9.57 - * TODO: current version is quite heavy-weight, because it includes whole SQL-DK source tree. Some
9.58 - * refactoring and separation is desired to provide more light-weight JDBC driver. However the
9.59 - * public interface and behavior of this driver should remain unchanged.
9.60 - * </p>
9.61 - *
9.62 - * @author Ing. František Kučera (frantovo.cz)
9.63 - */
9.64 -public class Driver implements java.sql.Driver {
9.65 -
9.66 - private static final Logger log = Logger.getLogger(Driver.class.getName());
9.67 -
9.68 - private final Loader loader = new Loader();
9.69 -
9.70 - static {
9.71 - try {
9.72 - DriverManager.registerDriver(new Driver());
9.73 - } catch (SQLException e) {
9.74 - log.log(Level.SEVERE, "Unable to register JDBC driver", e);
9.75 - }
9.76 - }
9.77 -
9.78 - @Override
9.79 - public Connection connect(String url, java.util.Properties info) throws SQLException {
9.80 - if (acceptsURL(url)) {
9.81 - log.log(Level.FINER, "Loading SQL-DK configuration for URL: {0}", url);
9.82 - String name = extractDatabaseName(url);
9.83 - log.log(Level.FINE, "Loading SQL-DK configuration for name: {0}", name);
9.84 -
9.85 - try {
9.86 - return getConnection(name, info);
9.87 - } catch (ConfigurationException e) {
9.88 - log.log(Level.SEVERE, "Unable to load SQL-DK configuration for name: {0}. Is it defined in {1}?", new Object[]{name, Constants.CONFIG_FILE});
9.89 - throw new SQLException("Unable to load SQL-DK configuration for name: " + name, e);
9.90 - }
9.91 - } else {
9.92 - // The driver should return "null" if it realizes it is the wrong kind of driver to connect to the given URL.
9.93 - return null;
9.94 - }
9.95 - }
9.96 -
9.97 - private Connection getConnection(String connectionName, java.util.Properties info) throws SQLException, ConfigurationException {
9.98 - Configuration c = loader.loadConfiguration();
9.99 - DatabaseDefinition dd = c.getDatabase(connectionName);
9.100 -
9.101 - if (acceptsURL(dd.getUrl())) {
9.102 - log.log(Level.SEVERE, "SQL-DK meta JDBC driver loops to itself: {0} → {1} Please check {2}", new Object[]{connectionName, dd.getUrl(), Constants.CONFIG_FILE});
9.103 - throw new ConfigurationException("SQL-DK meta JDBC driver loops to itself.");
9.104 - } else {
9.105 - return Loader.jdbcConnect(dd, translate(info));
9.106 - }
9.107 - }
9.108 -
9.109 - private String extractDatabaseName(String url) {
9.110 - return url.split("//", 2)[1];
9.111 - }
9.112 -
9.113 - /**
9.114 - * TODO: refactor/move, reuse
9.115 - *
9.116 - * @param info
9.117 - * @return
9.118 - */
9.119 - private Properties translate(java.util.Properties info) {
9.120 - Properties properties = new Properties();
9.121 -
9.122 - for (String name : info.stringPropertyNames()) {
9.123 - String value = info.getProperty(name);
9.124 - properties.add(new Property(name, value));
9.125 - }
9.126 -
9.127 - return properties;
9.128 - }
9.129 -
9.130 - @Override
9.131 - public boolean acceptsURL(String url) throws SQLException {
9.132 - return url != null && url.startsWith("jdbc:sql-dk://");
9.133 - }
9.134 -
9.135 - @Override
9.136 - public DriverPropertyInfo[] getPropertyInfo(String url, java.util.Properties info) throws SQLException {
9.137 - return new DriverPropertyInfo[0];
9.138 - }
9.139 -
9.140 - @Override
9.141 - public int getMajorVersion() {
9.142 - return 0;
9.143 - }
9.144 -
9.145 - @Override
9.146 - public int getMinorVersion() {
9.147 - return 1;
9.148 - }
9.149 -
9.150 - @Override
9.151 - public boolean jdbcCompliant() {
9.152 - return false;
9.153 - }
9.154 -
9.155 - @Override
9.156 - public Logger getParentLogger() throws SQLFeatureNotSupportedException {
9.157 - throw new SQLFeatureNotSupportedException("Not supported yet.");
9.158 - }
9.159 -
9.160 -}
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/java/jdbc-dk-driver/src/main/java/info/globalcode/sql/dk/jdbc/Driver.java Mon Mar 04 22:02:52 2019 +0100
10.3 @@ -0,0 +1,157 @@
10.4 +/**
10.5 + * SQL-DK
10.6 + * Copyright © 2015 František Kučera (frantovo.cz)
10.7 + *
10.8 + * This program is free software: you can redistribute it and/or modify
10.9 + * it under the terms of the GNU General Public License as published by
10.10 + * the Free Software Foundation, either version 3 of the License, or
10.11 + * (at your option) any later version.
10.12 + *
10.13 + * This program is distributed in the hope that it will be useful,
10.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
10.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10.16 + * GNU General Public License for more details.
10.17 + *
10.18 + * You should have received a copy of the GNU General Public License
10.19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
10.20 + */
10.21 +package info.globalcode.sql.dk.jdbc;
10.22 +
10.23 +import info.globalcode.sql.dk.Constants;
10.24 +import info.globalcode.sql.dk.configuration.Configuration;
10.25 +import info.globalcode.sql.dk.configuration.ConfigurationException;
10.26 +import info.globalcode.sql.dk.configuration.DatabaseDefinition;
10.27 +import info.globalcode.sql.dk.configuration.Loader;
10.28 +import info.globalcode.sql.dk.configuration.Properties;
10.29 +import info.globalcode.sql.dk.configuration.Property;
10.30 +import java.sql.Connection;
10.31 +import java.sql.DriverManager;
10.32 +import java.sql.DriverPropertyInfo;
10.33 +import java.sql.SQLException;
10.34 +import java.sql.SQLFeatureNotSupportedException;
10.35 +import java.util.logging.Level;
10.36 +import java.util.logging.Logger;
10.37 +
10.38 +/**
10.39 + * <p>
10.40 + * Meta JDBC driver that works as redirector/router. It loads SQL-DK's configuration file and
10.41 + * instantiates a real JDBC connection (PostgreSQL, MariDB etc.) of given name.
10.42 + * </p>
10.43 + *
10.44 + * <p>
10.45 + * Raison d'être: user can define his/her database connections just once (in SQL-DK's configuration)
10.46 + * and use them in many other programs – there is no need to define the connection (hostname,
10.47 + * username, password, properties…) in each application again and again. User will simply connect to
10.48 + * e.g. <code>jdbc:sql-dk://my-connection</code> and this driver reads parameters of
10.49 + * <code>my-connection</code> from SQL-DK's configuration and returns real driver implementation.
10.50 + * </p>
10.51 + *
10.52 + * <p>
10.53 + * Of course, the real JDBC driver for given database is still needed on the class path.
10.54 + * </p>
10.55 + *
10.56 + * <p>
10.57 + * TODO: current version is quite heavy-weight, because it includes whole SQL-DK source tree. Some
10.58 + * refactoring and separation is desired to provide more light-weight JDBC driver. However the
10.59 + * public interface and behavior of this driver should remain unchanged.
10.60 + * </p>
10.61 + *
10.62 + * @author Ing. František Kučera (frantovo.cz)
10.63 + */
10.64 +public class Driver implements java.sql.Driver {
10.65 +
10.66 + private static final Logger log = Logger.getLogger(Driver.class.getName());
10.67 +
10.68 + private final Loader loader = new Loader();
10.69 +
10.70 + static {
10.71 + try {
10.72 + DriverManager.registerDriver(new Driver());
10.73 + } catch (SQLException e) {
10.74 + log.log(Level.SEVERE, "Unable to register JDBC driver", e);
10.75 + }
10.76 + }
10.77 +
10.78 + @Override
10.79 + public Connection connect(String url, java.util.Properties info) throws SQLException {
10.80 + if (acceptsURL(url)) {
10.81 + log.log(Level.FINER, "Loading SQL-DK configuration for URL: {0}", url);
10.82 + String name = extractDatabaseName(url);
10.83 + log.log(Level.FINE, "Loading SQL-DK configuration for name: {0}", name);
10.84 +
10.85 + try {
10.86 + return getConnection(name, info);
10.87 + } catch (ConfigurationException e) {
10.88 + log.log(Level.SEVERE, "Unable to load SQL-DK configuration for name: {0}. Is it defined in {1}?", new Object[]{name, Constants.CONFIG_FILE});
10.89 + throw new SQLException("Unable to load SQL-DK configuration for name: " + name, e);
10.90 + }
10.91 + } else {
10.92 + // The driver should return "null" if it realizes it is the wrong kind of driver to connect to the given URL.
10.93 + return null;
10.94 + }
10.95 + }
10.96 +
10.97 + private Connection getConnection(String connectionName, java.util.Properties info) throws SQLException, ConfigurationException {
10.98 + Configuration c = loader.loadConfiguration();
10.99 + DatabaseDefinition dd = c.getDatabase(connectionName);
10.100 +
10.101 + if (acceptsURL(dd.getUrl())) {
10.102 + log.log(Level.SEVERE, "SQL-DK meta JDBC driver loops to itself: {0} → {1} Please check {2}", new Object[]{connectionName, dd.getUrl(), Constants.CONFIG_FILE});
10.103 + throw new ConfigurationException("SQL-DK meta JDBC driver loops to itself.");
10.104 + } else {
10.105 + return Loader.jdbcConnect(dd, translate(info));
10.106 + }
10.107 + }
10.108 +
10.109 + private String extractDatabaseName(String url) {
10.110 + return url.split("//", 2)[1];
10.111 + }
10.112 +
10.113 + /**
10.114 + * TODO: refactor/move, reuse
10.115 + *
10.116 + * @param info
10.117 + * @return
10.118 + */
10.119 + private Properties translate(java.util.Properties info) {
10.120 + Properties properties = new Properties();
10.121 +
10.122 + for (String name : info.stringPropertyNames()) {
10.123 + String value = info.getProperty(name);
10.124 + properties.add(new Property(name, value));
10.125 + }
10.126 +
10.127 + return properties;
10.128 + }
10.129 +
10.130 + @Override
10.131 + public boolean acceptsURL(String url) throws SQLException {
10.132 + return url != null && url.startsWith("jdbc:sql-dk://");
10.133 + }
10.134 +
10.135 + @Override
10.136 + public DriverPropertyInfo[] getPropertyInfo(String url, java.util.Properties info) throws SQLException {
10.137 + return new DriverPropertyInfo[0];
10.138 + }
10.139 +
10.140 + @Override
10.141 + public int getMajorVersion() {
10.142 + return 0;
10.143 + }
10.144 +
10.145 + @Override
10.146 + public int getMinorVersion() {
10.147 + return 1;
10.148 + }
10.149 +
10.150 + @Override
10.151 + public boolean jdbcCompliant() {
10.152 + return false;
10.153 + }
10.154 +
10.155 + @Override
10.156 + public Logger getParentLogger() throws SQLFeatureNotSupportedException {
10.157 + throw new SQLFeatureNotSupportedException("Not supported yet.");
10.158 + }
10.159 +
10.160 +}
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/java/jdbc-dk-driver/src/main/resources/META-INF/services/java.sql.Driver Mon Mar 04 22:02:52 2019 +0100
11.3 @@ -0,0 +1,1 @@
11.4 +info.globalcode.sql.dk.jdbc.Driver