1.1 --- a/.hgignore Sat Jun 07 21:57:50 2014 +0200
1.2 +++ b/.hgignore Sat Jun 07 22:09:32 2014 +0200
1.3 @@ -2,9 +2,13 @@
1.4 java/alt2xml-cli/build/*
1.5 java/alt2xml-cli/nbproject/private/*
1.6
1.7 -java/alt2xml-lib/dist/*
1.8 -java/alt2xml-lib/build/*
1.9 -java/alt2xml-lib/nbproject/private/*
1.10 +java/alt2xml-lib-input/dist/*
1.11 +java/alt2xml-lib-input/build/*
1.12 +java/alt2xml-lib-input/nbproject/private/*
1.13 +
1.14 +java/alt2xml-lib-output/dist/*
1.15 +java/alt2xml-lib-output/build/*
1.16 +java/alt2xml-lib-output/nbproject/private/*
1.17
1.18 java/alt2xml-in-json/dist/*
1.19 java/alt2xml-in-json/build/*
2.1 --- a/java/alt2xml-cli/nbproject/genfiles.properties Sat Jun 07 21:57:50 2014 +0200
2.2 +++ b/java/alt2xml-cli/nbproject/genfiles.properties Sat Jun 07 22:09:32 2014 +0200
2.3 @@ -1,4 +1,4 @@
2.4 -build.xml.data.CRC32=97b0f0d3
2.5 +build.xml.data.CRC32=43f6f692
2.6 build.xml.script.CRC32=c0ec96ea
2.7 build.xml.stylesheet.CRC32=8064a381@1.74.2.48
2.8 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
2.9 @@ -6,6 +6,6 @@
2.10 nbproject/build-impl.xml.data.CRC32=31175c28
2.11 nbproject/build-impl.xml.script.CRC32=aa79723f
2.12 nbproject/build-impl.xml.stylesheet.CRC32=c6d2a60f@1.56.1.46
2.13 -nbproject/groovy-build.xml.data.CRC32=97b0f0d3
2.14 +nbproject/groovy-build.xml.data.CRC32=43f6f692
2.15 nbproject/groovy-build.xml.script.CRC32=66297360
2.16 nbproject/groovy-build.xml.stylesheet.CRC32=28d0e1f2@1.7.1
3.1 --- a/java/alt2xml-cli/nbproject/project.properties Sat Jun 07 21:57:50 2014 +0200
3.2 +++ b/java/alt2xml-cli/nbproject/project.properties Sat Jun 07 22:09:32 2014 +0200
3.3 @@ -29,8 +29,7 @@
3.4 excludes=
3.5 includes=**
3.6 jar.compress=false
3.7 -javac.classpath=\
3.8 - ${reference.alt2xml-lib.jar}
3.9 +javac.classpath=
3.10 # Space-separated list of extra javac options
3.11 javac.compilerargs=
3.12 javac.deprecation=false
3.13 @@ -59,8 +58,6 @@
3.14 meta.inf.dir=${src.dir}/META-INF
3.15 mkdist.disabled=true
3.16 platform.active=default_platform
3.17 -project.alt2xml-lib=../alt2xml-lib
3.18 -reference.alt2xml-lib.jar=${project.alt2xml-lib}/dist/alt2xml-lib.jar
3.19 run.classpath=\
3.20 ${javac.classpath}:\
3.21 ${build.classes.dir}
4.1 --- a/java/alt2xml-cli/nbproject/project.xml Sat Jun 07 21:57:50 2014 +0200
4.2 +++ b/java/alt2xml-cli/nbproject/project.xml Sat Jun 07 22:09:32 2014 +0200
4.3 @@ -16,15 +16,6 @@
4.4 <root id="test.src.dir"/>
4.5 </test-roots>
4.6 </data>
4.7 - <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
4.8 - <reference>
4.9 - <foreign-project>alt2xml-lib</foreign-project>
4.10 - <artifact-type>jar</artifact-type>
4.11 - <script>build.xml</script>
4.12 - <target>jar</target>
4.13 - <clean-target>clean</clean-target>
4.14 - <id>jar</id>
4.15 - </reference>
4.16 - </references>
4.17 + <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"/>
4.18 </configuration>
4.19 </project>
5.1 --- a/java/alt2xml-in-json/nbproject/build-impl.xml Sat Jun 07 21:57:50 2014 +0200
5.2 +++ b/java/alt2xml-in-json/nbproject/build-impl.xml Sat Jun 07 22:09:32 2014 +0200
5.3 @@ -900,8 +900,8 @@
5.4 </propertyfile>
5.5 <antcall target="-maybe-call-dep">
5.6 <param name="call.built.properties" value="${built-jar.properties}"/>
5.7 - <param location="${project.alt2xml-lib}" name="call.subproject"/>
5.8 - <param location="${project.alt2xml-lib}/build.xml" name="call.script"/>
5.9 + <param location="${project.alt2xml-lib-input}" name="call.subproject"/>
5.10 + <param location="${project.alt2xml-lib-input}/build.xml" name="call.script"/>
5.11 <param name="call.target" value="jar"/>
5.12 <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
5.13 <param name="transfer.not.archive.disabled" value="true"/>
5.14 @@ -1400,8 +1400,8 @@
5.15 </propertyfile>
5.16 <antcall target="-maybe-call-dep">
5.17 <param name="call.built.properties" value="${built-clean.properties}"/>
5.18 - <param location="${project.alt2xml-lib}" name="call.subproject"/>
5.19 - <param location="${project.alt2xml-lib}/build.xml" name="call.script"/>
5.20 + <param location="${project.alt2xml-lib-input}" name="call.subproject"/>
5.21 + <param location="${project.alt2xml-lib-input}/build.xml" name="call.script"/>
5.22 <param name="call.target" value="clean"/>
5.23 <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
5.24 <param name="transfer.not.archive.disabled" value="true"/>
6.1 --- a/java/alt2xml-in-json/nbproject/genfiles.properties Sat Jun 07 21:57:50 2014 +0200
6.2 +++ b/java/alt2xml-in-json/nbproject/genfiles.properties Sat Jun 07 22:09:32 2014 +0200
6.3 @@ -1,8 +1,8 @@
6.4 -build.xml.data.CRC32=eaa6670b
6.5 +build.xml.data.CRC32=36d981c5
6.6 build.xml.script.CRC32=85cc1c66
6.7 build.xml.stylesheet.CRC32=8064a381@1.74.2.48
6.8 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
6.9 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6.10 -nbproject/build-impl.xml.data.CRC32=eaa6670b
6.11 -nbproject/build-impl.xml.script.CRC32=fae42019
6.12 +nbproject/build-impl.xml.data.CRC32=36d981c5
6.13 +nbproject/build-impl.xml.script.CRC32=5b826399
6.14 nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.2.48
7.1 --- a/java/alt2xml-in-json/nbproject/project.properties Sat Jun 07 21:57:50 2014 +0200
7.2 +++ b/java/alt2xml-in-json/nbproject/project.properties Sat Jun 07 22:09:32 2014 +0200
7.3 @@ -32,8 +32,8 @@
7.4 includes=**
7.5 jar.compress=false
7.6 javac.classpath=\
7.7 - ${reference.alt2xml-lib.jar}:\
7.8 - ${libs.json-simple.classpath}
7.9 + ${libs.json-simple.classpath}:\
7.10 + ${reference.alt2xml-lib-input.jar}
7.11 # Space-separated list of extra javac options
7.12 javac.compilerargs=
7.13 javac.deprecation=false
7.14 @@ -60,8 +60,8 @@
7.15 meta.inf.dir=${src.dir}/META-INF
7.16 mkdist.disabled=true
7.17 platform.active=default_platform
7.18 -project.alt2xml-lib=../alt2xml-lib
7.19 -reference.alt2xml-lib.jar=${project.alt2xml-lib}/dist/alt2xml-lib.jar
7.20 +project.alt2xml-lib-input=../alt2xml-lib-input
7.21 +reference.alt2xml-lib-input.jar=${project.alt2xml-lib-input}/dist/alt2xml-lib-input.jar
7.22 run.classpath=\
7.23 ${javac.classpath}:\
7.24 ${build.classes.dir}
8.1 --- a/java/alt2xml-in-json/nbproject/project.xml Sat Jun 07 21:57:50 2014 +0200
8.2 +++ b/java/alt2xml-in-json/nbproject/project.xml Sat Jun 07 22:09:32 2014 +0200
8.3 @@ -14,7 +14,7 @@
8.4 </data>
8.5 <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
8.6 <reference>
8.7 - <foreign-project>alt2xml-lib</foreign-project>
8.8 + <foreign-project>alt2xml-lib-input</foreign-project>
8.9 <artifact-type>jar</artifact-type>
8.10 <script>build.xml</script>
8.11 <target>jar</target>
9.1 --- a/java/alt2xml-in-properties/nbproject/build-impl.xml Sat Jun 07 21:57:50 2014 +0200
9.2 +++ b/java/alt2xml-in-properties/nbproject/build-impl.xml Sat Jun 07 22:09:32 2014 +0200
9.3 @@ -900,8 +900,8 @@
9.4 </propertyfile>
9.5 <antcall target="-maybe-call-dep">
9.6 <param name="call.built.properties" value="${built-jar.properties}"/>
9.7 - <param location="${project.alt2xml-lib}" name="call.subproject"/>
9.8 - <param location="${project.alt2xml-lib}/build.xml" name="call.script"/>
9.9 + <param location="${project.alt2xml-lib-input}" name="call.subproject"/>
9.10 + <param location="${project.alt2xml-lib-input}/build.xml" name="call.script"/>
9.11 <param name="call.target" value="jar"/>
9.12 <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
9.13 <param name="transfer.not.archive.disabled" value="true"/>
9.14 @@ -1400,8 +1400,8 @@
9.15 </propertyfile>
9.16 <antcall target="-maybe-call-dep">
9.17 <param name="call.built.properties" value="${built-clean.properties}"/>
9.18 - <param location="${project.alt2xml-lib}" name="call.subproject"/>
9.19 - <param location="${project.alt2xml-lib}/build.xml" name="call.script"/>
9.20 + <param location="${project.alt2xml-lib-input}" name="call.subproject"/>
9.21 + <param location="${project.alt2xml-lib-input}/build.xml" name="call.script"/>
9.22 <param name="call.target" value="clean"/>
9.23 <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
9.24 <param name="transfer.not.archive.disabled" value="true"/>
10.1 --- a/java/alt2xml-in-properties/nbproject/genfiles.properties Sat Jun 07 21:57:50 2014 +0200
10.2 +++ b/java/alt2xml-in-properties/nbproject/genfiles.properties Sat Jun 07 22:09:32 2014 +0200
10.3 @@ -1,8 +1,8 @@
10.4 -build.xml.data.CRC32=1573d3a6
10.5 +build.xml.data.CRC32=d90e5067
10.6 build.xml.script.CRC32=462baf93
10.7 build.xml.stylesheet.CRC32=8064a381@1.74.2.48
10.8 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
10.9 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
10.10 -nbproject/build-impl.xml.data.CRC32=1573d3a6
10.11 -nbproject/build-impl.xml.script.CRC32=4e81b18f
10.12 +nbproject/build-impl.xml.data.CRC32=d90e5067
10.13 +nbproject/build-impl.xml.script.CRC32=a04fd84f
10.14 nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.2.48
11.1 --- a/java/alt2xml-in-properties/nbproject/project.properties Sat Jun 07 21:57:50 2014 +0200
11.2 +++ b/java/alt2xml-in-properties/nbproject/project.properties Sat Jun 07 22:09:32 2014 +0200
11.3 @@ -32,7 +32,7 @@
11.4 includes=**
11.5 jar.compress=false
11.6 javac.classpath=\
11.7 - ${reference.alt2xml-lib.jar}
11.8 + ${reference.alt2xml-lib-input.jar}
11.9 # Space-separated list of extra javac options
11.10 javac.compilerargs=
11.11 javac.deprecation=false
11.12 @@ -59,8 +59,8 @@
11.13 meta.inf.dir=${src.dir}/META-INF
11.14 mkdist.disabled=true
11.15 platform.active=default_platform
11.16 -project.alt2xml-lib=../alt2xml-lib
11.17 -reference.alt2xml-lib.jar=${project.alt2xml-lib}/dist/alt2xml-lib.jar
11.18 +project.alt2xml-lib-input=../alt2xml-lib-input
11.19 +reference.alt2xml-lib-input.jar=${project.alt2xml-lib-input}/dist/alt2xml-lib-input.jar
11.20 run.classpath=\
11.21 ${javac.classpath}:\
11.22 ${build.classes.dir}
12.1 --- a/java/alt2xml-in-properties/nbproject/project.xml Sat Jun 07 21:57:50 2014 +0200
12.2 +++ b/java/alt2xml-in-properties/nbproject/project.xml Sat Jun 07 22:09:32 2014 +0200
12.3 @@ -14,7 +14,7 @@
12.4 </data>
12.5 <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
12.6 <reference>
12.7 - <foreign-project>alt2xml-lib</foreign-project>
12.8 + <foreign-project>alt2xml-lib-input</foreign-project>
12.9 <artifact-type>jar</artifact-type>
12.10 <script>build.xml</script>
12.11 <target>jar</target>
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/java/alt2xml-lib-input/build.xml Sat Jun 07 22:09:32 2014 +0200
13.3 @@ -0,0 +1,73 @@
13.4 +<?xml version="1.0" encoding="UTF-8"?>
13.5 +<!-- You may freely edit this file. See commented blocks below for -->
13.6 +<!-- some examples of how to customize the build. -->
13.7 +<!-- (If you delete it and reopen the project it will be recreated.) -->
13.8 +<!-- By default, only the Clean and Build commands use this build script. -->
13.9 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
13.10 +<!-- the Compile on Save feature is turned off for the project. -->
13.11 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
13.12 +<!-- in the project's Project Properties dialog box.-->
13.13 +<project name="alt2xml-lib-input" default="default" basedir=".">
13.14 + <description>Builds, tests, and runs the project alt2xml-lib-input.</description>
13.15 + <import file="nbproject/build-impl.xml"/>
13.16 + <!--
13.17 +
13.18 + There exist several targets which are by default empty and which can be
13.19 + used for execution of your tasks. These targets are usually executed
13.20 + before and after some main targets. They are:
13.21 +
13.22 + -pre-init: called before initialization of project properties
13.23 + -post-init: called after initialization of project properties
13.24 + -pre-compile: called before javac compilation
13.25 + -post-compile: called after javac compilation
13.26 + -pre-compile-single: called before javac compilation of single file
13.27 + -post-compile-single: called after javac compilation of single file
13.28 + -pre-compile-test: called before javac compilation of JUnit tests
13.29 + -post-compile-test: called after javac compilation of JUnit tests
13.30 + -pre-compile-test-single: called before javac compilation of single JUnit test
13.31 + -post-compile-test-single: called after javac compilation of single JUunit test
13.32 + -pre-jar: called before JAR building
13.33 + -post-jar: called after JAR building
13.34 + -post-clean: called after cleaning build products
13.35 +
13.36 + (Targets beginning with '-' are not intended to be called on their own.)
13.37 +
13.38 + Example of inserting an obfuscator after compilation could look like this:
13.39 +
13.40 + <target name="-post-compile">
13.41 + <obfuscate>
13.42 + <fileset dir="${build.classes.dir}"/>
13.43 + </obfuscate>
13.44 + </target>
13.45 +
13.46 + For list of available properties check the imported
13.47 + nbproject/build-impl.xml file.
13.48 +
13.49 +
13.50 + Another way to customize the build is by overriding existing main targets.
13.51 + The targets of interest are:
13.52 +
13.53 + -init-macrodef-javac: defines macro for javac compilation
13.54 + -init-macrodef-junit: defines macro for junit execution
13.55 + -init-macrodef-debug: defines macro for class debugging
13.56 + -init-macrodef-java: defines macro for class execution
13.57 + -do-jar: JAR building
13.58 + run: execution of project
13.59 + -javadoc-build: Javadoc generation
13.60 + test-report: JUnit report generation
13.61 +
13.62 + An example of overriding the target for project execution could look like this:
13.63 +
13.64 + <target name="run" depends="alt2xml-lib-input-impl.jar">
13.65 + <exec dir="bin" executable="launcher.exe">
13.66 + <arg file="${dist.jar}"/>
13.67 + </exec>
13.68 + </target>
13.69 +
13.70 + Notice that the overridden target depends on the jar target and not only on
13.71 + the compile target as the regular run target does. Again, for a list of available
13.72 + properties which you can use, check the target you are overriding in the
13.73 + nbproject/build-impl.xml file.
13.74 +
13.75 + -->
13.76 +</project>
14.1 Binary file java/alt2xml-lib-input/dist/alt2xml-lib-input.jar has changed
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/java/alt2xml-lib-input/nbproject/build-impl.xml Sat Jun 07 22:09:32 2014 +0200
15.3 @@ -0,0 +1,1413 @@
15.4 +<?xml version="1.0" encoding="UTF-8"?>
15.5 +<!--
15.6 +*** GENERATED FROM project.xml - DO NOT EDIT ***
15.7 +*** EDIT ../build.xml INSTEAD ***
15.8 +
15.9 +For the purpose of easier reading the script
15.10 +is divided into following sections:
15.11 +
15.12 + - initialization
15.13 + - compilation
15.14 + - jar
15.15 + - execution
15.16 + - debugging
15.17 + - javadoc
15.18 + - test compilation
15.19 + - test execution
15.20 + - test debugging
15.21 + - applet
15.22 + - cleanup
15.23 +
15.24 + -->
15.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="alt2xml-lib-input-impl">
15.26 + <fail message="Please build using Ant 1.8.0 or higher.">
15.27 + <condition>
15.28 + <not>
15.29 + <antversion atleast="1.8.0"/>
15.30 + </not>
15.31 + </condition>
15.32 + </fail>
15.33 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
15.34 + <!--
15.35 + ======================
15.36 + INITIALIZATION SECTION
15.37 + ======================
15.38 + -->
15.39 + <target name="-pre-init">
15.40 + <!-- Empty placeholder for easier customization. -->
15.41 + <!-- You can override this target in the ../build.xml file. -->
15.42 + </target>
15.43 + <target depends="-pre-init" name="-init-private">
15.44 + <property file="nbproject/private/config.properties"/>
15.45 + <property file="nbproject/private/configs/${config}.properties"/>
15.46 + <property file="nbproject/private/private.properties"/>
15.47 + </target>
15.48 + <target depends="-pre-init,-init-private" name="-init-user">
15.49 + <property file="${user.properties.file}"/>
15.50 + <!-- The two properties below are usually overridden -->
15.51 + <!-- by the active platform. Just a fallback. -->
15.52 + <property name="default.javac.source" value="1.4"/>
15.53 + <property name="default.javac.target" value="1.4"/>
15.54 + </target>
15.55 + <target depends="-pre-init,-init-private,-init-user" name="-init-project">
15.56 + <property file="nbproject/configs/${config}.properties"/>
15.57 + <property file="nbproject/project.properties"/>
15.58 + </target>
15.59 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
15.60 + <property name="platform.java" value="${java.home}/bin/java"/>
15.61 + <available file="${manifest.file}" property="manifest.available"/>
15.62 + <condition property="splashscreen.available">
15.63 + <and>
15.64 + <not>
15.65 + <equals arg1="${application.splash}" arg2="" trim="true"/>
15.66 + </not>
15.67 + <available file="${application.splash}"/>
15.68 + </and>
15.69 + </condition>
15.70 + <condition property="main.class.available">
15.71 + <and>
15.72 + <isset property="main.class"/>
15.73 + <not>
15.74 + <equals arg1="${main.class}" arg2="" trim="true"/>
15.75 + </not>
15.76 + </and>
15.77 + </condition>
15.78 + <condition property="profile.available">
15.79 + <and>
15.80 + <isset property="javac.profile"/>
15.81 + <length length="0" string="${javac.profile}" when="greater"/>
15.82 + <matches pattern="1\.[89](\..*)?" string="${javac.source}"/>
15.83 + </and>
15.84 + </condition>
15.85 + <condition property="do.archive">
15.86 + <or>
15.87 + <not>
15.88 + <istrue value="${jar.archive.disabled}"/>
15.89 + </not>
15.90 + <istrue value="${not.archive.disabled}"/>
15.91 + </or>
15.92 + </condition>
15.93 + <condition property="do.mkdist">
15.94 + <and>
15.95 + <isset property="do.archive"/>
15.96 + <isset property="libs.CopyLibs.classpath"/>
15.97 + <not>
15.98 + <istrue value="${mkdist.disabled}"/>
15.99 + </not>
15.100 + </and>
15.101 + </condition>
15.102 + <condition property="do.archive+manifest.available">
15.103 + <and>
15.104 + <isset property="manifest.available"/>
15.105 + <istrue value="${do.archive}"/>
15.106 + </and>
15.107 + </condition>
15.108 + <condition property="do.archive+main.class.available">
15.109 + <and>
15.110 + <isset property="main.class.available"/>
15.111 + <istrue value="${do.archive}"/>
15.112 + </and>
15.113 + </condition>
15.114 + <condition property="do.archive+splashscreen.available">
15.115 + <and>
15.116 + <isset property="splashscreen.available"/>
15.117 + <istrue value="${do.archive}"/>
15.118 + </and>
15.119 + </condition>
15.120 + <condition property="do.archive+profile.available">
15.121 + <and>
15.122 + <isset property="profile.available"/>
15.123 + <istrue value="${do.archive}"/>
15.124 + </and>
15.125 + </condition>
15.126 + <condition property="have.tests">
15.127 + <or>
15.128 + <available file="${test.src.dir}"/>
15.129 + </or>
15.130 + </condition>
15.131 + <condition property="have.sources">
15.132 + <or>
15.133 + <available file="${src.dir}"/>
15.134 + </or>
15.135 + </condition>
15.136 + <condition property="netbeans.home+have.tests">
15.137 + <and>
15.138 + <isset property="netbeans.home"/>
15.139 + <isset property="have.tests"/>
15.140 + </and>
15.141 + </condition>
15.142 + <condition property="no.javadoc.preview">
15.143 + <and>
15.144 + <isset property="javadoc.preview"/>
15.145 + <isfalse value="${javadoc.preview}"/>
15.146 + </and>
15.147 + </condition>
15.148 + <property name="run.jvmargs" value=""/>
15.149 + <property name="run.jvmargs.ide" value=""/>
15.150 + <property name="javac.compilerargs" value=""/>
15.151 + <property name="work.dir" value="${basedir}"/>
15.152 + <condition property="no.deps">
15.153 + <and>
15.154 + <istrue value="${no.dependencies}"/>
15.155 + </and>
15.156 + </condition>
15.157 + <property name="javac.debug" value="true"/>
15.158 + <property name="javadoc.preview" value="true"/>
15.159 + <property name="application.args" value=""/>
15.160 + <property name="source.encoding" value="${file.encoding}"/>
15.161 + <property name="runtime.encoding" value="${source.encoding}"/>
15.162 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
15.163 + <and>
15.164 + <isset property="javadoc.encoding"/>
15.165 + <not>
15.166 + <equals arg1="${javadoc.encoding}" arg2=""/>
15.167 + </not>
15.168 + </and>
15.169 + </condition>
15.170 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
15.171 + <property name="includes" value="**"/>
15.172 + <property name="excludes" value=""/>
15.173 + <property name="do.depend" value="false"/>
15.174 + <condition property="do.depend.true">
15.175 + <istrue value="${do.depend}"/>
15.176 + </condition>
15.177 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
15.178 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
15.179 + <and>
15.180 + <isset property="endorsed.classpath"/>
15.181 + <not>
15.182 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
15.183 + </not>
15.184 + </and>
15.185 + </condition>
15.186 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
15.187 + <isset property="profile.available"/>
15.188 + </condition>
15.189 + <condition else="false" property="jdkBug6558476">
15.190 + <and>
15.191 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
15.192 + <not>
15.193 + <os family="unix"/>
15.194 + </not>
15.195 + </and>
15.196 + </condition>
15.197 + <property name="javac.fork" value="${jdkBug6558476}"/>
15.198 + <property name="jar.index" value="false"/>
15.199 + <property name="jar.index.metainf" value="${jar.index}"/>
15.200 + <property name="copylibs.rebase" value="true"/>
15.201 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
15.202 + <condition property="junit.available">
15.203 + <or>
15.204 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
15.205 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
15.206 + </or>
15.207 + </condition>
15.208 + <condition property="testng.available">
15.209 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
15.210 + </condition>
15.211 + <condition property="junit+testng.available">
15.212 + <and>
15.213 + <istrue value="${junit.available}"/>
15.214 + <istrue value="${testng.available}"/>
15.215 + </and>
15.216 + </condition>
15.217 + <condition else="testng" property="testng.mode" value="mixed">
15.218 + <istrue value="${junit+testng.available}"/>
15.219 + </condition>
15.220 + <condition else="" property="testng.debug.mode" value="-mixed">
15.221 + <istrue value="${junit+testng.available}"/>
15.222 + </condition>
15.223 + </target>
15.224 + <target name="-post-init">
15.225 + <!-- Empty placeholder for easier customization. -->
15.226 + <!-- You can override this target in the ../build.xml file. -->
15.227 + </target>
15.228 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
15.229 + <fail unless="src.dir">Must set src.dir</fail>
15.230 + <fail unless="test.src.dir">Must set test.src.dir</fail>
15.231 + <fail unless="build.dir">Must set build.dir</fail>
15.232 + <fail unless="dist.dir">Must set dist.dir</fail>
15.233 + <fail unless="build.classes.dir">Must set build.classes.dir</fail>
15.234 + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
15.235 + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
15.236 + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
15.237 + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
15.238 + <fail unless="dist.jar">Must set dist.jar</fail>
15.239 + </target>
15.240 + <target name="-init-macrodef-property">
15.241 + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
15.242 + <attribute name="name"/>
15.243 + <attribute name="value"/>
15.244 + <sequential>
15.245 + <property name="@{name}" value="${@{value}}"/>
15.246 + </sequential>
15.247 + </macrodef>
15.248 + </target>
15.249 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
15.250 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
15.251 + <attribute default="${src.dir}" name="srcdir"/>
15.252 + <attribute default="${build.classes.dir}" name="destdir"/>
15.253 + <attribute default="${javac.classpath}" name="classpath"/>
15.254 + <attribute default="${javac.processorpath}" name="processorpath"/>
15.255 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
15.256 + <attribute default="${includes}" name="includes"/>
15.257 + <attribute default="${excludes}" name="excludes"/>
15.258 + <attribute default="${javac.debug}" name="debug"/>
15.259 + <attribute default="${empty.dir}" name="sourcepath"/>
15.260 + <attribute default="${empty.dir}" name="gensrcdir"/>
15.261 + <element name="customize" optional="true"/>
15.262 + <sequential>
15.263 + <property location="${build.dir}/empty" name="empty.dir"/>
15.264 + <mkdir dir="${empty.dir}"/>
15.265 + <mkdir dir="@{apgeneratedsrcdir}"/>
15.266 + <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}">
15.267 + <src>
15.268 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
15.269 + <include name="*"/>
15.270 + </dirset>
15.271 + </src>
15.272 + <classpath>
15.273 + <path path="@{classpath}"/>
15.274 + </classpath>
15.275 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
15.276 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
15.277 + <compilerarg line="${javac.compilerargs}"/>
15.278 + <compilerarg value="-processorpath"/>
15.279 + <compilerarg path="@{processorpath}:${empty.dir}"/>
15.280 + <compilerarg line="${ap.processors.internal}"/>
15.281 + <compilerarg line="${annotation.processing.processor.options}"/>
15.282 + <compilerarg value="-s"/>
15.283 + <compilerarg path="@{apgeneratedsrcdir}"/>
15.284 + <compilerarg line="${ap.proc.none.internal}"/>
15.285 + <customize/>
15.286 + </javac>
15.287 + </sequential>
15.288 + </macrodef>
15.289 + </target>
15.290 + <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
15.291 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
15.292 + <attribute default="${src.dir}" name="srcdir"/>
15.293 + <attribute default="${build.classes.dir}" name="destdir"/>
15.294 + <attribute default="${javac.classpath}" name="classpath"/>
15.295 + <attribute default="${javac.processorpath}" name="processorpath"/>
15.296 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
15.297 + <attribute default="${includes}" name="includes"/>
15.298 + <attribute default="${excludes}" name="excludes"/>
15.299 + <attribute default="${javac.debug}" name="debug"/>
15.300 + <attribute default="${empty.dir}" name="sourcepath"/>
15.301 + <attribute default="${empty.dir}" name="gensrcdir"/>
15.302 + <element name="customize" optional="true"/>
15.303 + <sequential>
15.304 + <property location="${build.dir}/empty" name="empty.dir"/>
15.305 + <mkdir dir="${empty.dir}"/>
15.306 + <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}">
15.307 + <src>
15.308 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
15.309 + <include name="*"/>
15.310 + </dirset>
15.311 + </src>
15.312 + <classpath>
15.313 + <path path="@{classpath}"/>
15.314 + </classpath>
15.315 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
15.316 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
15.317 + <compilerarg line="${javac.compilerargs}"/>
15.318 + <customize/>
15.319 + </javac>
15.320 + </sequential>
15.321 + </macrodef>
15.322 + </target>
15.323 + <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
15.324 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
15.325 + <attribute default="${src.dir}" name="srcdir"/>
15.326 + <attribute default="${build.classes.dir}" name="destdir"/>
15.327 + <attribute default="${javac.classpath}" name="classpath"/>
15.328 + <sequential>
15.329 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
15.330 + <classpath>
15.331 + <path path="@{classpath}"/>
15.332 + </classpath>
15.333 + </depend>
15.334 + </sequential>
15.335 + </macrodef>
15.336 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
15.337 + <attribute default="${build.classes.dir}" name="destdir"/>
15.338 + <sequential>
15.339 + <fail unless="javac.includes">Must set javac.includes</fail>
15.340 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
15.341 + <path>
15.342 + <filelist dir="@{destdir}" files="${javac.includes}"/>
15.343 + </path>
15.344 + <globmapper from="*.java" to="*.class"/>
15.345 + </pathconvert>
15.346 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
15.347 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
15.348 + <delete>
15.349 + <files includesfile="${javac.includesfile.binary}"/>
15.350 + </delete>
15.351 + <delete>
15.352 + <fileset file="${javac.includesfile.binary}"/>
15.353 + </delete>
15.354 + </sequential>
15.355 + </macrodef>
15.356 + </target>
15.357 + <target if="${junit.available}" name="-init-macrodef-junit-init">
15.358 + <condition else="false" property="nb.junit.batch" value="true">
15.359 + <and>
15.360 + <istrue value="${junit.available}"/>
15.361 + <not>
15.362 + <isset property="test.method"/>
15.363 + </not>
15.364 + </and>
15.365 + </condition>
15.366 + <condition else="false" property="nb.junit.single" value="true">
15.367 + <and>
15.368 + <istrue value="${junit.available}"/>
15.369 + <isset property="test.method"/>
15.370 + </and>
15.371 + </condition>
15.372 + </target>
15.373 + <target name="-init-test-properties">
15.374 + <property name="test.binaryincludes" value="<nothing>"/>
15.375 + <property name="test.binarytestincludes" value=""/>
15.376 + <property name="test.binaryexcludes" value=""/>
15.377 + </target>
15.378 + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
15.379 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
15.380 + <attribute default="${includes}" name="includes"/>
15.381 + <attribute default="${excludes}" name="excludes"/>
15.382 + <attribute default="**" name="testincludes"/>
15.383 + <attribute default="" name="testmethods"/>
15.384 + <element name="customize" optional="true"/>
15.385 + <sequential>
15.386 + <property name="junit.forkmode" value="perTest"/>
15.387 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
15.388 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
15.389 + <syspropertyset>
15.390 + <propertyref prefix="test-sys-prop."/>
15.391 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
15.392 + </syspropertyset>
15.393 + <formatter type="brief" usefile="false"/>
15.394 + <formatter type="xml"/>
15.395 + <jvmarg value="-ea"/>
15.396 + <customize/>
15.397 + </junit>
15.398 + </sequential>
15.399 + </macrodef>
15.400 + </target>
15.401 + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
15.402 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
15.403 + <attribute default="${includes}" name="includes"/>
15.404 + <attribute default="${excludes}" name="excludes"/>
15.405 + <attribute default="**" name="testincludes"/>
15.406 + <attribute default="" name="testmethods"/>
15.407 + <element name="customize" optional="true"/>
15.408 + <sequential>
15.409 + <property name="junit.forkmode" value="perTest"/>
15.410 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
15.411 + <batchtest todir="${build.test.results.dir}">
15.412 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
15.413 + <filename name="@{testincludes}"/>
15.414 + </fileset>
15.415 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
15.416 + <filename name="${test.binarytestincludes}"/>
15.417 + </fileset>
15.418 + </batchtest>
15.419 + <syspropertyset>
15.420 + <propertyref prefix="test-sys-prop."/>
15.421 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
15.422 + </syspropertyset>
15.423 + <formatter type="brief" usefile="false"/>
15.424 + <formatter type="xml"/>
15.425 + <jvmarg value="-ea"/>
15.426 + <customize/>
15.427 + </junit>
15.428 + </sequential>
15.429 + </macrodef>
15.430 + </target>
15.431 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
15.432 + <target if="${testng.available}" name="-init-macrodef-testng">
15.433 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
15.434 + <attribute default="${includes}" name="includes"/>
15.435 + <attribute default="${excludes}" name="excludes"/>
15.436 + <attribute default="**" name="testincludes"/>
15.437 + <attribute default="" name="testmethods"/>
15.438 + <element name="customize" optional="true"/>
15.439 + <sequential>
15.440 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
15.441 + <isset property="test.method"/>
15.442 + </condition>
15.443 + <union id="test.set">
15.444 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
15.445 + <filename name="@{testincludes}"/>
15.446 + </fileset>
15.447 + </union>
15.448 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
15.449 + <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="alt2xml-lib-input" testname="TestNG tests" workingDir="${work.dir}">
15.450 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
15.451 + <propertyset>
15.452 + <propertyref prefix="test-sys-prop."/>
15.453 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
15.454 + </propertyset>
15.455 + <customize/>
15.456 + </testng>
15.457 + </sequential>
15.458 + </macrodef>
15.459 + </target>
15.460 + <target name="-init-macrodef-test-impl">
15.461 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
15.462 + <attribute default="${includes}" name="includes"/>
15.463 + <attribute default="${excludes}" name="excludes"/>
15.464 + <attribute default="**" name="testincludes"/>
15.465 + <attribute default="" name="testmethods"/>
15.466 + <element implicit="true" name="customize" optional="true"/>
15.467 + <sequential>
15.468 + <echo>No tests executed.</echo>
15.469 + </sequential>
15.470 + </macrodef>
15.471 + </target>
15.472 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
15.473 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
15.474 + <attribute default="${includes}" name="includes"/>
15.475 + <attribute default="${excludes}" name="excludes"/>
15.476 + <attribute default="**" name="testincludes"/>
15.477 + <attribute default="" name="testmethods"/>
15.478 + <element implicit="true" name="customize" optional="true"/>
15.479 + <sequential>
15.480 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
15.481 + <customize/>
15.482 + </j2seproject3:junit>
15.483 + </sequential>
15.484 + </macrodef>
15.485 + </target>
15.486 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
15.487 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
15.488 + <attribute default="${includes}" name="includes"/>
15.489 + <attribute default="${excludes}" name="excludes"/>
15.490 + <attribute default="**" name="testincludes"/>
15.491 + <attribute default="" name="testmethods"/>
15.492 + <element implicit="true" name="customize" optional="true"/>
15.493 + <sequential>
15.494 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
15.495 + <customize/>
15.496 + </j2seproject3:testng>
15.497 + </sequential>
15.498 + </macrodef>
15.499 + </target>
15.500 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
15.501 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
15.502 + <attribute default="${includes}" name="includes"/>
15.503 + <attribute default="${excludes}" name="excludes"/>
15.504 + <attribute default="**" name="testincludes"/>
15.505 + <attribute default="" name="testmethods"/>
15.506 + <sequential>
15.507 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
15.508 + <customize>
15.509 + <classpath>
15.510 + <path path="${run.test.classpath}"/>
15.511 + </classpath>
15.512 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
15.513 + <jvmarg line="${run.jvmargs}"/>
15.514 + <jvmarg line="${run.jvmargs.ide}"/>
15.515 + </customize>
15.516 + </j2seproject3:test-impl>
15.517 + </sequential>
15.518 + </macrodef>
15.519 + </target>
15.520 + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
15.521 + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
15.522 + <attribute default="${includes}" name="includes"/>
15.523 + <attribute default="${excludes}" name="excludes"/>
15.524 + <attribute default="**" name="testincludes"/>
15.525 + <attribute default="" name="testmethods"/>
15.526 + <element name="customize" optional="true"/>
15.527 + <sequential>
15.528 + <property name="junit.forkmode" value="perTest"/>
15.529 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
15.530 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
15.531 + <syspropertyset>
15.532 + <propertyref prefix="test-sys-prop."/>
15.533 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
15.534 + </syspropertyset>
15.535 + <formatter type="brief" usefile="false"/>
15.536 + <formatter type="xml"/>
15.537 + <jvmarg value="-ea"/>
15.538 + <jvmarg line="${debug-args-line}"/>
15.539 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
15.540 + <customize/>
15.541 + </junit>
15.542 + </sequential>
15.543 + </macrodef>
15.544 + </target>
15.545 + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
15.546 + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
15.547 + <attribute default="${includes}" name="includes"/>
15.548 + <attribute default="${excludes}" name="excludes"/>
15.549 + <attribute default="**" name="testincludes"/>
15.550 + <attribute default="" name="testmethods"/>
15.551 + <element name="customize" optional="true"/>
15.552 + <sequential>
15.553 + <property name="junit.forkmode" value="perTest"/>
15.554 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
15.555 + <batchtest todir="${build.test.results.dir}">
15.556 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
15.557 + <filename name="@{testincludes}"/>
15.558 + </fileset>
15.559 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
15.560 + <filename name="${test.binarytestincludes}"/>
15.561 + </fileset>
15.562 + </batchtest>
15.563 + <syspropertyset>
15.564 + <propertyref prefix="test-sys-prop."/>
15.565 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
15.566 + </syspropertyset>
15.567 + <formatter type="brief" usefile="false"/>
15.568 + <formatter type="xml"/>
15.569 + <jvmarg value="-ea"/>
15.570 + <jvmarg line="${debug-args-line}"/>
15.571 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
15.572 + <customize/>
15.573 + </junit>
15.574 + </sequential>
15.575 + </macrodef>
15.576 + </target>
15.577 + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
15.578 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
15.579 + <attribute default="${includes}" name="includes"/>
15.580 + <attribute default="${excludes}" name="excludes"/>
15.581 + <attribute default="**" name="testincludes"/>
15.582 + <attribute default="" name="testmethods"/>
15.583 + <element implicit="true" name="customize" optional="true"/>
15.584 + <sequential>
15.585 + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
15.586 + <customize/>
15.587 + </j2seproject3:junit-debug>
15.588 + </sequential>
15.589 + </macrodef>
15.590 + </target>
15.591 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
15.592 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
15.593 + <attribute default="${main.class}" name="testClass"/>
15.594 + <attribute default="" name="testMethod"/>
15.595 + <element name="customize2" optional="true"/>
15.596 + <sequential>
15.597 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
15.598 + <isset property="test.method"/>
15.599 + </condition>
15.600 + <condition else="-suitename alt2xml-lib-input -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
15.601 + <matches pattern=".*\.xml" string="@{testClass}"/>
15.602 + </condition>
15.603 + <delete dir="${build.test.results.dir}" quiet="true"/>
15.604 + <mkdir dir="${build.test.results.dir}"/>
15.605 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
15.606 + <customize>
15.607 + <customize2/>
15.608 + <jvmarg value="-ea"/>
15.609 + <arg line="${testng.debug.mode}"/>
15.610 + <arg line="-d ${build.test.results.dir}"/>
15.611 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
15.612 + <arg line="${testng.cmd.args}"/>
15.613 + </customize>
15.614 + </j2seproject3:debug>
15.615 + </sequential>
15.616 + </macrodef>
15.617 + </target>
15.618 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
15.619 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
15.620 + <attribute default="${main.class}" name="testClass"/>
15.621 + <attribute default="" name="testMethod"/>
15.622 + <element implicit="true" name="customize2" optional="true"/>
15.623 + <sequential>
15.624 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
15.625 + <customize2/>
15.626 + </j2seproject3:testng-debug>
15.627 + </sequential>
15.628 + </macrodef>
15.629 + </target>
15.630 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
15.631 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
15.632 + <attribute default="${includes}" name="includes"/>
15.633 + <attribute default="${excludes}" name="excludes"/>
15.634 + <attribute default="**" name="testincludes"/>
15.635 + <attribute default="" name="testmethods"/>
15.636 + <attribute default="${main.class}" name="testClass"/>
15.637 + <attribute default="" name="testMethod"/>
15.638 + <sequential>
15.639 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
15.640 + <customize>
15.641 + <classpath>
15.642 + <path path="${run.test.classpath}"/>
15.643 + </classpath>
15.644 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
15.645 + <jvmarg line="${run.jvmargs}"/>
15.646 + <jvmarg line="${run.jvmargs.ide}"/>
15.647 + </customize>
15.648 + </j2seproject3:test-debug-impl>
15.649 + </sequential>
15.650 + </macrodef>
15.651 + </target>
15.652 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
15.653 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
15.654 + <attribute default="${includes}" name="includes"/>
15.655 + <attribute default="${excludes}" name="excludes"/>
15.656 + <attribute default="**" name="testincludes"/>
15.657 + <attribute default="" name="testmethods"/>
15.658 + <attribute default="${main.class}" name="testClass"/>
15.659 + <attribute default="" name="testMethod"/>
15.660 + <sequential>
15.661 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
15.662 + <customize2>
15.663 + <syspropertyset>
15.664 + <propertyref prefix="test-sys-prop."/>
15.665 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
15.666 + </syspropertyset>
15.667 + </customize2>
15.668 + </j2seproject3:testng-debug-impl>
15.669 + </sequential>
15.670 + </macrodef>
15.671 + </target>
15.672 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
15.673 + <!--
15.674 + pre NB7.2 profiling section; consider it deprecated
15.675 + -->
15.676 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
15.677 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
15.678 + <!-- Empty placeholder for easier customization. -->
15.679 + <!-- You can override this target in the ../build.xml file. -->
15.680 + </target>
15.681 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
15.682 + <!-- Empty placeholder for easier customization. -->
15.683 + <!-- You can override this target in the ../build.xml file. -->
15.684 + </target>
15.685 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
15.686 + <macrodef name="resolve">
15.687 + <attribute name="name"/>
15.688 + <attribute name="value"/>
15.689 + <sequential>
15.690 + <property name="@{name}" value="${env.@{value}}"/>
15.691 + </sequential>
15.692 + </macrodef>
15.693 + <macrodef name="profile">
15.694 + <attribute default="${main.class}" name="classname"/>
15.695 + <element name="customize" optional="true"/>
15.696 + <sequential>
15.697 + <property environment="env"/>
15.698 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
15.699 + <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
15.700 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
15.701 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
15.702 + <jvmarg line="${profiler.info.jvmargs}"/>
15.703 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
15.704 + <arg line="${application.args}"/>
15.705 + <classpath>
15.706 + <path path="${run.classpath}"/>
15.707 + </classpath>
15.708 + <syspropertyset>
15.709 + <propertyref prefix="run-sys-prop."/>
15.710 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
15.711 + </syspropertyset>
15.712 + <customize/>
15.713 + </java>
15.714 + </sequential>
15.715 + </macrodef>
15.716 + </target>
15.717 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
15.718 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
15.719 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
15.720 + </target>
15.721 + <!--
15.722 + end of pre NB7.2 profiling section
15.723 + -->
15.724 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
15.725 + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
15.726 + <attribute default="${main.class}" name="name"/>
15.727 + <attribute default="${debug.classpath}" name="classpath"/>
15.728 + <attribute default="" name="stopclassname"/>
15.729 + <sequential>
15.730 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
15.731 + <classpath>
15.732 + <path path="@{classpath}"/>
15.733 + </classpath>
15.734 + </nbjpdastart>
15.735 + </sequential>
15.736 + </macrodef>
15.737 + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
15.738 + <attribute default="${build.classes.dir}" name="dir"/>
15.739 + <sequential>
15.740 + <nbjpdareload>
15.741 + <fileset dir="@{dir}" includes="${fix.classes}">
15.742 + <include name="${fix.includes}*.class"/>
15.743 + </fileset>
15.744 + </nbjpdareload>
15.745 + </sequential>
15.746 + </macrodef>
15.747 + </target>
15.748 + <target name="-init-debug-args">
15.749 + <property name="version-output" value="java version "${ant.java.version}"/>
15.750 + <condition property="have-jdk-older-than-1.4">
15.751 + <or>
15.752 + <contains string="${version-output}" substring="java version "1.0"/>
15.753 + <contains string="${version-output}" substring="java version "1.1"/>
15.754 + <contains string="${version-output}" substring="java version "1.2"/>
15.755 + <contains string="${version-output}" substring="java version "1.3"/>
15.756 + </or>
15.757 + </condition>
15.758 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
15.759 + <istrue value="${have-jdk-older-than-1.4}"/>
15.760 + </condition>
15.761 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
15.762 + <os family="windows"/>
15.763 + </condition>
15.764 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
15.765 + <isset property="debug.transport"/>
15.766 + </condition>
15.767 + </target>
15.768 + <target depends="-init-debug-args" name="-init-macrodef-debug">
15.769 + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
15.770 + <attribute default="${main.class}" name="classname"/>
15.771 + <attribute default="${debug.classpath}" name="classpath"/>
15.772 + <element name="customize" optional="true"/>
15.773 + <sequential>
15.774 + <java classname="@{classname}" dir="${work.dir}" fork="true">
15.775 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
15.776 + <jvmarg line="${debug-args-line}"/>
15.777 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
15.778 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
15.779 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
15.780 + <jvmarg line="${run.jvmargs}"/>
15.781 + <jvmarg line="${run.jvmargs.ide}"/>
15.782 + <classpath>
15.783 + <path path="@{classpath}"/>
15.784 + </classpath>
15.785 + <syspropertyset>
15.786 + <propertyref prefix="run-sys-prop."/>
15.787 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
15.788 + </syspropertyset>
15.789 + <customize/>
15.790 + </java>
15.791 + </sequential>
15.792 + </macrodef>
15.793 + </target>
15.794 + <target name="-init-macrodef-java">
15.795 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
15.796 + <attribute default="${main.class}" name="classname"/>
15.797 + <attribute default="${run.classpath}" name="classpath"/>
15.798 + <attribute default="jvm" name="jvm"/>
15.799 + <element name="customize" optional="true"/>
15.800 + <sequential>
15.801 + <java classname="@{classname}" dir="${work.dir}" fork="true">
15.802 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
15.803 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
15.804 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
15.805 + <jvmarg line="${run.jvmargs}"/>
15.806 + <jvmarg line="${run.jvmargs.ide}"/>
15.807 + <classpath>
15.808 + <path path="@{classpath}"/>
15.809 + </classpath>
15.810 + <syspropertyset>
15.811 + <propertyref prefix="run-sys-prop."/>
15.812 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
15.813 + </syspropertyset>
15.814 + <customize/>
15.815 + </java>
15.816 + </sequential>
15.817 + </macrodef>
15.818 + </target>
15.819 + <target name="-init-macrodef-copylibs">
15.820 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
15.821 + <attribute default="${manifest.file}" name="manifest"/>
15.822 + <element name="customize" optional="true"/>
15.823 + <sequential>
15.824 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
15.825 + <pathconvert property="run.classpath.without.build.classes.dir">
15.826 + <path path="${run.classpath}"/>
15.827 + <map from="${build.classes.dir.resolved}" to=""/>
15.828 + </pathconvert>
15.829 + <pathconvert pathsep=" " property="jar.classpath">
15.830 + <path path="${run.classpath.without.build.classes.dir}"/>
15.831 + <chainedmapper>
15.832 + <flattenmapper/>
15.833 + <filtermapper>
15.834 + <replacestring from=" " to="%20"/>
15.835 + </filtermapper>
15.836 + <globmapper from="*" to="lib/*"/>
15.837 + </chainedmapper>
15.838 + </pathconvert>
15.839 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
15.840 + <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
15.841 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
15.842 + <manifest>
15.843 + <attribute name="Class-Path" value="${jar.classpath}"/>
15.844 + <customize/>
15.845 + </manifest>
15.846 + </copylibs>
15.847 + </sequential>
15.848 + </macrodef>
15.849 + </target>
15.850 + <target name="-init-presetdef-jar">
15.851 + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
15.852 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
15.853 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
15.854 + </jar>
15.855 + </presetdef>
15.856 + </target>
15.857 + <target name="-init-ap-cmdline-properties">
15.858 + <property name="annotation.processing.enabled" value="true"/>
15.859 + <property name="annotation.processing.processors.list" value=""/>
15.860 + <property name="annotation.processing.processor.options" value=""/>
15.861 + <property name="annotation.processing.run.all.processors" value="true"/>
15.862 + <property name="javac.processorpath" value="${javac.classpath}"/>
15.863 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
15.864 + <condition property="ap.supported.internal" value="true">
15.865 + <not>
15.866 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
15.867 + </not>
15.868 + </condition>
15.869 + </target>
15.870 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
15.871 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
15.872 + <isfalse value="${annotation.processing.run.all.processors}"/>
15.873 + </condition>
15.874 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
15.875 + <isfalse value="${annotation.processing.enabled}"/>
15.876 + </condition>
15.877 + </target>
15.878 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
15.879 + <property name="ap.cmd.line.internal" value=""/>
15.880 + </target>
15.881 + <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"/>
15.882 + <!--
15.883 + ===================
15.884 + COMPILATION SECTION
15.885 + ===================
15.886 + -->
15.887 + <target name="-deps-jar-init" unless="built-jar.properties">
15.888 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
15.889 + <delete file="${built-jar.properties}" quiet="true"/>
15.890 + </target>
15.891 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
15.892 + <echo level="warn" message="Cycle detected: alt2xml-lib-input was already built"/>
15.893 + </target>
15.894 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
15.895 + <mkdir dir="${build.dir}"/>
15.896 + <touch file="${built-jar.properties}" verbose="false"/>
15.897 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
15.898 + <antcall target="-warn-already-built-jar"/>
15.899 + <propertyfile file="${built-jar.properties}">
15.900 + <entry key="${basedir}" value=""/>
15.901 + </propertyfile>
15.902 + </target>
15.903 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
15.904 + <target depends="init" name="-check-automatic-build">
15.905 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
15.906 + </target>
15.907 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
15.908 + <antcall target="clean"/>
15.909 + </target>
15.910 + <target depends="init,deps-jar" name="-pre-pre-compile">
15.911 + <mkdir dir="${build.classes.dir}"/>
15.912 + </target>
15.913 + <target name="-pre-compile">
15.914 + <!-- Empty placeholder for easier customization. -->
15.915 + <!-- You can override this target in the ../build.xml file. -->
15.916 + </target>
15.917 + <target if="do.depend.true" name="-compile-depend">
15.918 + <pathconvert property="build.generated.subdirs">
15.919 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
15.920 + <include name="*"/>
15.921 + </dirset>
15.922 + </pathconvert>
15.923 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
15.924 + </target>
15.925 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
15.926 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
15.927 + <copy todir="${build.classes.dir}">
15.928 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
15.929 + </copy>
15.930 + </target>
15.931 + <target if="has.persistence.xml" name="-copy-persistence-xml">
15.932 + <mkdir dir="${build.classes.dir}/META-INF"/>
15.933 + <copy todir="${build.classes.dir}/META-INF">
15.934 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
15.935 + </copy>
15.936 + </target>
15.937 + <target name="-post-compile">
15.938 + <!-- Empty placeholder for easier customization. -->
15.939 + <!-- You can override this target in the ../build.xml file. -->
15.940 + </target>
15.941 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
15.942 + <target name="-pre-compile-single">
15.943 + <!-- Empty placeholder for easier customization. -->
15.944 + <!-- You can override this target in the ../build.xml file. -->
15.945 + </target>
15.946 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
15.947 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
15.948 + <j2seproject3:force-recompile/>
15.949 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
15.950 + </target>
15.951 + <target name="-post-compile-single">
15.952 + <!-- Empty placeholder for easier customization. -->
15.953 + <!-- You can override this target in the ../build.xml file. -->
15.954 + </target>
15.955 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
15.956 + <!--
15.957 + ====================
15.958 + JAR BUILDING SECTION
15.959 + ====================
15.960 + -->
15.961 + <target depends="init" name="-pre-pre-jar">
15.962 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
15.963 + <mkdir dir="${dist.jar.dir}"/>
15.964 + </target>
15.965 + <target name="-pre-jar">
15.966 + <!-- Empty placeholder for easier customization. -->
15.967 + <!-- You can override this target in the ../build.xml file. -->
15.968 + </target>
15.969 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
15.970 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
15.971 + <touch file="${tmp.manifest.file}" verbose="false"/>
15.972 + </target>
15.973 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
15.974 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
15.975 + <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
15.976 + </target>
15.977 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
15.978 + <manifest file="${tmp.manifest.file}" mode="update">
15.979 + <attribute name="Main-Class" value="${main.class}"/>
15.980 + </manifest>
15.981 + </target>
15.982 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
15.983 + <manifest file="${tmp.manifest.file}" mode="update">
15.984 + <attribute name="Profile" value="${javac.profile}"/>
15.985 + </manifest>
15.986 + </target>
15.987 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
15.988 + <basename file="${application.splash}" property="splashscreen.basename"/>
15.989 + <mkdir dir="${build.classes.dir}/META-INF"/>
15.990 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
15.991 + <manifest file="${tmp.manifest.file}" mode="update">
15.992 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
15.993 + </manifest>
15.994 + </target>
15.995 + <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">
15.996 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
15.997 + <echo level="info">To run this application from the command line without Ant, try:</echo>
15.998 + <property location="${dist.jar}" name="dist.jar.resolved"/>
15.999 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
15.1000 + </target>
15.1001 + <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">
15.1002 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
15.1003 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
15.1004 + <property location="${dist.jar}" name="dist.jar.resolved"/>
15.1005 + <pathconvert property="run.classpath.with.dist.jar">
15.1006 + <path path="${run.classpath}"/>
15.1007 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
15.1008 + </pathconvert>
15.1009 + <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}">
15.1010 + <isset property="main.class.available"/>
15.1011 + </condition>
15.1012 + <condition else="debug" property="jar.usage.level" value="info">
15.1013 + <isset property="main.class.available"/>
15.1014 + </condition>
15.1015 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
15.1016 + </target>
15.1017 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
15.1018 + <delete>
15.1019 + <fileset file="${tmp.manifest.file}"/>
15.1020 + </delete>
15.1021 + </target>
15.1022 + <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"/>
15.1023 + <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"/>
15.1024 + <target name="-post-jar">
15.1025 + <!-- Empty placeholder for easier customization. -->
15.1026 + <!-- You can override this target in the ../build.xml file. -->
15.1027 + </target>
15.1028 + <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
15.1029 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
15.1030 + <!--
15.1031 + =================
15.1032 + EXECUTION SECTION
15.1033 + =================
15.1034 + -->
15.1035 + <target depends="init,compile" description="Run a main class." name="run">
15.1036 + <j2seproject1:java>
15.1037 + <customize>
15.1038 + <arg line="${application.args}"/>
15.1039 + </customize>
15.1040 + </j2seproject1:java>
15.1041 + </target>
15.1042 + <target name="-do-not-recompile">
15.1043 + <property name="javac.includes.binary" value=""/>
15.1044 + </target>
15.1045 + <target depends="init,compile-single" name="run-single">
15.1046 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
15.1047 + <j2seproject1:java classname="${run.class}"/>
15.1048 + </target>
15.1049 + <target depends="init,compile-test-single" name="run-test-with-main">
15.1050 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
15.1051 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
15.1052 + </target>
15.1053 + <!--
15.1054 + =================
15.1055 + DEBUGGING SECTION
15.1056 + =================
15.1057 + -->
15.1058 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
15.1059 + <j2seproject1:nbjpdastart name="${debug.class}"/>
15.1060 + </target>
15.1061 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
15.1062 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
15.1063 + </target>
15.1064 + <target depends="init,compile" name="-debug-start-debuggee">
15.1065 + <j2seproject3:debug>
15.1066 + <customize>
15.1067 + <arg line="${application.args}"/>
15.1068 + </customize>
15.1069 + </j2seproject3:debug>
15.1070 + </target>
15.1071 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
15.1072 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
15.1073 + <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
15.1074 + </target>
15.1075 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
15.1076 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
15.1077 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
15.1078 + <j2seproject3:debug classname="${debug.class}"/>
15.1079 + </target>
15.1080 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
15.1081 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
15.1082 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
15.1083 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
15.1084 + </target>
15.1085 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
15.1086 + <target depends="init" name="-pre-debug-fix">
15.1087 + <fail unless="fix.includes">Must set fix.includes</fail>
15.1088 + <property name="javac.includes" value="${fix.includes}.java"/>
15.1089 + </target>
15.1090 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
15.1091 + <j2seproject1:nbjpdareload/>
15.1092 + </target>
15.1093 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
15.1094 + <!--
15.1095 + =================
15.1096 + PROFILING SECTION
15.1097 + =================
15.1098 + -->
15.1099 + <!--
15.1100 + pre NB7.2 profiler integration
15.1101 + -->
15.1102 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
15.1103 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
15.1104 + <nbprofiledirect>
15.1105 + <classpath>
15.1106 + <path path="${run.classpath}"/>
15.1107 + </classpath>
15.1108 + </nbprofiledirect>
15.1109 + <profile/>
15.1110 + </target>
15.1111 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
15.1112 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
15.1113 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
15.1114 + <nbprofiledirect>
15.1115 + <classpath>
15.1116 + <path path="${run.classpath}"/>
15.1117 + </classpath>
15.1118 + </nbprofiledirect>
15.1119 + <profile classname="${profile.class}"/>
15.1120 + </target>
15.1121 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
15.1122 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
15.1123 + <nbprofiledirect>
15.1124 + <classpath>
15.1125 + <path path="${run.classpath}"/>
15.1126 + </classpath>
15.1127 + </nbprofiledirect>
15.1128 + <profile classname="sun.applet.AppletViewer">
15.1129 + <customize>
15.1130 + <arg value="${applet.url}"/>
15.1131 + </customize>
15.1132 + </profile>
15.1133 + </target>
15.1134 + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
15.1135 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
15.1136 + <nbprofiledirect>
15.1137 + <classpath>
15.1138 + <path path="${run.test.classpath}"/>
15.1139 + </classpath>
15.1140 + </nbprofiledirect>
15.1141 + <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
15.1142 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
15.1143 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
15.1144 + <jvmarg line="${profiler.info.jvmargs}"/>
15.1145 + <test name="${profile.class}"/>
15.1146 + <classpath>
15.1147 + <path path="${run.test.classpath}"/>
15.1148 + </classpath>
15.1149 + <syspropertyset>
15.1150 + <propertyref prefix="test-sys-prop."/>
15.1151 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
15.1152 + </syspropertyset>
15.1153 + <formatter type="brief" usefile="false"/>
15.1154 + <formatter type="xml"/>
15.1155 + </junit>
15.1156 + </target>
15.1157 + <!--
15.1158 + end of pre NB72 profiling section
15.1159 + -->
15.1160 + <target if="netbeans.home" name="-profile-check">
15.1161 + <condition property="profiler.configured">
15.1162 + <or>
15.1163 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
15.1164 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
15.1165 + </or>
15.1166 + </condition>
15.1167 + </target>
15.1168 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
15.1169 + <startprofiler/>
15.1170 + <antcall target="run"/>
15.1171 + </target>
15.1172 + <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">
15.1173 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
15.1174 + <startprofiler/>
15.1175 + <antcall target="run-single"/>
15.1176 + </target>
15.1177 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
15.1178 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
15.1179 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
15.1180 + <startprofiler/>
15.1181 + <antcall target="test-single"/>
15.1182 + </target>
15.1183 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
15.1184 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
15.1185 + <startprofiler/>
15.1186 + <antcal target="run-test-with-main"/>
15.1187 + </target>
15.1188 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
15.1189 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
15.1190 + <startprofiler/>
15.1191 + <antcall target="run-applet"/>
15.1192 + </target>
15.1193 + <!--
15.1194 + ===============
15.1195 + JAVADOC SECTION
15.1196 + ===============
15.1197 + -->
15.1198 + <target depends="init" if="have.sources" name="-javadoc-build">
15.1199 + <mkdir dir="${dist.javadoc.dir}"/>
15.1200 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
15.1201 + <and>
15.1202 + <isset property="endorsed.classpath.cmd.line.arg"/>
15.1203 + <not>
15.1204 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
15.1205 + </not>
15.1206 + </and>
15.1207 + </condition>
15.1208 + <condition else="" property="bug5101868workaround" value="*.java">
15.1209 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
15.1210 + </condition>
15.1211 + <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}">
15.1212 + <classpath>
15.1213 + <path path="${javac.classpath}"/>
15.1214 + </classpath>
15.1215 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
15.1216 + <filename name="**/*.java"/>
15.1217 + </fileset>
15.1218 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
15.1219 + <include name="**/*.java"/>
15.1220 + <exclude name="*.java"/>
15.1221 + </fileset>
15.1222 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
15.1223 + </javadoc>
15.1224 + <copy todir="${dist.javadoc.dir}">
15.1225 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
15.1226 + <filename name="**/doc-files/**"/>
15.1227 + </fileset>
15.1228 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
15.1229 + <include name="**/doc-files/**"/>
15.1230 + </fileset>
15.1231 + </copy>
15.1232 + </target>
15.1233 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
15.1234 + <nbbrowse file="${dist.javadoc.dir}/index.html"/>
15.1235 + </target>
15.1236 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
15.1237 + <!--
15.1238 + =========================
15.1239 + TEST COMPILATION SECTION
15.1240 + =========================
15.1241 + -->
15.1242 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
15.1243 + <mkdir dir="${build.test.classes.dir}"/>
15.1244 + </target>
15.1245 + <target name="-pre-compile-test">
15.1246 + <!-- Empty placeholder for easier customization. -->
15.1247 + <!-- You can override this target in the ../build.xml file. -->
15.1248 + </target>
15.1249 + <target if="do.depend.true" name="-compile-test-depend">
15.1250 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
15.1251 + </target>
15.1252 + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
15.1253 + <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}"/>
15.1254 + <copy todir="${build.test.classes.dir}">
15.1255 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
15.1256 + </copy>
15.1257 + </target>
15.1258 + <target name="-post-compile-test">
15.1259 + <!-- Empty placeholder for easier customization. -->
15.1260 + <!-- You can override this target in the ../build.xml file. -->
15.1261 + </target>
15.1262 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
15.1263 + <target name="-pre-compile-test-single">
15.1264 + <!-- Empty placeholder for easier customization. -->
15.1265 + <!-- You can override this target in the ../build.xml file. -->
15.1266 + </target>
15.1267 + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
15.1268 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
15.1269 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
15.1270 + <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}"/>
15.1271 + <copy todir="${build.test.classes.dir}">
15.1272 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
15.1273 + </copy>
15.1274 + </target>
15.1275 + <target name="-post-compile-test-single">
15.1276 + <!-- Empty placeholder for easier customization. -->
15.1277 + <!-- You can override this target in the ../build.xml file. -->
15.1278 + </target>
15.1279 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
15.1280 + <!--
15.1281 + =======================
15.1282 + TEST EXECUTION SECTION
15.1283 + =======================
15.1284 + -->
15.1285 + <target depends="init" if="have.tests" name="-pre-test-run">
15.1286 + <mkdir dir="${build.test.results.dir}"/>
15.1287 + </target>
15.1288 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
15.1289 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
15.1290 + </target>
15.1291 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
15.1292 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
15.1293 + </target>
15.1294 + <target depends="init" if="have.tests" name="test-report"/>
15.1295 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
15.1296 + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
15.1297 + <target depends="init" if="have.tests" name="-pre-test-run-single">
15.1298 + <mkdir dir="${build.test.results.dir}"/>
15.1299 + </target>
15.1300 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
15.1301 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
15.1302 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
15.1303 + </target>
15.1304 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
15.1305 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
15.1306 + </target>
15.1307 + <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"/>
15.1308 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
15.1309 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
15.1310 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
15.1311 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
15.1312 + </target>
15.1313 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
15.1314 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
15.1315 + </target>
15.1316 + <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"/>
15.1317 + <!--
15.1318 + =======================
15.1319 + TEST DEBUGGING SECTION
15.1320 + =======================
15.1321 + -->
15.1322 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
15.1323 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
15.1324 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
15.1325 + </target>
15.1326 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
15.1327 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
15.1328 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
15.1329 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
15.1330 + </target>
15.1331 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
15.1332 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
15.1333 + </target>
15.1334 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
15.1335 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
15.1336 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
15.1337 + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
15.1338 + </target>
15.1339 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
15.1340 + <!--
15.1341 + =========================
15.1342 + APPLET EXECUTION SECTION
15.1343 + =========================
15.1344 + -->
15.1345 + <target depends="init,compile-single" name="run-applet">
15.1346 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
15.1347 + <j2seproject1:java classname="sun.applet.AppletViewer">
15.1348 + <customize>
15.1349 + <arg value="${applet.url}"/>
15.1350 + </customize>
15.1351 + </j2seproject1:java>
15.1352 + </target>
15.1353 + <!--
15.1354 + =========================
15.1355 + APPLET DEBUGGING SECTION
15.1356 + =========================
15.1357 + -->
15.1358 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
15.1359 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
15.1360 + <j2seproject3:debug classname="sun.applet.AppletViewer">
15.1361 + <customize>
15.1362 + <arg value="${applet.url}"/>
15.1363 + </customize>
15.1364 + </j2seproject3:debug>
15.1365 + </target>
15.1366 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
15.1367 + <!--
15.1368 + ===============
15.1369 + CLEANUP SECTION
15.1370 + ===============
15.1371 + -->
15.1372 + <target name="-deps-clean-init" unless="built-clean.properties">
15.1373 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
15.1374 + <delete file="${built-clean.properties}" quiet="true"/>
15.1375 + </target>
15.1376 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
15.1377 + <echo level="warn" message="Cycle detected: alt2xml-lib-input was already built"/>
15.1378 + </target>
15.1379 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
15.1380 + <mkdir dir="${build.dir}"/>
15.1381 + <touch file="${built-clean.properties}" verbose="false"/>
15.1382 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
15.1383 + <antcall target="-warn-already-built-clean"/>
15.1384 + <propertyfile file="${built-clean.properties}">
15.1385 + <entry key="${basedir}" value=""/>
15.1386 + </propertyfile>
15.1387 + </target>
15.1388 + <target depends="init" name="-do-clean">
15.1389 + <delete dir="${build.dir}"/>
15.1390 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
15.1391 + </target>
15.1392 + <target name="-post-clean">
15.1393 + <!-- Empty placeholder for easier customization. -->
15.1394 + <!-- You can override this target in the ../build.xml file. -->
15.1395 + </target>
15.1396 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
15.1397 + <target name="-check-call-dep">
15.1398 + <property file="${call.built.properties}" prefix="already.built."/>
15.1399 + <condition property="should.call.dep">
15.1400 + <and>
15.1401 + <not>
15.1402 + <isset property="already.built.${call.subproject}"/>
15.1403 + </not>
15.1404 + <available file="${call.script}"/>
15.1405 + </and>
15.1406 + </condition>
15.1407 + </target>
15.1408 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
15.1409 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
15.1410 + <propertyset>
15.1411 + <propertyref prefix="transfer."/>
15.1412 + <mapper from="transfer.*" to="*" type="glob"/>
15.1413 + </propertyset>
15.1414 + </ant>
15.1415 + </target>
15.1416 +</project>
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/java/alt2xml-lib-input/nbproject/genfiles.properties Sat Jun 07 22:09:32 2014 +0200
16.3 @@ -0,0 +1,8 @@
16.4 +build.xml.data.CRC32=0525abf5
16.5 +build.xml.script.CRC32=4245728b
16.6 +build.xml.stylesheet.CRC32=8064a381@1.74.2.48
16.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
16.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
16.9 +nbproject/build-impl.xml.data.CRC32=0525abf5
16.10 +nbproject/build-impl.xml.script.CRC32=9bda5398
16.11 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.2.48
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/java/alt2xml-lib-input/nbproject/project.properties Sat Jun 07 22:09:32 2014 +0200
17.3 @@ -0,0 +1,71 @@
17.4 +annotation.processing.enabled=true
17.5 +annotation.processing.enabled.in.editor=false
17.6 +annotation.processing.processor.options=
17.7 +annotation.processing.processors.list=
17.8 +annotation.processing.run.all.processors=true
17.9 +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
17.10 +build.classes.dir=${build.dir}/classes
17.11 +build.classes.excludes=**/*.java,**/*.form
17.12 +# This directory is removed when the project is cleaned:
17.13 +build.dir=build
17.14 +build.generated.dir=${build.dir}/generated
17.15 +build.generated.sources.dir=${build.dir}/generated-sources
17.16 +# Only compile against the classpath explicitly listed here:
17.17 +build.sysclasspath=ignore
17.18 +build.test.classes.dir=${build.dir}/test/classes
17.19 +build.test.results.dir=${build.dir}/test/results
17.20 +# Uncomment to specify the preferred debugger connection transport:
17.21 +#debug.transport=dt_socket
17.22 +debug.classpath=\
17.23 + ${run.classpath}
17.24 +debug.test.classpath=\
17.25 + ${run.test.classpath}
17.26 +# Files in build.classes.dir which should be excluded from distribution jar
17.27 +dist.archive.excludes=
17.28 +# This directory is removed when the project is cleaned:
17.29 +dist.dir=dist
17.30 +dist.jar=${dist.dir}/alt2xml-lib-input.jar
17.31 +dist.javadoc.dir=${dist.dir}/javadoc
17.32 +excludes=
17.33 +includes=**
17.34 +jar.compress=false
17.35 +javac.classpath=
17.36 +# Space-separated list of extra javac options
17.37 +javac.compilerargs=
17.38 +javac.deprecation=false
17.39 +javac.processorpath=\
17.40 + ${javac.classpath}
17.41 +javac.source=1.7
17.42 +javac.target=1.7
17.43 +javac.test.classpath=\
17.44 + ${javac.classpath}:\
17.45 + ${build.classes.dir}
17.46 +javac.test.processorpath=\
17.47 + ${javac.test.classpath}
17.48 +javadoc.additionalparam=
17.49 +javadoc.author=false
17.50 +javadoc.encoding=${source.encoding}
17.51 +javadoc.noindex=false
17.52 +javadoc.nonavbar=false
17.53 +javadoc.notree=false
17.54 +javadoc.private=false
17.55 +javadoc.splitindex=true
17.56 +javadoc.use=true
17.57 +javadoc.version=false
17.58 +javadoc.windowtitle=
17.59 +meta.inf.dir=${src.dir}/META-INF
17.60 +mkdist.disabled=true
17.61 +platform.active=default_platform
17.62 +run.classpath=\
17.63 + ${javac.classpath}:\
17.64 + ${build.classes.dir}
17.65 +# Space-separated list of JVM arguments used when running the project.
17.66 +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
17.67 +# To set system properties for unit tests define test-sys-prop.name=value:
17.68 +run.jvmargs=
17.69 +run.test.classpath=\
17.70 + ${javac.test.classpath}:\
17.71 + ${build.test.classes.dir}
17.72 +source.encoding=UTF-8
17.73 +src.dir=src
17.74 +test.src.dir=test
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/java/alt2xml-lib-input/nbproject/project.xml Sat Jun 07 22:09:32 2014 +0200
18.3 @@ -0,0 +1,15 @@
18.4 +<?xml version="1.0" encoding="UTF-8"?>
18.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
18.6 + <type>org.netbeans.modules.java.j2seproject</type>
18.7 + <configuration>
18.8 + <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
18.9 + <name>alt2xml-lib-input</name>
18.10 + <source-roots>
18.11 + <root id="src.dir"/>
18.12 + </source-roots>
18.13 + <test-roots>
18.14 + <root id="test.src.dir"/>
18.15 + </test-roots>
18.16 + </data>
18.17 + </configuration>
18.18 +</project>
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/AbstractAlt2XmlReader.java Sat Jun 07 22:09:32 2014 +0200
19.3 @@ -0,0 +1,116 @@
19.4 +/**
19.5 + * Alt2XML
19.6 + * Copyright © 2014 František Kučera (frantovo.cz)
19.7 + *
19.8 + * This program is free software: you can redistribute it and/or modify
19.9 + * it under the terms of the GNU General Public License as published by
19.10 + * the Free Software Foundation, either version 3 of the License, or
19.11 + * (at your option) any later version.
19.12 + *
19.13 + * This program is distributed in the hope that it will be useful,
19.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
19.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19.16 + * GNU General Public License for more details.
19.17 + *
19.18 + * You should have received a copy of the GNU General Public License
19.19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
19.20 + */
19.21 +package cz.frantovo.alt2xml;
19.22 +
19.23 +import java.io.IOException;
19.24 +import java.util.HashMap;
19.25 +import java.util.Map;
19.26 +import org.xml.sax.ContentHandler;
19.27 +import org.xml.sax.DTDHandler;
19.28 +import org.xml.sax.EntityResolver;
19.29 +import org.xml.sax.ErrorHandler;
19.30 +import org.xml.sax.InputSource;
19.31 +import org.xml.sax.SAXException;
19.32 +import org.xml.sax.SAXNotRecognizedException;
19.33 +import org.xml.sax.SAXNotSupportedException;
19.34 +import org.xml.sax.XMLReader;
19.35 +
19.36 +/**
19.37 + * Recommended base class for all alternative format readers.
19.38 + *
19.39 + * @author Ing. František Kučera (frantovo.cz)
19.40 + */
19.41 +public abstract class AbstractAlt2XmlReader implements XMLReader {
19.42 +
19.43 + protected ContentHandler contentHandler;
19.44 + protected ErrorHandler errorHandler;
19.45 + protected DTDHandler dtdHandler;
19.46 + protected EntityResolver entityResolver;
19.47 + protected Map<String, Object> properties = new HashMap<>();
19.48 +
19.49 + @Override
19.50 + public void parse(String systemId) throws IOException, SAXException {
19.51 + parse(new InputSource(systemId));
19.52 + }
19.53 +
19.54 + @Override
19.55 + public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
19.56 + /**
19.57 + * TODO:
19.58 + * All XMLReaders are required to recognize
19.59 + * the http://xml.org/sax/features/namespaces
19.60 + * and the http://xml.org/sax/features/namespace-prefixes feature names.
19.61 + */
19.62 + throw new SAXNotSupportedException("Zatím není podporováno.");
19.63 + }
19.64 +
19.65 + @Override
19.66 + public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
19.67 + throw new SAXNotSupportedException("Zatím není podporováno.");
19.68 + }
19.69 +
19.70 + @Override
19.71 + public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
19.72 + return properties.get(name);
19.73 + }
19.74 +
19.75 + @Override
19.76 + public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
19.77 + properties.put(name, value);
19.78 + }
19.79 +
19.80 + @Override
19.81 + public void setEntityResolver(EntityResolver entityResolver) {
19.82 + this.entityResolver = entityResolver;
19.83 + }
19.84 +
19.85 + @Override
19.86 + public EntityResolver getEntityResolver() {
19.87 + return entityResolver;
19.88 + }
19.89 +
19.90 + @Override
19.91 + public void setDTDHandler(DTDHandler dtdHandler) {
19.92 + this.dtdHandler = dtdHandler;
19.93 + }
19.94 +
19.95 + @Override
19.96 + public DTDHandler getDTDHandler() {
19.97 + return dtdHandler;
19.98 + }
19.99 +
19.100 + @Override
19.101 + public void setContentHandler(ContentHandler contentHandler) {
19.102 + this.contentHandler = contentHandler;
19.103 + }
19.104 +
19.105 + @Override
19.106 + public ContentHandler getContentHandler() {
19.107 + return contentHandler;
19.108 + }
19.109 +
19.110 + @Override
19.111 + public void setErrorHandler(ErrorHandler errorHandler) {
19.112 + this.errorHandler = errorHandler;
19.113 + }
19.114 +
19.115 + @Override
19.116 + public ErrorHandler getErrorHandler() {
19.117 + return errorHandler;
19.118 + }
19.119 +}
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20.2 +++ b/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/Alt2XmlReaderFactory.java Sat Jun 07 22:09:32 2014 +0200
20.3 @@ -0,0 +1,35 @@
20.4 +/**
20.5 + * Alt2XML
20.6 + * Copyright © 2014 František Kučera (frantovo.cz)
20.7 + *
20.8 + * This program is free software: you can redistribute it and/or modify
20.9 + * it under the terms of the GNU General Public License as published by
20.10 + * the Free Software Foundation, either version 3 of the License, or
20.11 + * (at your option) any later version.
20.12 + *
20.13 + * This program is distributed in the hope that it will be useful,
20.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
20.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20.16 + * GNU General Public License for more details.
20.17 + *
20.18 + * You should have received a copy of the GNU General Public License
20.19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
20.20 + */
20.21 +package cz.frantovo.alt2xml;
20.22 +
20.23 +import org.xml.sax.XMLReader;
20.24 +
20.25 +/**
20.26 + *
20.27 + * @author Ing. František Kučera (frantovo.cz)
20.28 + */
20.29 +public interface Alt2XmlReaderFactory {
20.30 +
20.31 + /**
20.32 + * @param systemId system ID of the document to be read
20.33 + * @return whether this alternative format is supported
20.34 + */
20.35 + public boolean canRead(String systemId);
20.36 +
20.37 + public XMLReader getReader();
20.38 +}
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
21.2 +++ b/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/Alt2XmlRegexReaderFactory.java Sat Jun 07 22:09:32 2014 +0200
21.3 @@ -0,0 +1,36 @@
21.4 +/**
21.5 + * Alt2XML
21.6 + * Copyright © 2014 František Kučera (frantovo.cz)
21.7 + *
21.8 + * This program is free software: you can redistribute it and/or modify
21.9 + * it under the terms of the GNU General Public License as published by
21.10 + * the Free Software Foundation, either version 3 of the License, or
21.11 + * (at your option) any later version.
21.12 + *
21.13 + * This program is distributed in the hope that it will be useful,
21.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21.16 + * GNU General Public License for more details.
21.17 + *
21.18 + * You should have received a copy of the GNU General Public License
21.19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
21.20 + */
21.21 +package cz.frantovo.alt2xml;
21.22 +
21.23 +import java.util.regex.Pattern;
21.24 +
21.25 +/**
21.26 + * Factory for XMLReaders that can read documents with systemId defined by given pattern (typically
21.27 + * file extension like .ini, .properties etc.)
21.28 + *
21.29 + * @author Ing. František Kučera (frantovo.cz)
21.30 + */
21.31 +public abstract class Alt2XmlRegexReaderFactory implements Alt2XmlReaderFactory {
21.32 +
21.33 + protected abstract Pattern getSystemIdPattern();
21.34 +
21.35 + @Override
21.36 + public boolean canRead(String systemId) {
21.37 + return getSystemIdPattern().matcher(systemId).matches();
21.38 + }
21.39 +}
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
22.2 +++ b/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/AltInputSource.java Sat Jun 07 22:09:32 2014 +0200
22.3 @@ -0,0 +1,127 @@
22.4 +/**
22.5 + * Alt2XML
22.6 + * Copyright © 2014 František Kučera (frantovo.cz)
22.7 + *
22.8 + * This program is free software: you can redistribute it and/or modify
22.9 + * it under the terms of the GNU General Public License as published by
22.10 + * the Free Software Foundation, either version 3 of the License, or
22.11 + * (at your option) any later version.
22.12 + *
22.13 + * This program is distributed in the hope that it will be useful,
22.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
22.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22.16 + * GNU General Public License for more details.
22.17 + *
22.18 + * You should have received a copy of the GNU General Public License
22.19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
22.20 + */
22.21 +package cz.frantovo.alt2xml;
22.22 +
22.23 +import java.io.IOException;
22.24 +import java.io.InputStream;
22.25 +import java.io.InputStreamReader;
22.26 +import java.io.Reader;
22.27 +import java.io.UnsupportedEncodingException;
22.28 +import java.net.MalformedURLException;
22.29 +import java.net.URL;
22.30 +import java.util.logging.Level;
22.31 +import java.util.logging.Logger;
22.32 +import org.xml.sax.EntityResolver;
22.33 +import org.xml.sax.InputSource;
22.34 +import org.xml.sax.SAXException;
22.35 +
22.36 +/**
22.37 + *
22.38 + * @author Ing. František Kučera (frantovo.cz)
22.39 + */
22.40 +public class AltInputSource extends InputSource {
22.41 +
22.42 + private final EntityResolver entityResolver;
22.43 + private final InputSource originalSource;
22.44 +
22.45 + private static final Logger log = Logger.getLogger(AltInputSource.class.getName());
22.46 +
22.47 + public AltInputSource(EntityResolver entityResolver, InputSource originalSource) {
22.48 + this.entityResolver = entityResolver;
22.49 + this.originalSource = originalSource;
22.50 + }
22.51 +
22.52 + @Override
22.53 + public InputStream getByteStream() {
22.54 + InputStream originalStream = originalSource.getByteStream();
22.55 +
22.56 + if (originalStream == null) {
22.57 +
22.58 + InputSource source = originalSource;
22.59 +
22.60 + if (entityResolver != null) {
22.61 + try {
22.62 + InputSource resolvedSource = entityResolver.resolveEntity(originalSource.getSystemId(), originalSource.getSystemId());
22.63 + if (resolvedSource != null) {
22.64 + source = resolvedSource;
22.65 + }
22.66 + } catch (IOException | SAXException e) {
22.67 + log.log(Level.WARNING, "Error while resolving InputSource – publicId: " + originalSource.getPublicId() + " systemId: " + originalSource.getSystemId(), e);
22.68 + }
22.69 + }
22.70 +
22.71 + InputStream resolvedStream = source.getByteStream();
22.72 +
22.73 + if (resolvedStream == null) {
22.74 +
22.75 + try {
22.76 + URL url = new URL(source.getSystemId());
22.77 + return url.openStream();
22.78 + } catch (MalformedURLException e) {
22.79 + log.log(Level.WARNING, "Invalid SystemId URL syntax: " + originalSource.getSystemId(), e);
22.80 + return null;
22.81 + } catch (IOException e) {
22.82 + log.log(Level.WARNING, "Unable to open stream for systemId: " + originalSource.getSystemId(), e);
22.83 + return null;
22.84 + }
22.85 + } else {
22.86 + return resolvedStream;
22.87 + }
22.88 +
22.89 + } else {
22.90 + return originalStream;
22.91 + }
22.92 + }
22.93 +
22.94 + @Override
22.95 + public Reader getCharacterStream() {
22.96 + Reader originalStream = originalSource.getCharacterStream();
22.97 +
22.98 + if (originalStream == null) {
22.99 + String encoding = getEncoding();
22.100 +
22.101 + if (encoding == null) {
22.102 + return new InputStreamReader(getByteStream());
22.103 + } else {
22.104 + try {
22.105 + return new InputStreamReader(getByteStream(), encoding);
22.106 + } catch (UnsupportedEncodingException e) {
22.107 + log.log(Level.WARNING, "Invalid encoding: " + encoding, e);
22.108 + return null;
22.109 + }
22.110 + }
22.111 + } else {
22.112 + return originalStream;
22.113 + }
22.114 + }
22.115 +
22.116 + @Override
22.117 + public String getEncoding() {
22.118 + return originalSource.getEncoding();
22.119 + }
22.120 +
22.121 + @Override
22.122 + public String getPublicId() {
22.123 + return originalSource.getPublicId();
22.124 + }
22.125 +
22.126 + @Override
22.127 + public String getSystemId() {
22.128 + return originalSource.getSystemId();
22.129 + }
22.130 +}
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
23.2 +++ b/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/ParserFactory.java Sat Jun 07 22:09:32 2014 +0200
23.3 @@ -0,0 +1,112 @@
23.4 +/**
23.5 + * Alt2XML
23.6 + * Copyright © 2014 František Kučera (frantovo.cz)
23.7 + *
23.8 + * This program is free software: you can redistribute it and/or modify
23.9 + * it under the terms of the GNU General Public License as published by
23.10 + * the Free Software Foundation, either version 3 of the License, or
23.11 + * (at your option) any later version.
23.12 + *
23.13 + * This program is distributed in the hope that it will be useful,
23.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
23.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23.16 + * GNU General Public License for more details.
23.17 + *
23.18 + * You should have received a copy of the GNU General Public License
23.19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
23.20 + */
23.21 +package cz.frantovo.alt2xml;
23.22 +
23.23 +import java.util.Deque;
23.24 +import java.util.LinkedList;
23.25 +import java.util.ServiceLoader;
23.26 +import javax.xml.parsers.ParserConfigurationException;
23.27 +import javax.xml.parsers.SAXParser;
23.28 +import javax.xml.parsers.SAXParserFactory;
23.29 +import org.xml.sax.Parser;
23.30 +import org.xml.sax.SAXException;
23.31 +import org.xml.sax.SAXNotRecognizedException;
23.32 +import org.xml.sax.SAXNotSupportedException;
23.33 +import org.xml.sax.XMLReader;
23.34 +
23.35 +/**
23.36 + *
23.37 + * @author Ing. František Kučera (frantovo.cz)
23.38 + */
23.39 +public class ParserFactory extends SAXParserFactory implements ReaderFinder {
23.40 +
23.41 + private final Deque<Alt2XmlReaderFactory> readerFactories = new LinkedList();
23.42 +
23.43 + public ParserFactory() {
23.44 + super();
23.45 + for (Alt2XmlReaderFactory f : ServiceLoader.load(Alt2XmlReaderFactory.class)) {
23.46 + readerFactories.add(f);
23.47 + }
23.48 +
23.49 + }
23.50 +
23.51 + @Override
23.52 + public XMLReader findReader(String systemId) throws SAXException {
23.53 + for (Alt2XmlReaderFactory f : readerFactories) {
23.54 + if (f.canRead(systemId)) {
23.55 + return f.getReader();
23.56 + }
23.57 + }
23.58 + throw new SAXException("Iterated over " + readerFactories.size() + " and was unable to find XMLReader for SystemId: " + systemId);
23.59 + }
23.60 +
23.61 + @Override
23.62 + public SAXParser newSAXParser() throws ParserConfigurationException, SAXException {
23.63 + return new AltSAXParser(new SuperReader(this));
23.64 + }
23.65 +
23.66 + @Override
23.67 + public void setFeature(String name, boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException {
23.68 + throw new SAXNotSupportedException("Zatím není podporováno.");
23.69 + }
23.70 +
23.71 + @Override
23.72 + public boolean getFeature(String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException {
23.73 + throw new SAXNotSupportedException("Zatím není podporováno.");
23.74 + }
23.75 +
23.76 + private static class AltSAXParser extends SAXParser {
23.77 +
23.78 + private XMLReader xmlReader;
23.79 +
23.80 + public AltSAXParser(XMLReader xmlReader) {
23.81 + this.xmlReader = xmlReader;
23.82 + }
23.83 +
23.84 + @Override
23.85 + @Deprecated
23.86 + public Parser getParser() throws SAXException {
23.87 + throw new SAXException("Není podporováno.");
23.88 + }
23.89 +
23.90 + @Override
23.91 + public XMLReader getXMLReader() throws SAXException {
23.92 + return xmlReader;
23.93 + }
23.94 +
23.95 + @Override
23.96 + public boolean isNamespaceAware() {
23.97 + return true;
23.98 + }
23.99 +
23.100 + @Override
23.101 + public boolean isValidating() {
23.102 + return false;
23.103 + }
23.104 +
23.105 + @Override
23.106 + public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
23.107 + xmlReader.setProperty(name, value);
23.108 + }
23.109 +
23.110 + @Override
23.111 + public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
23.112 + return xmlReader.getProperty(name);
23.113 + }
23.114 + }
23.115 +}
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
24.2 +++ b/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/ReaderFinder.java Sat Jun 07 22:09:32 2014 +0200
24.3 @@ -0,0 +1,20 @@
24.4 +package cz.frantovo.alt2xml;
24.5 +
24.6 +import org.xml.sax.SAXException;
24.7 +import org.xml.sax.XMLReader;
24.8 +
24.9 +/**
24.10 + *
24.11 + * @author Ing. František Kučera (frantovo.cz)
24.12 + */
24.13 +public interface ReaderFinder {
24.14 +
24.15 + /**
24.16 + *
24.17 + * @param systemId systemId of the document which should be parsed
24.18 + * @return XMLReader appropriate for this document
24.19 + * @throws org.xml.sax.SAXException if we have no reader for given systemId
24.20 + */
24.21 + public XMLReader findReader(String systemId) throws SAXException;
24.22 +
24.23 +}
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
25.2 +++ b/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/SuperReader.java Sat Jun 07 22:09:32 2014 +0200
25.3 @@ -0,0 +1,148 @@
25.4 +/**
25.5 + * Alt2XML
25.6 + * Copyright © 2014 František Kučera (frantovo.cz)
25.7 + *
25.8 + * This program is free software: you can redistribute it and/or modify
25.9 + * it under the terms of the GNU General Public License as published by
25.10 + * the Free Software Foundation, either version 3 of the License, or
25.11 + * (at your option) any later version.
25.12 + *
25.13 + * This program is distributed in the hope that it will be useful,
25.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
25.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25.16 + * GNU General Public License for more details.
25.17 + *
25.18 + * You should have received a copy of the GNU General Public License
25.19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
25.20 + */
25.21 +package cz.frantovo.alt2xml;
25.22 +
25.23 +import java.io.IOException;
25.24 +import java.util.HashMap;
25.25 +import java.util.Map;
25.26 +import java.util.Map.Entry;
25.27 +import org.xml.sax.ContentHandler;
25.28 +import org.xml.sax.DTDHandler;
25.29 +import org.xml.sax.EntityResolver;
25.30 +import org.xml.sax.ErrorHandler;
25.31 +import org.xml.sax.InputSource;
25.32 +import org.xml.sax.SAXException;
25.33 +import org.xml.sax.SAXNotRecognizedException;
25.34 +import org.xml.sax.SAXNotSupportedException;
25.35 +import org.xml.sax.XMLReader;
25.36 +
25.37 +/**
25.38 + *
25.39 + * @author Ing. František Kučera (frantovo.cz)
25.40 + */
25.41 +public class SuperReader implements XMLReader {
25.42 +
25.43 + private ContentHandler contentHandler;
25.44 + private ErrorHandler errorHandler;
25.45 + private DTDHandler dtdHandler;
25.46 + private EntityResolver entityResolver;
25.47 + private final Map<String, Object> properties = new HashMap<>();
25.48 + private final Map<String, Boolean> features = new HashMap<>();
25.49 + private final ReaderFinder readerFinder;
25.50 +
25.51 + public SuperReader(ReaderFinder readerFinder) {
25.52 + this.readerFinder = readerFinder;
25.53 + }
25.54 +
25.55 + @Override
25.56 + public void parse(InputSource input) throws IOException, SAXException {
25.57 +
25.58 + input = new AltInputSource(entityResolver, input);
25.59 +
25.60 + XMLReader reader = readerFinder.findReader(input.getSystemId());
25.61 +
25.62 + reader.setContentHandler(contentHandler);
25.63 + reader.setDTDHandler(dtdHandler);
25.64 + reader.setEntityResolver(entityResolver);
25.65 + reader.setErrorHandler(errorHandler);
25.66 +
25.67 + for (Entry<String, Object> e : properties.entrySet()) {
25.68 + reader.setProperty(e.getKey(), e.getValue());
25.69 + }
25.70 +
25.71 + for (Entry<String, Boolean> e : features.entrySet()) {
25.72 + reader.setFeature(e.getKey(), e.getValue());
25.73 + }
25.74 +
25.75 + reader.parse(input);
25.76 + }
25.77 +
25.78 + @Override
25.79 + public void parse(String systemId) throws IOException, SAXException {
25.80 + parse(new InputSource(systemId));
25.81 + }
25.82 +
25.83 + @Override
25.84 + public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
25.85 + /**
25.86 + * TODO:
25.87 + * All XMLReaders are required to recognize
25.88 + * the http://xml.org/sax/features/namespaces
25.89 + * and the http://xml.org/sax/features/namespace-prefixes feature names.
25.90 + */
25.91 + return features.get(name);
25.92 + }
25.93 +
25.94 + @Override
25.95 + public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
25.96 + /**
25.97 + * TODO: filtrovat – povolit jen náš jmenný prostor
25.98 + */
25.99 + features.put(name, value);
25.100 + }
25.101 +
25.102 + @Override
25.103 + public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
25.104 + return properties.get(name);
25.105 + }
25.106 +
25.107 + @Override
25.108 + public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
25.109 + properties.put(name, value);
25.110 + }
25.111 +
25.112 + @Override
25.113 + public void setEntityResolver(EntityResolver entityResolver) {
25.114 + this.entityResolver = entityResolver;
25.115 + }
25.116 +
25.117 + @Override
25.118 + public EntityResolver getEntityResolver() {
25.119 + return entityResolver;
25.120 + }
25.121 +
25.122 + @Override
25.123 + public void setDTDHandler(DTDHandler dtdHandler) {
25.124 + this.dtdHandler = dtdHandler;
25.125 + }
25.126 +
25.127 + @Override
25.128 + public DTDHandler getDTDHandler() {
25.129 + return dtdHandler;
25.130 + }
25.131 +
25.132 + @Override
25.133 + public void setContentHandler(ContentHandler contentHandler) {
25.134 + this.contentHandler = contentHandler;
25.135 + }
25.136 +
25.137 + @Override
25.138 + public ContentHandler getContentHandler() {
25.139 + return contentHandler;
25.140 + }
25.141 +
25.142 + @Override
25.143 + public void setErrorHandler(ErrorHandler errorHandler) {
25.144 + this.errorHandler = errorHandler;
25.145 + }
25.146 +
25.147 + @Override
25.148 + public ErrorHandler getErrorHandler() {
25.149 + return errorHandler;
25.150 + }
25.151 +}
26.1 --- a/java/alt2xml-lib/build.xml Sat Jun 07 21:57:50 2014 +0200
26.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
26.3 @@ -1,73 +0,0 @@
26.4 -<?xml version="1.0" encoding="UTF-8"?>
26.5 -<!-- You may freely edit this file. See commented blocks below for -->
26.6 -<!-- some examples of how to customize the build. -->
26.7 -<!-- (If you delete it and reopen the project it will be recreated.) -->
26.8 -<!-- By default, only the Clean and Build commands use this build script. -->
26.9 -<!-- Commands such as Run, Debug, and Test only use this build script if -->
26.10 -<!-- the Compile on Save feature is turned off for the project. -->
26.11 -<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
26.12 -<!-- in the project's Project Properties dialog box.-->
26.13 -<project name="alt2xml-lib" default="default" basedir=".">
26.14 - <description>Builds, tests, and runs the project alt2xml-lib.</description>
26.15 - <import file="nbproject/build-impl.xml"/>
26.16 - <!--
26.17 -
26.18 - There exist several targets which are by default empty and which can be
26.19 - used for execution of your tasks. These targets are usually executed
26.20 - before and after some main targets. They are:
26.21 -
26.22 - -pre-init: called before initialization of project properties
26.23 - -post-init: called after initialization of project properties
26.24 - -pre-compile: called before javac compilation
26.25 - -post-compile: called after javac compilation
26.26 - -pre-compile-single: called before javac compilation of single file
26.27 - -post-compile-single: called after javac compilation of single file
26.28 - -pre-compile-test: called before javac compilation of JUnit tests
26.29 - -post-compile-test: called after javac compilation of JUnit tests
26.30 - -pre-compile-test-single: called before javac compilation of single JUnit test
26.31 - -post-compile-test-single: called after javac compilation of single JUunit test
26.32 - -pre-jar: called before JAR building
26.33 - -post-jar: called after JAR building
26.34 - -post-clean: called after cleaning build products
26.35 -
26.36 - (Targets beginning with '-' are not intended to be called on their own.)
26.37 -
26.38 - Example of inserting an obfuscator after compilation could look like this:
26.39 -
26.40 - <target name="-post-compile">
26.41 - <obfuscate>
26.42 - <fileset dir="${build.classes.dir}"/>
26.43 - </obfuscate>
26.44 - </target>
26.45 -
26.46 - For list of available properties check the imported
26.47 - nbproject/build-impl.xml file.
26.48 -
26.49 -
26.50 - Another way to customize the build is by overriding existing main targets.
26.51 - The targets of interest are:
26.52 -
26.53 - -init-macrodef-javac: defines macro for javac compilation
26.54 - -init-macrodef-junit: defines macro for junit execution
26.55 - -init-macrodef-debug: defines macro for class debugging
26.56 - -init-macrodef-java: defines macro for class execution
26.57 - -do-jar: JAR building
26.58 - run: execution of project
26.59 - -javadoc-build: Javadoc generation
26.60 - test-report: JUnit report generation
26.61 -
26.62 - An example of overriding the target for project execution could look like this:
26.63 -
26.64 - <target name="run" depends="alt2xml-lib-impl.jar">
26.65 - <exec dir="bin" executable="launcher.exe">
26.66 - <arg file="${dist.jar}"/>
26.67 - </exec>
26.68 - </target>
26.69 -
26.70 - Notice that the overridden target depends on the jar target and not only on
26.71 - the compile target as the regular run target does. Again, for a list of available
26.72 - properties which you can use, check the target you are overriding in the
26.73 - nbproject/build-impl.xml file.
26.74 -
26.75 - -->
26.76 -</project>
27.1 --- a/java/alt2xml-lib/nbproject/build-impl.xml Sat Jun 07 21:57:50 2014 +0200
27.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
27.3 @@ -1,1413 +0,0 @@
27.4 -<?xml version="1.0" encoding="UTF-8"?>
27.5 -<!--
27.6 -*** GENERATED FROM project.xml - DO NOT EDIT ***
27.7 -*** EDIT ../build.xml INSTEAD ***
27.8 -
27.9 -For the purpose of easier reading the script
27.10 -is divided into following sections:
27.11 -
27.12 - - initialization
27.13 - - compilation
27.14 - - jar
27.15 - - execution
27.16 - - debugging
27.17 - - javadoc
27.18 - - test compilation
27.19 - - test execution
27.20 - - test debugging
27.21 - - applet
27.22 - - cleanup
27.23 -
27.24 - -->
27.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="alt2xml-lib-impl">
27.26 - <fail message="Please build using Ant 1.8.0 or higher.">
27.27 - <condition>
27.28 - <not>
27.29 - <antversion atleast="1.8.0"/>
27.30 - </not>
27.31 - </condition>
27.32 - </fail>
27.33 - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
27.34 - <!--
27.35 - ======================
27.36 - INITIALIZATION SECTION
27.37 - ======================
27.38 - -->
27.39 - <target name="-pre-init">
27.40 - <!-- Empty placeholder for easier customization. -->
27.41 - <!-- You can override this target in the ../build.xml file. -->
27.42 - </target>
27.43 - <target depends="-pre-init" name="-init-private">
27.44 - <property file="nbproject/private/config.properties"/>
27.45 - <property file="nbproject/private/configs/${config}.properties"/>
27.46 - <property file="nbproject/private/private.properties"/>
27.47 - </target>
27.48 - <target depends="-pre-init,-init-private" name="-init-user">
27.49 - <property file="${user.properties.file}"/>
27.50 - <!-- The two properties below are usually overridden -->
27.51 - <!-- by the active platform. Just a fallback. -->
27.52 - <property name="default.javac.source" value="1.4"/>
27.53 - <property name="default.javac.target" value="1.4"/>
27.54 - </target>
27.55 - <target depends="-pre-init,-init-private,-init-user" name="-init-project">
27.56 - <property file="nbproject/configs/${config}.properties"/>
27.57 - <property file="nbproject/project.properties"/>
27.58 - </target>
27.59 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
27.60 - <property name="platform.java" value="${java.home}/bin/java"/>
27.61 - <available file="${manifest.file}" property="manifest.available"/>
27.62 - <condition property="splashscreen.available">
27.63 - <and>
27.64 - <not>
27.65 - <equals arg1="${application.splash}" arg2="" trim="true"/>
27.66 - </not>
27.67 - <available file="${application.splash}"/>
27.68 - </and>
27.69 - </condition>
27.70 - <condition property="main.class.available">
27.71 - <and>
27.72 - <isset property="main.class"/>
27.73 - <not>
27.74 - <equals arg1="${main.class}" arg2="" trim="true"/>
27.75 - </not>
27.76 - </and>
27.77 - </condition>
27.78 - <condition property="profile.available">
27.79 - <and>
27.80 - <isset property="javac.profile"/>
27.81 - <length length="0" string="${javac.profile}" when="greater"/>
27.82 - <matches pattern="1\.[89](\..*)?" string="${javac.source}"/>
27.83 - </and>
27.84 - </condition>
27.85 - <condition property="do.archive">
27.86 - <or>
27.87 - <not>
27.88 - <istrue value="${jar.archive.disabled}"/>
27.89 - </not>
27.90 - <istrue value="${not.archive.disabled}"/>
27.91 - </or>
27.92 - </condition>
27.93 - <condition property="do.mkdist">
27.94 - <and>
27.95 - <isset property="do.archive"/>
27.96 - <isset property="libs.CopyLibs.classpath"/>
27.97 - <not>
27.98 - <istrue value="${mkdist.disabled}"/>
27.99 - </not>
27.100 - </and>
27.101 - </condition>
27.102 - <condition property="do.archive+manifest.available">
27.103 - <and>
27.104 - <isset property="manifest.available"/>
27.105 - <istrue value="${do.archive}"/>
27.106 - </and>
27.107 - </condition>
27.108 - <condition property="do.archive+main.class.available">
27.109 - <and>
27.110 - <isset property="main.class.available"/>
27.111 - <istrue value="${do.archive}"/>
27.112 - </and>
27.113 - </condition>
27.114 - <condition property="do.archive+splashscreen.available">
27.115 - <and>
27.116 - <isset property="splashscreen.available"/>
27.117 - <istrue value="${do.archive}"/>
27.118 - </and>
27.119 - </condition>
27.120 - <condition property="do.archive+profile.available">
27.121 - <and>
27.122 - <isset property="profile.available"/>
27.123 - <istrue value="${do.archive}"/>
27.124 - </and>
27.125 - </condition>
27.126 - <condition property="have.tests">
27.127 - <or>
27.128 - <available file="${test.src.dir}"/>
27.129 - </or>
27.130 - </condition>
27.131 - <condition property="have.sources">
27.132 - <or>
27.133 - <available file="${src.dir}"/>
27.134 - </or>
27.135 - </condition>
27.136 - <condition property="netbeans.home+have.tests">
27.137 - <and>
27.138 - <isset property="netbeans.home"/>
27.139 - <isset property="have.tests"/>
27.140 - </and>
27.141 - </condition>
27.142 - <condition property="no.javadoc.preview">
27.143 - <and>
27.144 - <isset property="javadoc.preview"/>
27.145 - <isfalse value="${javadoc.preview}"/>
27.146 - </and>
27.147 - </condition>
27.148 - <property name="run.jvmargs" value=""/>
27.149 - <property name="run.jvmargs.ide" value=""/>
27.150 - <property name="javac.compilerargs" value=""/>
27.151 - <property name="work.dir" value="${basedir}"/>
27.152 - <condition property="no.deps">
27.153 - <and>
27.154 - <istrue value="${no.dependencies}"/>
27.155 - </and>
27.156 - </condition>
27.157 - <property name="javac.debug" value="true"/>
27.158 - <property name="javadoc.preview" value="true"/>
27.159 - <property name="application.args" value=""/>
27.160 - <property name="source.encoding" value="${file.encoding}"/>
27.161 - <property name="runtime.encoding" value="${source.encoding}"/>
27.162 - <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
27.163 - <and>
27.164 - <isset property="javadoc.encoding"/>
27.165 - <not>
27.166 - <equals arg1="${javadoc.encoding}" arg2=""/>
27.167 - </not>
27.168 - </and>
27.169 - </condition>
27.170 - <property name="javadoc.encoding.used" value="${source.encoding}"/>
27.171 - <property name="includes" value="**"/>
27.172 - <property name="excludes" value=""/>
27.173 - <property name="do.depend" value="false"/>
27.174 - <condition property="do.depend.true">
27.175 - <istrue value="${do.depend}"/>
27.176 - </condition>
27.177 - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
27.178 - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
27.179 - <and>
27.180 - <isset property="endorsed.classpath"/>
27.181 - <not>
27.182 - <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
27.183 - </not>
27.184 - </and>
27.185 - </condition>
27.186 - <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
27.187 - <isset property="profile.available"/>
27.188 - </condition>
27.189 - <condition else="false" property="jdkBug6558476">
27.190 - <and>
27.191 - <matches pattern="1\.[56]" string="${java.specification.version}"/>
27.192 - <not>
27.193 - <os family="unix"/>
27.194 - </not>
27.195 - </and>
27.196 - </condition>
27.197 - <property name="javac.fork" value="${jdkBug6558476}"/>
27.198 - <property name="jar.index" value="false"/>
27.199 - <property name="jar.index.metainf" value="${jar.index}"/>
27.200 - <property name="copylibs.rebase" value="true"/>
27.201 - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
27.202 - <condition property="junit.available">
27.203 - <or>
27.204 - <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
27.205 - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
27.206 - </or>
27.207 - </condition>
27.208 - <condition property="testng.available">
27.209 - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
27.210 - </condition>
27.211 - <condition property="junit+testng.available">
27.212 - <and>
27.213 - <istrue value="${junit.available}"/>
27.214 - <istrue value="${testng.available}"/>
27.215 - </and>
27.216 - </condition>
27.217 - <condition else="testng" property="testng.mode" value="mixed">
27.218 - <istrue value="${junit+testng.available}"/>
27.219 - </condition>
27.220 - <condition else="" property="testng.debug.mode" value="-mixed">
27.221 - <istrue value="${junit+testng.available}"/>
27.222 - </condition>
27.223 - </target>
27.224 - <target name="-post-init">
27.225 - <!-- Empty placeholder for easier customization. -->
27.226 - <!-- You can override this target in the ../build.xml file. -->
27.227 - </target>
27.228 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
27.229 - <fail unless="src.dir">Must set src.dir</fail>
27.230 - <fail unless="test.src.dir">Must set test.src.dir</fail>
27.231 - <fail unless="build.dir">Must set build.dir</fail>
27.232 - <fail unless="dist.dir">Must set dist.dir</fail>
27.233 - <fail unless="build.classes.dir">Must set build.classes.dir</fail>
27.234 - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
27.235 - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
27.236 - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
27.237 - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
27.238 - <fail unless="dist.jar">Must set dist.jar</fail>
27.239 - </target>
27.240 - <target name="-init-macrodef-property">
27.241 - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
27.242 - <attribute name="name"/>
27.243 - <attribute name="value"/>
27.244 - <sequential>
27.245 - <property name="@{name}" value="${@{value}}"/>
27.246 - </sequential>
27.247 - </macrodef>
27.248 - </target>
27.249 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
27.250 - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
27.251 - <attribute default="${src.dir}" name="srcdir"/>
27.252 - <attribute default="${build.classes.dir}" name="destdir"/>
27.253 - <attribute default="${javac.classpath}" name="classpath"/>
27.254 - <attribute default="${javac.processorpath}" name="processorpath"/>
27.255 - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
27.256 - <attribute default="${includes}" name="includes"/>
27.257 - <attribute default="${excludes}" name="excludes"/>
27.258 - <attribute default="${javac.debug}" name="debug"/>
27.259 - <attribute default="${empty.dir}" name="sourcepath"/>
27.260 - <attribute default="${empty.dir}" name="gensrcdir"/>
27.261 - <element name="customize" optional="true"/>
27.262 - <sequential>
27.263 - <property location="${build.dir}/empty" name="empty.dir"/>
27.264 - <mkdir dir="${empty.dir}"/>
27.265 - <mkdir dir="@{apgeneratedsrcdir}"/>
27.266 - <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}">
27.267 - <src>
27.268 - <dirset dir="@{gensrcdir}" erroronmissingdir="false">
27.269 - <include name="*"/>
27.270 - </dirset>
27.271 - </src>
27.272 - <classpath>
27.273 - <path path="@{classpath}"/>
27.274 - </classpath>
27.275 - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
27.276 - <compilerarg line="${javac.profile.cmd.line.arg}"/>
27.277 - <compilerarg line="${javac.compilerargs}"/>
27.278 - <compilerarg value="-processorpath"/>
27.279 - <compilerarg path="@{processorpath}:${empty.dir}"/>
27.280 - <compilerarg line="${ap.processors.internal}"/>
27.281 - <compilerarg line="${annotation.processing.processor.options}"/>
27.282 - <compilerarg value="-s"/>
27.283 - <compilerarg path="@{apgeneratedsrcdir}"/>
27.284 - <compilerarg line="${ap.proc.none.internal}"/>
27.285 - <customize/>
27.286 - </javac>
27.287 - </sequential>
27.288 - </macrodef>
27.289 - </target>
27.290 - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
27.291 - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
27.292 - <attribute default="${src.dir}" name="srcdir"/>
27.293 - <attribute default="${build.classes.dir}" name="destdir"/>
27.294 - <attribute default="${javac.classpath}" name="classpath"/>
27.295 - <attribute default="${javac.processorpath}" name="processorpath"/>
27.296 - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
27.297 - <attribute default="${includes}" name="includes"/>
27.298 - <attribute default="${excludes}" name="excludes"/>
27.299 - <attribute default="${javac.debug}" name="debug"/>
27.300 - <attribute default="${empty.dir}" name="sourcepath"/>
27.301 - <attribute default="${empty.dir}" name="gensrcdir"/>
27.302 - <element name="customize" optional="true"/>
27.303 - <sequential>
27.304 - <property location="${build.dir}/empty" name="empty.dir"/>
27.305 - <mkdir dir="${empty.dir}"/>
27.306 - <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}">
27.307 - <src>
27.308 - <dirset dir="@{gensrcdir}" erroronmissingdir="false">
27.309 - <include name="*"/>
27.310 - </dirset>
27.311 - </src>
27.312 - <classpath>
27.313 - <path path="@{classpath}"/>
27.314 - </classpath>
27.315 - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
27.316 - <compilerarg line="${javac.profile.cmd.line.arg}"/>
27.317 - <compilerarg line="${javac.compilerargs}"/>
27.318 - <customize/>
27.319 - </javac>
27.320 - </sequential>
27.321 - </macrodef>
27.322 - </target>
27.323 - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
27.324 - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
27.325 - <attribute default="${src.dir}" name="srcdir"/>
27.326 - <attribute default="${build.classes.dir}" name="destdir"/>
27.327 - <attribute default="${javac.classpath}" name="classpath"/>
27.328 - <sequential>
27.329 - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
27.330 - <classpath>
27.331 - <path path="@{classpath}"/>
27.332 - </classpath>
27.333 - </depend>
27.334 - </sequential>
27.335 - </macrodef>
27.336 - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
27.337 - <attribute default="${build.classes.dir}" name="destdir"/>
27.338 - <sequential>
27.339 - <fail unless="javac.includes">Must set javac.includes</fail>
27.340 - <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
27.341 - <path>
27.342 - <filelist dir="@{destdir}" files="${javac.includes}"/>
27.343 - </path>
27.344 - <globmapper from="*.java" to="*.class"/>
27.345 - </pathconvert>
27.346 - <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
27.347 - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
27.348 - <delete>
27.349 - <files includesfile="${javac.includesfile.binary}"/>
27.350 - </delete>
27.351 - <delete>
27.352 - <fileset file="${javac.includesfile.binary}"/>
27.353 - </delete>
27.354 - </sequential>
27.355 - </macrodef>
27.356 - </target>
27.357 - <target if="${junit.available}" name="-init-macrodef-junit-init">
27.358 - <condition else="false" property="nb.junit.batch" value="true">
27.359 - <and>
27.360 - <istrue value="${junit.available}"/>
27.361 - <not>
27.362 - <isset property="test.method"/>
27.363 - </not>
27.364 - </and>
27.365 - </condition>
27.366 - <condition else="false" property="nb.junit.single" value="true">
27.367 - <and>
27.368 - <istrue value="${junit.available}"/>
27.369 - <isset property="test.method"/>
27.370 - </and>
27.371 - </condition>
27.372 - </target>
27.373 - <target name="-init-test-properties">
27.374 - <property name="test.binaryincludes" value="<nothing>"/>
27.375 - <property name="test.binarytestincludes" value=""/>
27.376 - <property name="test.binaryexcludes" value=""/>
27.377 - </target>
27.378 - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
27.379 - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
27.380 - <attribute default="${includes}" name="includes"/>
27.381 - <attribute default="${excludes}" name="excludes"/>
27.382 - <attribute default="**" name="testincludes"/>
27.383 - <attribute default="" name="testmethods"/>
27.384 - <element name="customize" optional="true"/>
27.385 - <sequential>
27.386 - <property name="junit.forkmode" value="perTest"/>
27.387 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
27.388 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
27.389 - <syspropertyset>
27.390 - <propertyref prefix="test-sys-prop."/>
27.391 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
27.392 - </syspropertyset>
27.393 - <formatter type="brief" usefile="false"/>
27.394 - <formatter type="xml"/>
27.395 - <jvmarg value="-ea"/>
27.396 - <customize/>
27.397 - </junit>
27.398 - </sequential>
27.399 - </macrodef>
27.400 - </target>
27.401 - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
27.402 - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
27.403 - <attribute default="${includes}" name="includes"/>
27.404 - <attribute default="${excludes}" name="excludes"/>
27.405 - <attribute default="**" name="testincludes"/>
27.406 - <attribute default="" name="testmethods"/>
27.407 - <element name="customize" optional="true"/>
27.408 - <sequential>
27.409 - <property name="junit.forkmode" value="perTest"/>
27.410 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
27.411 - <batchtest todir="${build.test.results.dir}">
27.412 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
27.413 - <filename name="@{testincludes}"/>
27.414 - </fileset>
27.415 - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
27.416 - <filename name="${test.binarytestincludes}"/>
27.417 - </fileset>
27.418 - </batchtest>
27.419 - <syspropertyset>
27.420 - <propertyref prefix="test-sys-prop."/>
27.421 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
27.422 - </syspropertyset>
27.423 - <formatter type="brief" usefile="false"/>
27.424 - <formatter type="xml"/>
27.425 - <jvmarg value="-ea"/>
27.426 - <customize/>
27.427 - </junit>
27.428 - </sequential>
27.429 - </macrodef>
27.430 - </target>
27.431 - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
27.432 - <target if="${testng.available}" name="-init-macrodef-testng">
27.433 - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
27.434 - <attribute default="${includes}" name="includes"/>
27.435 - <attribute default="${excludes}" name="excludes"/>
27.436 - <attribute default="**" name="testincludes"/>
27.437 - <attribute default="" name="testmethods"/>
27.438 - <element name="customize" optional="true"/>
27.439 - <sequential>
27.440 - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
27.441 - <isset property="test.method"/>
27.442 - </condition>
27.443 - <union id="test.set">
27.444 - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
27.445 - <filename name="@{testincludes}"/>
27.446 - </fileset>
27.447 - </union>
27.448 - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
27.449 - <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="alt2xml-lib" testname="TestNG tests" workingDir="${work.dir}">
27.450 - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
27.451 - <propertyset>
27.452 - <propertyref prefix="test-sys-prop."/>
27.453 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
27.454 - </propertyset>
27.455 - <customize/>
27.456 - </testng>
27.457 - </sequential>
27.458 - </macrodef>
27.459 - </target>
27.460 - <target name="-init-macrodef-test-impl">
27.461 - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
27.462 - <attribute default="${includes}" name="includes"/>
27.463 - <attribute default="${excludes}" name="excludes"/>
27.464 - <attribute default="**" name="testincludes"/>
27.465 - <attribute default="" name="testmethods"/>
27.466 - <element implicit="true" name="customize" optional="true"/>
27.467 - <sequential>
27.468 - <echo>No tests executed.</echo>
27.469 - </sequential>
27.470 - </macrodef>
27.471 - </target>
27.472 - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
27.473 - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
27.474 - <attribute default="${includes}" name="includes"/>
27.475 - <attribute default="${excludes}" name="excludes"/>
27.476 - <attribute default="**" name="testincludes"/>
27.477 - <attribute default="" name="testmethods"/>
27.478 - <element implicit="true" name="customize" optional="true"/>
27.479 - <sequential>
27.480 - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
27.481 - <customize/>
27.482 - </j2seproject3:junit>
27.483 - </sequential>
27.484 - </macrodef>
27.485 - </target>
27.486 - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
27.487 - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
27.488 - <attribute default="${includes}" name="includes"/>
27.489 - <attribute default="${excludes}" name="excludes"/>
27.490 - <attribute default="**" name="testincludes"/>
27.491 - <attribute default="" name="testmethods"/>
27.492 - <element implicit="true" name="customize" optional="true"/>
27.493 - <sequential>
27.494 - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
27.495 - <customize/>
27.496 - </j2seproject3:testng>
27.497 - </sequential>
27.498 - </macrodef>
27.499 - </target>
27.500 - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
27.501 - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
27.502 - <attribute default="${includes}" name="includes"/>
27.503 - <attribute default="${excludes}" name="excludes"/>
27.504 - <attribute default="**" name="testincludes"/>
27.505 - <attribute default="" name="testmethods"/>
27.506 - <sequential>
27.507 - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
27.508 - <customize>
27.509 - <classpath>
27.510 - <path path="${run.test.classpath}"/>
27.511 - </classpath>
27.512 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
27.513 - <jvmarg line="${run.jvmargs}"/>
27.514 - <jvmarg line="${run.jvmargs.ide}"/>
27.515 - </customize>
27.516 - </j2seproject3:test-impl>
27.517 - </sequential>
27.518 - </macrodef>
27.519 - </target>
27.520 - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
27.521 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
27.522 - <attribute default="${includes}" name="includes"/>
27.523 - <attribute default="${excludes}" name="excludes"/>
27.524 - <attribute default="**" name="testincludes"/>
27.525 - <attribute default="" name="testmethods"/>
27.526 - <element name="customize" optional="true"/>
27.527 - <sequential>
27.528 - <property name="junit.forkmode" value="perTest"/>
27.529 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
27.530 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
27.531 - <syspropertyset>
27.532 - <propertyref prefix="test-sys-prop."/>
27.533 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
27.534 - </syspropertyset>
27.535 - <formatter type="brief" usefile="false"/>
27.536 - <formatter type="xml"/>
27.537 - <jvmarg value="-ea"/>
27.538 - <jvmarg line="${debug-args-line}"/>
27.539 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
27.540 - <customize/>
27.541 - </junit>
27.542 - </sequential>
27.543 - </macrodef>
27.544 - </target>
27.545 - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
27.546 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
27.547 - <attribute default="${includes}" name="includes"/>
27.548 - <attribute default="${excludes}" name="excludes"/>
27.549 - <attribute default="**" name="testincludes"/>
27.550 - <attribute default="" name="testmethods"/>
27.551 - <element name="customize" optional="true"/>
27.552 - <sequential>
27.553 - <property name="junit.forkmode" value="perTest"/>
27.554 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
27.555 - <batchtest todir="${build.test.results.dir}">
27.556 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
27.557 - <filename name="@{testincludes}"/>
27.558 - </fileset>
27.559 - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
27.560 - <filename name="${test.binarytestincludes}"/>
27.561 - </fileset>
27.562 - </batchtest>
27.563 - <syspropertyset>
27.564 - <propertyref prefix="test-sys-prop."/>
27.565 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
27.566 - </syspropertyset>
27.567 - <formatter type="brief" usefile="false"/>
27.568 - <formatter type="xml"/>
27.569 - <jvmarg value="-ea"/>
27.570 - <jvmarg line="${debug-args-line}"/>
27.571 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
27.572 - <customize/>
27.573 - </junit>
27.574 - </sequential>
27.575 - </macrodef>
27.576 - </target>
27.577 - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
27.578 - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
27.579 - <attribute default="${includes}" name="includes"/>
27.580 - <attribute default="${excludes}" name="excludes"/>
27.581 - <attribute default="**" name="testincludes"/>
27.582 - <attribute default="" name="testmethods"/>
27.583 - <element implicit="true" name="customize" optional="true"/>
27.584 - <sequential>
27.585 - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
27.586 - <customize/>
27.587 - </j2seproject3:junit-debug>
27.588 - </sequential>
27.589 - </macrodef>
27.590 - </target>
27.591 - <target if="${testng.available}" name="-init-macrodef-testng-debug">
27.592 - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
27.593 - <attribute default="${main.class}" name="testClass"/>
27.594 - <attribute default="" name="testMethod"/>
27.595 - <element name="customize2" optional="true"/>
27.596 - <sequential>
27.597 - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
27.598 - <isset property="test.method"/>
27.599 - </condition>
27.600 - <condition else="-suitename alt2xml-lib -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
27.601 - <matches pattern=".*\.xml" string="@{testClass}"/>
27.602 - </condition>
27.603 - <delete dir="${build.test.results.dir}" quiet="true"/>
27.604 - <mkdir dir="${build.test.results.dir}"/>
27.605 - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
27.606 - <customize>
27.607 - <customize2/>
27.608 - <jvmarg value="-ea"/>
27.609 - <arg line="${testng.debug.mode}"/>
27.610 - <arg line="-d ${build.test.results.dir}"/>
27.611 - <arg line="-listener org.testng.reporters.VerboseReporter"/>
27.612 - <arg line="${testng.cmd.args}"/>
27.613 - </customize>
27.614 - </j2seproject3:debug>
27.615 - </sequential>
27.616 - </macrodef>
27.617 - </target>
27.618 - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
27.619 - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
27.620 - <attribute default="${main.class}" name="testClass"/>
27.621 - <attribute default="" name="testMethod"/>
27.622 - <element implicit="true" name="customize2" optional="true"/>
27.623 - <sequential>
27.624 - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
27.625 - <customize2/>
27.626 - </j2seproject3:testng-debug>
27.627 - </sequential>
27.628 - </macrodef>
27.629 - </target>
27.630 - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
27.631 - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
27.632 - <attribute default="${includes}" name="includes"/>
27.633 - <attribute default="${excludes}" name="excludes"/>
27.634 - <attribute default="**" name="testincludes"/>
27.635 - <attribute default="" name="testmethods"/>
27.636 - <attribute default="${main.class}" name="testClass"/>
27.637 - <attribute default="" name="testMethod"/>
27.638 - <sequential>
27.639 - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
27.640 - <customize>
27.641 - <classpath>
27.642 - <path path="${run.test.classpath}"/>
27.643 - </classpath>
27.644 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
27.645 - <jvmarg line="${run.jvmargs}"/>
27.646 - <jvmarg line="${run.jvmargs.ide}"/>
27.647 - </customize>
27.648 - </j2seproject3:test-debug-impl>
27.649 - </sequential>
27.650 - </macrodef>
27.651 - </target>
27.652 - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
27.653 - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
27.654 - <attribute default="${includes}" name="includes"/>
27.655 - <attribute default="${excludes}" name="excludes"/>
27.656 - <attribute default="**" name="testincludes"/>
27.657 - <attribute default="" name="testmethods"/>
27.658 - <attribute default="${main.class}" name="testClass"/>
27.659 - <attribute default="" name="testMethod"/>
27.660 - <sequential>
27.661 - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
27.662 - <customize2>
27.663 - <syspropertyset>
27.664 - <propertyref prefix="test-sys-prop."/>
27.665 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
27.666 - </syspropertyset>
27.667 - </customize2>
27.668 - </j2seproject3:testng-debug-impl>
27.669 - </sequential>
27.670 - </macrodef>
27.671 - </target>
27.672 - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
27.673 - <!--
27.674 - pre NB7.2 profiling section; consider it deprecated
27.675 - -->
27.676 - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
27.677 - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
27.678 - <!-- Empty placeholder for easier customization. -->
27.679 - <!-- You can override this target in the ../build.xml file. -->
27.680 - </target>
27.681 - <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
27.682 - <!-- Empty placeholder for easier customization. -->
27.683 - <!-- You can override this target in the ../build.xml file. -->
27.684 - </target>
27.685 - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
27.686 - <macrodef name="resolve">
27.687 - <attribute name="name"/>
27.688 - <attribute name="value"/>
27.689 - <sequential>
27.690 - <property name="@{name}" value="${env.@{value}}"/>
27.691 - </sequential>
27.692 - </macrodef>
27.693 - <macrodef name="profile">
27.694 - <attribute default="${main.class}" name="classname"/>
27.695 - <element name="customize" optional="true"/>
27.696 - <sequential>
27.697 - <property environment="env"/>
27.698 - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
27.699 - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
27.700 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
27.701 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
27.702 - <jvmarg line="${profiler.info.jvmargs}"/>
27.703 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
27.704 - <arg line="${application.args}"/>
27.705 - <classpath>
27.706 - <path path="${run.classpath}"/>
27.707 - </classpath>
27.708 - <syspropertyset>
27.709 - <propertyref prefix="run-sys-prop."/>
27.710 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
27.711 - </syspropertyset>
27.712 - <customize/>
27.713 - </java>
27.714 - </sequential>
27.715 - </macrodef>
27.716 - </target>
27.717 - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
27.718 - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
27.719 - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
27.720 - </target>
27.721 - <!--
27.722 - end of pre NB7.2 profiling section
27.723 - -->
27.724 - <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
27.725 - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
27.726 - <attribute default="${main.class}" name="name"/>
27.727 - <attribute default="${debug.classpath}" name="classpath"/>
27.728 - <attribute default="" name="stopclassname"/>
27.729 - <sequential>
27.730 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
27.731 - <classpath>
27.732 - <path path="@{classpath}"/>
27.733 - </classpath>
27.734 - </nbjpdastart>
27.735 - </sequential>
27.736 - </macrodef>
27.737 - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
27.738 - <attribute default="${build.classes.dir}" name="dir"/>
27.739 - <sequential>
27.740 - <nbjpdareload>
27.741 - <fileset dir="@{dir}" includes="${fix.classes}">
27.742 - <include name="${fix.includes}*.class"/>
27.743 - </fileset>
27.744 - </nbjpdareload>
27.745 - </sequential>
27.746 - </macrodef>
27.747 - </target>
27.748 - <target name="-init-debug-args">
27.749 - <property name="version-output" value="java version "${ant.java.version}"/>
27.750 - <condition property="have-jdk-older-than-1.4">
27.751 - <or>
27.752 - <contains string="${version-output}" substring="java version "1.0"/>
27.753 - <contains string="${version-output}" substring="java version "1.1"/>
27.754 - <contains string="${version-output}" substring="java version "1.2"/>
27.755 - <contains string="${version-output}" substring="java version "1.3"/>
27.756 - </or>
27.757 - </condition>
27.758 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
27.759 - <istrue value="${have-jdk-older-than-1.4}"/>
27.760 - </condition>
27.761 - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
27.762 - <os family="windows"/>
27.763 - </condition>
27.764 - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
27.765 - <isset property="debug.transport"/>
27.766 - </condition>
27.767 - </target>
27.768 - <target depends="-init-debug-args" name="-init-macrodef-debug">
27.769 - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
27.770 - <attribute default="${main.class}" name="classname"/>
27.771 - <attribute default="${debug.classpath}" name="classpath"/>
27.772 - <element name="customize" optional="true"/>
27.773 - <sequential>
27.774 - <java classname="@{classname}" dir="${work.dir}" fork="true">
27.775 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
27.776 - <jvmarg line="${debug-args-line}"/>
27.777 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
27.778 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
27.779 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
27.780 - <jvmarg line="${run.jvmargs}"/>
27.781 - <jvmarg line="${run.jvmargs.ide}"/>
27.782 - <classpath>
27.783 - <path path="@{classpath}"/>
27.784 - </classpath>
27.785 - <syspropertyset>
27.786 - <propertyref prefix="run-sys-prop."/>
27.787 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
27.788 - </syspropertyset>
27.789 - <customize/>
27.790 - </java>
27.791 - </sequential>
27.792 - </macrodef>
27.793 - </target>
27.794 - <target name="-init-macrodef-java">
27.795 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
27.796 - <attribute default="${main.class}" name="classname"/>
27.797 - <attribute default="${run.classpath}" name="classpath"/>
27.798 - <attribute default="jvm" name="jvm"/>
27.799 - <element name="customize" optional="true"/>
27.800 - <sequential>
27.801 - <java classname="@{classname}" dir="${work.dir}" fork="true">
27.802 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
27.803 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
27.804 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
27.805 - <jvmarg line="${run.jvmargs}"/>
27.806 - <jvmarg line="${run.jvmargs.ide}"/>
27.807 - <classpath>
27.808 - <path path="@{classpath}"/>
27.809 - </classpath>
27.810 - <syspropertyset>
27.811 - <propertyref prefix="run-sys-prop."/>
27.812 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
27.813 - </syspropertyset>
27.814 - <customize/>
27.815 - </java>
27.816 - </sequential>
27.817 - </macrodef>
27.818 - </target>
27.819 - <target name="-init-macrodef-copylibs">
27.820 - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
27.821 - <attribute default="${manifest.file}" name="manifest"/>
27.822 - <element name="customize" optional="true"/>
27.823 - <sequential>
27.824 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
27.825 - <pathconvert property="run.classpath.without.build.classes.dir">
27.826 - <path path="${run.classpath}"/>
27.827 - <map from="${build.classes.dir.resolved}" to=""/>
27.828 - </pathconvert>
27.829 - <pathconvert pathsep=" " property="jar.classpath">
27.830 - <path path="${run.classpath.without.build.classes.dir}"/>
27.831 - <chainedmapper>
27.832 - <flattenmapper/>
27.833 - <filtermapper>
27.834 - <replacestring from=" " to="%20"/>
27.835 - </filtermapper>
27.836 - <globmapper from="*" to="lib/*"/>
27.837 - </chainedmapper>
27.838 - </pathconvert>
27.839 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
27.840 - <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
27.841 - <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
27.842 - <manifest>
27.843 - <attribute name="Class-Path" value="${jar.classpath}"/>
27.844 - <customize/>
27.845 - </manifest>
27.846 - </copylibs>
27.847 - </sequential>
27.848 - </macrodef>
27.849 - </target>
27.850 - <target name="-init-presetdef-jar">
27.851 - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
27.852 - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
27.853 - <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
27.854 - </jar>
27.855 - </presetdef>
27.856 - </target>
27.857 - <target name="-init-ap-cmdline-properties">
27.858 - <property name="annotation.processing.enabled" value="true"/>
27.859 - <property name="annotation.processing.processors.list" value=""/>
27.860 - <property name="annotation.processing.processor.options" value=""/>
27.861 - <property name="annotation.processing.run.all.processors" value="true"/>
27.862 - <property name="javac.processorpath" value="${javac.classpath}"/>
27.863 - <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
27.864 - <condition property="ap.supported.internal" value="true">
27.865 - <not>
27.866 - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
27.867 - </not>
27.868 - </condition>
27.869 - </target>
27.870 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
27.871 - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
27.872 - <isfalse value="${annotation.processing.run.all.processors}"/>
27.873 - </condition>
27.874 - <condition else="" property="ap.proc.none.internal" value="-proc:none">
27.875 - <isfalse value="${annotation.processing.enabled}"/>
27.876 - </condition>
27.877 - </target>
27.878 - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
27.879 - <property name="ap.cmd.line.internal" value=""/>
27.880 - </target>
27.881 - <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"/>
27.882 - <!--
27.883 - ===================
27.884 - COMPILATION SECTION
27.885 - ===================
27.886 - -->
27.887 - <target name="-deps-jar-init" unless="built-jar.properties">
27.888 - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
27.889 - <delete file="${built-jar.properties}" quiet="true"/>
27.890 - </target>
27.891 - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
27.892 - <echo level="warn" message="Cycle detected: alt2xml-lib was already built"/>
27.893 - </target>
27.894 - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
27.895 - <mkdir dir="${build.dir}"/>
27.896 - <touch file="${built-jar.properties}" verbose="false"/>
27.897 - <property file="${built-jar.properties}" prefix="already.built.jar."/>
27.898 - <antcall target="-warn-already-built-jar"/>
27.899 - <propertyfile file="${built-jar.properties}">
27.900 - <entry key="${basedir}" value=""/>
27.901 - </propertyfile>
27.902 - </target>
27.903 - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
27.904 - <target depends="init" name="-check-automatic-build">
27.905 - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
27.906 - </target>
27.907 - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
27.908 - <antcall target="clean"/>
27.909 - </target>
27.910 - <target depends="init,deps-jar" name="-pre-pre-compile">
27.911 - <mkdir dir="${build.classes.dir}"/>
27.912 - </target>
27.913 - <target name="-pre-compile">
27.914 - <!-- Empty placeholder for easier customization. -->
27.915 - <!-- You can override this target in the ../build.xml file. -->
27.916 - </target>
27.917 - <target if="do.depend.true" name="-compile-depend">
27.918 - <pathconvert property="build.generated.subdirs">
27.919 - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
27.920 - <include name="*"/>
27.921 - </dirset>
27.922 - </pathconvert>
27.923 - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
27.924 - </target>
27.925 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
27.926 - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
27.927 - <copy todir="${build.classes.dir}">
27.928 - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
27.929 - </copy>
27.930 - </target>
27.931 - <target if="has.persistence.xml" name="-copy-persistence-xml">
27.932 - <mkdir dir="${build.classes.dir}/META-INF"/>
27.933 - <copy todir="${build.classes.dir}/META-INF">
27.934 - <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
27.935 - </copy>
27.936 - </target>
27.937 - <target name="-post-compile">
27.938 - <!-- Empty placeholder for easier customization. -->
27.939 - <!-- You can override this target in the ../build.xml file. -->
27.940 - </target>
27.941 - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
27.942 - <target name="-pre-compile-single">
27.943 - <!-- Empty placeholder for easier customization. -->
27.944 - <!-- You can override this target in the ../build.xml file. -->
27.945 - </target>
27.946 - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
27.947 - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
27.948 - <j2seproject3:force-recompile/>
27.949 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
27.950 - </target>
27.951 - <target name="-post-compile-single">
27.952 - <!-- Empty placeholder for easier customization. -->
27.953 - <!-- You can override this target in the ../build.xml file. -->
27.954 - </target>
27.955 - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
27.956 - <!--
27.957 - ====================
27.958 - JAR BUILDING SECTION
27.959 - ====================
27.960 - -->
27.961 - <target depends="init" name="-pre-pre-jar">
27.962 - <dirname file="${dist.jar}" property="dist.jar.dir"/>
27.963 - <mkdir dir="${dist.jar.dir}"/>
27.964 - </target>
27.965 - <target name="-pre-jar">
27.966 - <!-- Empty placeholder for easier customization. -->
27.967 - <!-- You can override this target in the ../build.xml file. -->
27.968 - </target>
27.969 - <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
27.970 - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
27.971 - <touch file="${tmp.manifest.file}" verbose="false"/>
27.972 - </target>
27.973 - <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
27.974 - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
27.975 - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
27.976 - </target>
27.977 - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
27.978 - <manifest file="${tmp.manifest.file}" mode="update">
27.979 - <attribute name="Main-Class" value="${main.class}"/>
27.980 - </manifest>
27.981 - </target>
27.982 - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
27.983 - <manifest file="${tmp.manifest.file}" mode="update">
27.984 - <attribute name="Profile" value="${javac.profile}"/>
27.985 - </manifest>
27.986 - </target>
27.987 - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
27.988 - <basename file="${application.splash}" property="splashscreen.basename"/>
27.989 - <mkdir dir="${build.classes.dir}/META-INF"/>
27.990 - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
27.991 - <manifest file="${tmp.manifest.file}" mode="update">
27.992 - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
27.993 - </manifest>
27.994 - </target>
27.995 - <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">
27.996 - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
27.997 - <echo level="info">To run this application from the command line without Ant, try:</echo>
27.998 - <property location="${dist.jar}" name="dist.jar.resolved"/>
27.999 - <echo level="info">java -jar "${dist.jar.resolved}"</echo>
27.1000 - </target>
27.1001 - <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">
27.1002 - <j2seproject1:jar manifest="${tmp.manifest.file}"/>
27.1003 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
27.1004 - <property location="${dist.jar}" name="dist.jar.resolved"/>
27.1005 - <pathconvert property="run.classpath.with.dist.jar">
27.1006 - <path path="${run.classpath}"/>
27.1007 - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
27.1008 - </pathconvert>
27.1009 - <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}">
27.1010 - <isset property="main.class.available"/>
27.1011 - </condition>
27.1012 - <condition else="debug" property="jar.usage.level" value="info">
27.1013 - <isset property="main.class.available"/>
27.1014 - </condition>
27.1015 - <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
27.1016 - </target>
27.1017 - <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
27.1018 - <delete>
27.1019 - <fileset file="${tmp.manifest.file}"/>
27.1020 - </delete>
27.1021 - </target>
27.1022 - <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"/>
27.1023 - <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"/>
27.1024 - <target name="-post-jar">
27.1025 - <!-- Empty placeholder for easier customization. -->
27.1026 - <!-- You can override this target in the ../build.xml file. -->
27.1027 - </target>
27.1028 - <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
27.1029 - <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
27.1030 - <!--
27.1031 - =================
27.1032 - EXECUTION SECTION
27.1033 - =================
27.1034 - -->
27.1035 - <target depends="init,compile" description="Run a main class." name="run">
27.1036 - <j2seproject1:java>
27.1037 - <customize>
27.1038 - <arg line="${application.args}"/>
27.1039 - </customize>
27.1040 - </j2seproject1:java>
27.1041 - </target>
27.1042 - <target name="-do-not-recompile">
27.1043 - <property name="javac.includes.binary" value=""/>
27.1044 - </target>
27.1045 - <target depends="init,compile-single" name="run-single">
27.1046 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
27.1047 - <j2seproject1:java classname="${run.class}"/>
27.1048 - </target>
27.1049 - <target depends="init,compile-test-single" name="run-test-with-main">
27.1050 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
27.1051 - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
27.1052 - </target>
27.1053 - <!--
27.1054 - =================
27.1055 - DEBUGGING SECTION
27.1056 - =================
27.1057 - -->
27.1058 - <target depends="init" if="netbeans.home" name="-debug-start-debugger">
27.1059 - <j2seproject1:nbjpdastart name="${debug.class}"/>
27.1060 - </target>
27.1061 - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
27.1062 - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
27.1063 - </target>
27.1064 - <target depends="init,compile" name="-debug-start-debuggee">
27.1065 - <j2seproject3:debug>
27.1066 - <customize>
27.1067 - <arg line="${application.args}"/>
27.1068 - </customize>
27.1069 - </j2seproject3:debug>
27.1070 - </target>
27.1071 - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
27.1072 - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
27.1073 - <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
27.1074 - </target>
27.1075 - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
27.1076 - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
27.1077 - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
27.1078 - <j2seproject3:debug classname="${debug.class}"/>
27.1079 - </target>
27.1080 - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
27.1081 - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
27.1082 - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
27.1083 - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
27.1084 - </target>
27.1085 - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
27.1086 - <target depends="init" name="-pre-debug-fix">
27.1087 - <fail unless="fix.includes">Must set fix.includes</fail>
27.1088 - <property name="javac.includes" value="${fix.includes}.java"/>
27.1089 - </target>
27.1090 - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
27.1091 - <j2seproject1:nbjpdareload/>
27.1092 - </target>
27.1093 - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
27.1094 - <!--
27.1095 - =================
27.1096 - PROFILING SECTION
27.1097 - =================
27.1098 - -->
27.1099 - <!--
27.1100 - pre NB7.2 profiler integration
27.1101 - -->
27.1102 - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
27.1103 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
27.1104 - <nbprofiledirect>
27.1105 - <classpath>
27.1106 - <path path="${run.classpath}"/>
27.1107 - </classpath>
27.1108 - </nbprofiledirect>
27.1109 - <profile/>
27.1110 - </target>
27.1111 - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
27.1112 - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
27.1113 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
27.1114 - <nbprofiledirect>
27.1115 - <classpath>
27.1116 - <path path="${run.classpath}"/>
27.1117 - </classpath>
27.1118 - </nbprofiledirect>
27.1119 - <profile classname="${profile.class}"/>
27.1120 - </target>
27.1121 - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
27.1122 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
27.1123 - <nbprofiledirect>
27.1124 - <classpath>
27.1125 - <path path="${run.classpath}"/>
27.1126 - </classpath>
27.1127 - </nbprofiledirect>
27.1128 - <profile classname="sun.applet.AppletViewer">
27.1129 - <customize>
27.1130 - <arg value="${applet.url}"/>
27.1131 - </customize>
27.1132 - </profile>
27.1133 - </target>
27.1134 - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
27.1135 - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
27.1136 - <nbprofiledirect>
27.1137 - <classpath>
27.1138 - <path path="${run.test.classpath}"/>
27.1139 - </classpath>
27.1140 - </nbprofiledirect>
27.1141 - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
27.1142 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
27.1143 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
27.1144 - <jvmarg line="${profiler.info.jvmargs}"/>
27.1145 - <test name="${profile.class}"/>
27.1146 - <classpath>
27.1147 - <path path="${run.test.classpath}"/>
27.1148 - </classpath>
27.1149 - <syspropertyset>
27.1150 - <propertyref prefix="test-sys-prop."/>
27.1151 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
27.1152 - </syspropertyset>
27.1153 - <formatter type="brief" usefile="false"/>
27.1154 - <formatter type="xml"/>
27.1155 - </junit>
27.1156 - </target>
27.1157 - <!--
27.1158 - end of pre NB72 profiling section
27.1159 - -->
27.1160 - <target if="netbeans.home" name="-profile-check">
27.1161 - <condition property="profiler.configured">
27.1162 - <or>
27.1163 - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
27.1164 - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
27.1165 - </or>
27.1166 - </condition>
27.1167 - </target>
27.1168 - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
27.1169 - <startprofiler/>
27.1170 - <antcall target="run"/>
27.1171 - </target>
27.1172 - <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">
27.1173 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
27.1174 - <startprofiler/>
27.1175 - <antcall target="run-single"/>
27.1176 - </target>
27.1177 - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
27.1178 - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
27.1179 - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
27.1180 - <startprofiler/>
27.1181 - <antcall target="test-single"/>
27.1182 - </target>
27.1183 - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
27.1184 - <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
27.1185 - <startprofiler/>
27.1186 - <antcal target="run-test-with-main"/>
27.1187 - </target>
27.1188 - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
27.1189 - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
27.1190 - <startprofiler/>
27.1191 - <antcall target="run-applet"/>
27.1192 - </target>
27.1193 - <!--
27.1194 - ===============
27.1195 - JAVADOC SECTION
27.1196 - ===============
27.1197 - -->
27.1198 - <target depends="init" if="have.sources" name="-javadoc-build">
27.1199 - <mkdir dir="${dist.javadoc.dir}"/>
27.1200 - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
27.1201 - <and>
27.1202 - <isset property="endorsed.classpath.cmd.line.arg"/>
27.1203 - <not>
27.1204 - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
27.1205 - </not>
27.1206 - </and>
27.1207 - </condition>
27.1208 - <condition else="" property="bug5101868workaround" value="*.java">
27.1209 - <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
27.1210 - </condition>
27.1211 - <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}">
27.1212 - <classpath>
27.1213 - <path path="${javac.classpath}"/>
27.1214 - </classpath>
27.1215 - <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
27.1216 - <filename name="**/*.java"/>
27.1217 - </fileset>
27.1218 - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
27.1219 - <include name="**/*.java"/>
27.1220 - <exclude name="*.java"/>
27.1221 - </fileset>
27.1222 - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
27.1223 - </javadoc>
27.1224 - <copy todir="${dist.javadoc.dir}">
27.1225 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
27.1226 - <filename name="**/doc-files/**"/>
27.1227 - </fileset>
27.1228 - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
27.1229 - <include name="**/doc-files/**"/>
27.1230 - </fileset>
27.1231 - </copy>
27.1232 - </target>
27.1233 - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
27.1234 - <nbbrowse file="${dist.javadoc.dir}/index.html"/>
27.1235 - </target>
27.1236 - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
27.1237 - <!--
27.1238 - =========================
27.1239 - TEST COMPILATION SECTION
27.1240 - =========================
27.1241 - -->
27.1242 - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
27.1243 - <mkdir dir="${build.test.classes.dir}"/>
27.1244 - </target>
27.1245 - <target name="-pre-compile-test">
27.1246 - <!-- Empty placeholder for easier customization. -->
27.1247 - <!-- You can override this target in the ../build.xml file. -->
27.1248 - </target>
27.1249 - <target if="do.depend.true" name="-compile-test-depend">
27.1250 - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
27.1251 - </target>
27.1252 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
27.1253 - <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}"/>
27.1254 - <copy todir="${build.test.classes.dir}">
27.1255 - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
27.1256 - </copy>
27.1257 - </target>
27.1258 - <target name="-post-compile-test">
27.1259 - <!-- Empty placeholder for easier customization. -->
27.1260 - <!-- You can override this target in the ../build.xml file. -->
27.1261 - </target>
27.1262 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
27.1263 - <target name="-pre-compile-test-single">
27.1264 - <!-- Empty placeholder for easier customization. -->
27.1265 - <!-- You can override this target in the ../build.xml file. -->
27.1266 - </target>
27.1267 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
27.1268 - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
27.1269 - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
27.1270 - <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}"/>
27.1271 - <copy todir="${build.test.classes.dir}">
27.1272 - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
27.1273 - </copy>
27.1274 - </target>
27.1275 - <target name="-post-compile-test-single">
27.1276 - <!-- Empty placeholder for easier customization. -->
27.1277 - <!-- You can override this target in the ../build.xml file. -->
27.1278 - </target>
27.1279 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
27.1280 - <!--
27.1281 - =======================
27.1282 - TEST EXECUTION SECTION
27.1283 - =======================
27.1284 - -->
27.1285 - <target depends="init" if="have.tests" name="-pre-test-run">
27.1286 - <mkdir dir="${build.test.results.dir}"/>
27.1287 - </target>
27.1288 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
27.1289 - <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
27.1290 - </target>
27.1291 - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
27.1292 - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
27.1293 - </target>
27.1294 - <target depends="init" if="have.tests" name="test-report"/>
27.1295 - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
27.1296 - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
27.1297 - <target depends="init" if="have.tests" name="-pre-test-run-single">
27.1298 - <mkdir dir="${build.test.results.dir}"/>
27.1299 - </target>
27.1300 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
27.1301 - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
27.1302 - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
27.1303 - </target>
27.1304 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
27.1305 - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
27.1306 - </target>
27.1307 - <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"/>
27.1308 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
27.1309 - <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
27.1310 - <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
27.1311 - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
27.1312 - </target>
27.1313 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
27.1314 - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
27.1315 - </target>
27.1316 - <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"/>
27.1317 - <!--
27.1318 - =======================
27.1319 - TEST DEBUGGING SECTION
27.1320 - =======================
27.1321 - -->
27.1322 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
27.1323 - <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
27.1324 - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
27.1325 - </target>
27.1326 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
27.1327 - <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
27.1328 - <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
27.1329 - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
27.1330 - </target>
27.1331 - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
27.1332 - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
27.1333 - </target>
27.1334 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
27.1335 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
27.1336 - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
27.1337 - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
27.1338 - </target>
27.1339 - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
27.1340 - <!--
27.1341 - =========================
27.1342 - APPLET EXECUTION SECTION
27.1343 - =========================
27.1344 - -->
27.1345 - <target depends="init,compile-single" name="run-applet">
27.1346 - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
27.1347 - <j2seproject1:java classname="sun.applet.AppletViewer">
27.1348 - <customize>
27.1349 - <arg value="${applet.url}"/>
27.1350 - </customize>
27.1351 - </j2seproject1:java>
27.1352 - </target>
27.1353 - <!--
27.1354 - =========================
27.1355 - APPLET DEBUGGING SECTION
27.1356 - =========================
27.1357 - -->
27.1358 - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
27.1359 - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
27.1360 - <j2seproject3:debug classname="sun.applet.AppletViewer">
27.1361 - <customize>
27.1362 - <arg value="${applet.url}"/>
27.1363 - </customize>
27.1364 - </j2seproject3:debug>
27.1365 - </target>
27.1366 - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
27.1367 - <!--
27.1368 - ===============
27.1369 - CLEANUP SECTION
27.1370 - ===============
27.1371 - -->
27.1372 - <target name="-deps-clean-init" unless="built-clean.properties">
27.1373 - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
27.1374 - <delete file="${built-clean.properties}" quiet="true"/>
27.1375 - </target>
27.1376 - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
27.1377 - <echo level="warn" message="Cycle detected: alt2xml-lib was already built"/>
27.1378 - </target>
27.1379 - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
27.1380 - <mkdir dir="${build.dir}"/>
27.1381 - <touch file="${built-clean.properties}" verbose="false"/>
27.1382 - <property file="${built-clean.properties}" prefix="already.built.clean."/>
27.1383 - <antcall target="-warn-already-built-clean"/>
27.1384 - <propertyfile file="${built-clean.properties}">
27.1385 - <entry key="${basedir}" value=""/>
27.1386 - </propertyfile>
27.1387 - </target>
27.1388 - <target depends="init" name="-do-clean">
27.1389 - <delete dir="${build.dir}"/>
27.1390 - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
27.1391 - </target>
27.1392 - <target name="-post-clean">
27.1393 - <!-- Empty placeholder for easier customization. -->
27.1394 - <!-- You can override this target in the ../build.xml file. -->
27.1395 - </target>
27.1396 - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
27.1397 - <target name="-check-call-dep">
27.1398 - <property file="${call.built.properties}" prefix="already.built."/>
27.1399 - <condition property="should.call.dep">
27.1400 - <and>
27.1401 - <not>
27.1402 - <isset property="already.built.${call.subproject}"/>
27.1403 - </not>
27.1404 - <available file="${call.script}"/>
27.1405 - </and>
27.1406 - </condition>
27.1407 - </target>
27.1408 - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
27.1409 - <ant antfile="${call.script}" inheritall="false" target="${call.target}">
27.1410 - <propertyset>
27.1411 - <propertyref prefix="transfer."/>
27.1412 - <mapper from="transfer.*" to="*" type="glob"/>
27.1413 - </propertyset>
27.1414 - </ant>
27.1415 - </target>
27.1416 -</project>
28.1 --- a/java/alt2xml-lib/nbproject/genfiles.properties Sat Jun 07 21:57:50 2014 +0200
28.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
28.3 @@ -1,8 +0,0 @@
28.4 -build.xml.data.CRC32=cbc99b8c
28.5 -build.xml.script.CRC32=b9c31994
28.6 -build.xml.stylesheet.CRC32=8064a381@1.74.2.48
28.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
28.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
28.9 -nbproject/build-impl.xml.data.CRC32=cbc99b8c
28.10 -nbproject/build-impl.xml.script.CRC32=a496a745
28.11 -nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.2.48
29.1 --- a/java/alt2xml-lib/nbproject/project.properties Sat Jun 07 21:57:50 2014 +0200
29.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
29.3 @@ -1,71 +0,0 @@
29.4 -annotation.processing.enabled=true
29.5 -annotation.processing.enabled.in.editor=false
29.6 -annotation.processing.processor.options=
29.7 -annotation.processing.processors.list=
29.8 -annotation.processing.run.all.processors=true
29.9 -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
29.10 -build.classes.dir=${build.dir}/classes
29.11 -build.classes.excludes=**/*.java,**/*.form
29.12 -# This directory is removed when the project is cleaned:
29.13 -build.dir=build
29.14 -build.generated.dir=${build.dir}/generated
29.15 -build.generated.sources.dir=${build.dir}/generated-sources
29.16 -# Only compile against the classpath explicitly listed here:
29.17 -build.sysclasspath=ignore
29.18 -build.test.classes.dir=${build.dir}/test/classes
29.19 -build.test.results.dir=${build.dir}/test/results
29.20 -# Uncomment to specify the preferred debugger connection transport:
29.21 -#debug.transport=dt_socket
29.22 -debug.classpath=\
29.23 - ${run.classpath}
29.24 -debug.test.classpath=\
29.25 - ${run.test.classpath}
29.26 -# Files in build.classes.dir which should be excluded from distribution jar
29.27 -dist.archive.excludes=
29.28 -# This directory is removed when the project is cleaned:
29.29 -dist.dir=dist
29.30 -dist.jar=${dist.dir}/alt2xml-lib.jar
29.31 -dist.javadoc.dir=${dist.dir}/javadoc
29.32 -excludes=
29.33 -includes=**
29.34 -jar.compress=false
29.35 -javac.classpath=
29.36 -# Space-separated list of extra javac options
29.37 -javac.compilerargs=
29.38 -javac.deprecation=false
29.39 -javac.processorpath=\
29.40 - ${javac.classpath}
29.41 -javac.source=1.7
29.42 -javac.target=1.7
29.43 -javac.test.classpath=\
29.44 - ${javac.classpath}:\
29.45 - ${build.classes.dir}
29.46 -javac.test.processorpath=\
29.47 - ${javac.test.classpath}
29.48 -javadoc.additionalparam=
29.49 -javadoc.author=false
29.50 -javadoc.encoding=${source.encoding}
29.51 -javadoc.noindex=false
29.52 -javadoc.nonavbar=false
29.53 -javadoc.notree=false
29.54 -javadoc.private=false
29.55 -javadoc.splitindex=true
29.56 -javadoc.use=true
29.57 -javadoc.version=false
29.58 -javadoc.windowtitle=
29.59 -meta.inf.dir=${src.dir}/META-INF
29.60 -mkdist.disabled=true
29.61 -platform.active=default_platform
29.62 -run.classpath=\
29.63 - ${javac.classpath}:\
29.64 - ${build.classes.dir}
29.65 -# Space-separated list of JVM arguments used when running the project.
29.66 -# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
29.67 -# To set system properties for unit tests define test-sys-prop.name=value:
29.68 -run.jvmargs=
29.69 -run.test.classpath=\
29.70 - ${javac.test.classpath}:\
29.71 - ${build.test.classes.dir}
29.72 -source.encoding=UTF-8
29.73 -src.dir=src
29.74 -test.src.dir=test
30.1 --- a/java/alt2xml-lib/nbproject/project.xml Sat Jun 07 21:57:50 2014 +0200
30.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
30.3 @@ -1,15 +0,0 @@
30.4 -<?xml version="1.0" encoding="UTF-8"?>
30.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
30.6 - <type>org.netbeans.modules.java.j2seproject</type>
30.7 - <configuration>
30.8 - <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
30.9 - <name>alt2xml-lib</name>
30.10 - <source-roots>
30.11 - <root id="src.dir"/>
30.12 - </source-roots>
30.13 - <test-roots>
30.14 - <root id="test.src.dir"/>
30.15 - </test-roots>
30.16 - </data>
30.17 - </configuration>
30.18 -</project>
31.1 --- a/java/alt2xml-lib/src/cz/frantovo/alt2xml/AbstractAlt2XmlReader.java Sat Jun 07 21:57:50 2014 +0200
31.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
31.3 @@ -1,116 +0,0 @@
31.4 -/**
31.5 - * Alt2XML
31.6 - * Copyright © 2014 František Kučera (frantovo.cz)
31.7 - *
31.8 - * This program is free software: you can redistribute it and/or modify
31.9 - * it under the terms of the GNU General Public License as published by
31.10 - * the Free Software Foundation, either version 3 of the License, or
31.11 - * (at your option) any later version.
31.12 - *
31.13 - * This program is distributed in the hope that it will be useful,
31.14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
31.15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31.16 - * GNU General Public License for more details.
31.17 - *
31.18 - * You should have received a copy of the GNU General Public License
31.19 - * along with this program. If not, see <http://www.gnu.org/licenses/>.
31.20 - */
31.21 -package cz.frantovo.alt2xml;
31.22 -
31.23 -import java.io.IOException;
31.24 -import java.util.HashMap;
31.25 -import java.util.Map;
31.26 -import org.xml.sax.ContentHandler;
31.27 -import org.xml.sax.DTDHandler;
31.28 -import org.xml.sax.EntityResolver;
31.29 -import org.xml.sax.ErrorHandler;
31.30 -import org.xml.sax.InputSource;
31.31 -import org.xml.sax.SAXException;
31.32 -import org.xml.sax.SAXNotRecognizedException;
31.33 -import org.xml.sax.SAXNotSupportedException;
31.34 -import org.xml.sax.XMLReader;
31.35 -
31.36 -/**
31.37 - * Recommended base class for all alternative format readers.
31.38 - *
31.39 - * @author Ing. František Kučera (frantovo.cz)
31.40 - */
31.41 -public abstract class AbstractAlt2XmlReader implements XMLReader {
31.42 -
31.43 - protected ContentHandler contentHandler;
31.44 - protected ErrorHandler errorHandler;
31.45 - protected DTDHandler dtdHandler;
31.46 - protected EntityResolver entityResolver;
31.47 - protected Map<String, Object> properties = new HashMap<>();
31.48 -
31.49 - @Override
31.50 - public void parse(String systemId) throws IOException, SAXException {
31.51 - parse(new InputSource(systemId));
31.52 - }
31.53 -
31.54 - @Override
31.55 - public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
31.56 - /**
31.57 - * TODO:
31.58 - * All XMLReaders are required to recognize
31.59 - * the http://xml.org/sax/features/namespaces
31.60 - * and the http://xml.org/sax/features/namespace-prefixes feature names.
31.61 - */
31.62 - throw new SAXNotSupportedException("Zatím není podporováno.");
31.63 - }
31.64 -
31.65 - @Override
31.66 - public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
31.67 - throw new SAXNotSupportedException("Zatím není podporováno.");
31.68 - }
31.69 -
31.70 - @Override
31.71 - public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
31.72 - return properties.get(name);
31.73 - }
31.74 -
31.75 - @Override
31.76 - public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
31.77 - properties.put(name, value);
31.78 - }
31.79 -
31.80 - @Override
31.81 - public void setEntityResolver(EntityResolver entityResolver) {
31.82 - this.entityResolver = entityResolver;
31.83 - }
31.84 -
31.85 - @Override
31.86 - public EntityResolver getEntityResolver() {
31.87 - return entityResolver;
31.88 - }
31.89 -
31.90 - @Override
31.91 - public void setDTDHandler(DTDHandler dtdHandler) {
31.92 - this.dtdHandler = dtdHandler;
31.93 - }
31.94 -
31.95 - @Override
31.96 - public DTDHandler getDTDHandler() {
31.97 - return dtdHandler;
31.98 - }
31.99 -
31.100 - @Override
31.101 - public void setContentHandler(ContentHandler contentHandler) {
31.102 - this.contentHandler = contentHandler;
31.103 - }
31.104 -
31.105 - @Override
31.106 - public ContentHandler getContentHandler() {
31.107 - return contentHandler;
31.108 - }
31.109 -
31.110 - @Override
31.111 - public void setErrorHandler(ErrorHandler errorHandler) {
31.112 - this.errorHandler = errorHandler;
31.113 - }
31.114 -
31.115 - @Override
31.116 - public ErrorHandler getErrorHandler() {
31.117 - return errorHandler;
31.118 - }
31.119 -}
32.1 --- a/java/alt2xml-lib/src/cz/frantovo/alt2xml/Alt2XmlReaderFactory.java Sat Jun 07 21:57:50 2014 +0200
32.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
32.3 @@ -1,35 +0,0 @@
32.4 -/**
32.5 - * Alt2XML
32.6 - * Copyright © 2014 František Kučera (frantovo.cz)
32.7 - *
32.8 - * This program is free software: you can redistribute it and/or modify
32.9 - * it under the terms of the GNU General Public License as published by
32.10 - * the Free Software Foundation, either version 3 of the License, or
32.11 - * (at your option) any later version.
32.12 - *
32.13 - * This program is distributed in the hope that it will be useful,
32.14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
32.15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32.16 - * GNU General Public License for more details.
32.17 - *
32.18 - * You should have received a copy of the GNU General Public License
32.19 - * along with this program. If not, see <http://www.gnu.org/licenses/>.
32.20 - */
32.21 -package cz.frantovo.alt2xml;
32.22 -
32.23 -import org.xml.sax.XMLReader;
32.24 -
32.25 -/**
32.26 - *
32.27 - * @author Ing. František Kučera (frantovo.cz)
32.28 - */
32.29 -public interface Alt2XmlReaderFactory {
32.30 -
32.31 - /**
32.32 - * @param systemId system ID of the document to be read
32.33 - * @return whether this alternative format is supported
32.34 - */
32.35 - public boolean canRead(String systemId);
32.36 -
32.37 - public XMLReader getReader();
32.38 -}
33.1 --- a/java/alt2xml-lib/src/cz/frantovo/alt2xml/Alt2XmlRegexReaderFactory.java Sat Jun 07 21:57:50 2014 +0200
33.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
33.3 @@ -1,36 +0,0 @@
33.4 -/**
33.5 - * Alt2XML
33.6 - * Copyright © 2014 František Kučera (frantovo.cz)
33.7 - *
33.8 - * This program is free software: you can redistribute it and/or modify
33.9 - * it under the terms of the GNU General Public License as published by
33.10 - * the Free Software Foundation, either version 3 of the License, or
33.11 - * (at your option) any later version.
33.12 - *
33.13 - * This program is distributed in the hope that it will be useful,
33.14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
33.15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33.16 - * GNU General Public License for more details.
33.17 - *
33.18 - * You should have received a copy of the GNU General Public License
33.19 - * along with this program. If not, see <http://www.gnu.org/licenses/>.
33.20 - */
33.21 -package cz.frantovo.alt2xml;
33.22 -
33.23 -import java.util.regex.Pattern;
33.24 -
33.25 -/**
33.26 - * Factory for XMLReaders that can read documents with systemId defined by given pattern (typically
33.27 - * file extension like .ini, .properties etc.)
33.28 - *
33.29 - * @author Ing. František Kučera (frantovo.cz)
33.30 - */
33.31 -public abstract class Alt2XmlRegexReaderFactory implements Alt2XmlReaderFactory {
33.32 -
33.33 - protected abstract Pattern getSystemIdPattern();
33.34 -
33.35 - @Override
33.36 - public boolean canRead(String systemId) {
33.37 - return getSystemIdPattern().matcher(systemId).matches();
33.38 - }
33.39 -}
34.1 --- a/java/alt2xml-lib/src/cz/frantovo/alt2xml/AltInputSource.java Sat Jun 07 21:57:50 2014 +0200
34.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
34.3 @@ -1,127 +0,0 @@
34.4 -/**
34.5 - * Alt2XML
34.6 - * Copyright © 2014 František Kučera (frantovo.cz)
34.7 - *
34.8 - * This program is free software: you can redistribute it and/or modify
34.9 - * it under the terms of the GNU General Public License as published by
34.10 - * the Free Software Foundation, either version 3 of the License, or
34.11 - * (at your option) any later version.
34.12 - *
34.13 - * This program is distributed in the hope that it will be useful,
34.14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
34.15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34.16 - * GNU General Public License for more details.
34.17 - *
34.18 - * You should have received a copy of the GNU General Public License
34.19 - * along with this program. If not, see <http://www.gnu.org/licenses/>.
34.20 - */
34.21 -package cz.frantovo.alt2xml;
34.22 -
34.23 -import java.io.IOException;
34.24 -import java.io.InputStream;
34.25 -import java.io.InputStreamReader;
34.26 -import java.io.Reader;
34.27 -import java.io.UnsupportedEncodingException;
34.28 -import java.net.MalformedURLException;
34.29 -import java.net.URL;
34.30 -import java.util.logging.Level;
34.31 -import java.util.logging.Logger;
34.32 -import org.xml.sax.EntityResolver;
34.33 -import org.xml.sax.InputSource;
34.34 -import org.xml.sax.SAXException;
34.35 -
34.36 -/**
34.37 - *
34.38 - * @author Ing. František Kučera (frantovo.cz)
34.39 - */
34.40 -public class AltInputSource extends InputSource {
34.41 -
34.42 - private final EntityResolver entityResolver;
34.43 - private final InputSource originalSource;
34.44 -
34.45 - private static final Logger log = Logger.getLogger(AltInputSource.class.getName());
34.46 -
34.47 - public AltInputSource(EntityResolver entityResolver, InputSource originalSource) {
34.48 - this.entityResolver = entityResolver;
34.49 - this.originalSource = originalSource;
34.50 - }
34.51 -
34.52 - @Override
34.53 - public InputStream getByteStream() {
34.54 - InputStream originalStream = originalSource.getByteStream();
34.55 -
34.56 - if (originalStream == null) {
34.57 -
34.58 - InputSource source = originalSource;
34.59 -
34.60 - if (entityResolver != null) {
34.61 - try {
34.62 - InputSource resolvedSource = entityResolver.resolveEntity(originalSource.getSystemId(), originalSource.getSystemId());
34.63 - if (resolvedSource != null) {
34.64 - source = resolvedSource;
34.65 - }
34.66 - } catch (IOException | SAXException e) {
34.67 - log.log(Level.WARNING, "Error while resolving InputSource – publicId: " + originalSource.getPublicId() + " systemId: " + originalSource.getSystemId(), e);
34.68 - }
34.69 - }
34.70 -
34.71 - InputStream resolvedStream = source.getByteStream();
34.72 -
34.73 - if (resolvedStream == null) {
34.74 -
34.75 - try {
34.76 - URL url = new URL(source.getSystemId());
34.77 - return url.openStream();
34.78 - } catch (MalformedURLException e) {
34.79 - log.log(Level.WARNING, "Invalid SystemId URL syntax: " + originalSource.getSystemId(), e);
34.80 - return null;
34.81 - } catch (IOException e) {
34.82 - log.log(Level.WARNING, "Unable to open stream for systemId: " + originalSource.getSystemId(), e);
34.83 - return null;
34.84 - }
34.85 - } else {
34.86 - return resolvedStream;
34.87 - }
34.88 -
34.89 - } else {
34.90 - return originalStream;
34.91 - }
34.92 - }
34.93 -
34.94 - @Override
34.95 - public Reader getCharacterStream() {
34.96 - Reader originalStream = originalSource.getCharacterStream();
34.97 -
34.98 - if (originalStream == null) {
34.99 - String encoding = getEncoding();
34.100 -
34.101 - if (encoding == null) {
34.102 - return new InputStreamReader(getByteStream());
34.103 - } else {
34.104 - try {
34.105 - return new InputStreamReader(getByteStream(), encoding);
34.106 - } catch (UnsupportedEncodingException e) {
34.107 - log.log(Level.WARNING, "Invalid encoding: " + encoding, e);
34.108 - return null;
34.109 - }
34.110 - }
34.111 - } else {
34.112 - return originalStream;
34.113 - }
34.114 - }
34.115 -
34.116 - @Override
34.117 - public String getEncoding() {
34.118 - return originalSource.getEncoding();
34.119 - }
34.120 -
34.121 - @Override
34.122 - public String getPublicId() {
34.123 - return originalSource.getPublicId();
34.124 - }
34.125 -
34.126 - @Override
34.127 - public String getSystemId() {
34.128 - return originalSource.getSystemId();
34.129 - }
34.130 -}
35.1 --- a/java/alt2xml-lib/src/cz/frantovo/alt2xml/ParserFactory.java Sat Jun 07 21:57:50 2014 +0200
35.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
35.3 @@ -1,112 +0,0 @@
35.4 -/**
35.5 - * Alt2XML
35.6 - * Copyright © 2014 František Kučera (frantovo.cz)
35.7 - *
35.8 - * This program is free software: you can redistribute it and/or modify
35.9 - * it under the terms of the GNU General Public License as published by
35.10 - * the Free Software Foundation, either version 3 of the License, or
35.11 - * (at your option) any later version.
35.12 - *
35.13 - * This program is distributed in the hope that it will be useful,
35.14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
35.15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35.16 - * GNU General Public License for more details.
35.17 - *
35.18 - * You should have received a copy of the GNU General Public License
35.19 - * along with this program. If not, see <http://www.gnu.org/licenses/>.
35.20 - */
35.21 -package cz.frantovo.alt2xml;
35.22 -
35.23 -import java.util.Deque;
35.24 -import java.util.LinkedList;
35.25 -import java.util.ServiceLoader;
35.26 -import javax.xml.parsers.ParserConfigurationException;
35.27 -import javax.xml.parsers.SAXParser;
35.28 -import javax.xml.parsers.SAXParserFactory;
35.29 -import org.xml.sax.Parser;
35.30 -import org.xml.sax.SAXException;
35.31 -import org.xml.sax.SAXNotRecognizedException;
35.32 -import org.xml.sax.SAXNotSupportedException;
35.33 -import org.xml.sax.XMLReader;
35.34 -
35.35 -/**
35.36 - *
35.37 - * @author Ing. František Kučera (frantovo.cz)
35.38 - */
35.39 -public class ParserFactory extends SAXParserFactory implements ReaderFinder {
35.40 -
35.41 - private final Deque<Alt2XmlReaderFactory> readerFactories = new LinkedList();
35.42 -
35.43 - public ParserFactory() {
35.44 - super();
35.45 - for (Alt2XmlReaderFactory f : ServiceLoader.load(Alt2XmlReaderFactory.class)) {
35.46 - readerFactories.add(f);
35.47 - }
35.48 -
35.49 - }
35.50 -
35.51 - @Override
35.52 - public XMLReader findReader(String systemId) throws SAXException {
35.53 - for (Alt2XmlReaderFactory f : readerFactories) {
35.54 - if (f.canRead(systemId)) {
35.55 - return f.getReader();
35.56 - }
35.57 - }
35.58 - throw new SAXException("Iterated over " + readerFactories.size() + " and was unable to find XMLReader for SystemId: " + systemId);
35.59 - }
35.60 -
35.61 - @Override
35.62 - public SAXParser newSAXParser() throws ParserConfigurationException, SAXException {
35.63 - return new AltSAXParser(new SuperReader(this));
35.64 - }
35.65 -
35.66 - @Override
35.67 - public void setFeature(String name, boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException {
35.68 - throw new SAXNotSupportedException("Zatím není podporováno.");
35.69 - }
35.70 -
35.71 - @Override
35.72 - public boolean getFeature(String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException {
35.73 - throw new SAXNotSupportedException("Zatím není podporováno.");
35.74 - }
35.75 -
35.76 - private static class AltSAXParser extends SAXParser {
35.77 -
35.78 - private XMLReader xmlReader;
35.79 -
35.80 - public AltSAXParser(XMLReader xmlReader) {
35.81 - this.xmlReader = xmlReader;
35.82 - }
35.83 -
35.84 - @Override
35.85 - @Deprecated
35.86 - public Parser getParser() throws SAXException {
35.87 - throw new SAXException("Není podporováno.");
35.88 - }
35.89 -
35.90 - @Override
35.91 - public XMLReader getXMLReader() throws SAXException {
35.92 - return xmlReader;
35.93 - }
35.94 -
35.95 - @Override
35.96 - public boolean isNamespaceAware() {
35.97 - return true;
35.98 - }
35.99 -
35.100 - @Override
35.101 - public boolean isValidating() {
35.102 - return false;
35.103 - }
35.104 -
35.105 - @Override
35.106 - public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
35.107 - xmlReader.setProperty(name, value);
35.108 - }
35.109 -
35.110 - @Override
35.111 - public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
35.112 - return xmlReader.getProperty(name);
35.113 - }
35.114 - }
35.115 -}
36.1 --- a/java/alt2xml-lib/src/cz/frantovo/alt2xml/ReaderFinder.java Sat Jun 07 21:57:50 2014 +0200
36.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
36.3 @@ -1,20 +0,0 @@
36.4 -package cz.frantovo.alt2xml;
36.5 -
36.6 -import org.xml.sax.SAXException;
36.7 -import org.xml.sax.XMLReader;
36.8 -
36.9 -/**
36.10 - *
36.11 - * @author Ing. František Kučera (frantovo.cz)
36.12 - */
36.13 -public interface ReaderFinder {
36.14 -
36.15 - /**
36.16 - *
36.17 - * @param systemId systemId of the document which should be parsed
36.18 - * @return XMLReader appropriate for this document
36.19 - * @throws org.xml.sax.SAXException if we have no reader for given systemId
36.20 - */
36.21 - public XMLReader findReader(String systemId) throws SAXException;
36.22 -
36.23 -}
37.1 --- a/java/alt2xml-lib/src/cz/frantovo/alt2xml/SuperReader.java Sat Jun 07 21:57:50 2014 +0200
37.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
37.3 @@ -1,148 +0,0 @@
37.4 -/**
37.5 - * Alt2XML
37.6 - * Copyright © 2014 František Kučera (frantovo.cz)
37.7 - *
37.8 - * This program is free software: you can redistribute it and/or modify
37.9 - * it under the terms of the GNU General Public License as published by
37.10 - * the Free Software Foundation, either version 3 of the License, or
37.11 - * (at your option) any later version.
37.12 - *
37.13 - * This program is distributed in the hope that it will be useful,
37.14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
37.15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37.16 - * GNU General Public License for more details.
37.17 - *
37.18 - * You should have received a copy of the GNU General Public License
37.19 - * along with this program. If not, see <http://www.gnu.org/licenses/>.
37.20 - */
37.21 -package cz.frantovo.alt2xml;
37.22 -
37.23 -import java.io.IOException;
37.24 -import java.util.HashMap;
37.25 -import java.util.Map;
37.26 -import java.util.Map.Entry;
37.27 -import org.xml.sax.ContentHandler;
37.28 -import org.xml.sax.DTDHandler;
37.29 -import org.xml.sax.EntityResolver;
37.30 -import org.xml.sax.ErrorHandler;
37.31 -import org.xml.sax.InputSource;
37.32 -import org.xml.sax.SAXException;
37.33 -import org.xml.sax.SAXNotRecognizedException;
37.34 -import org.xml.sax.SAXNotSupportedException;
37.35 -import org.xml.sax.XMLReader;
37.36 -
37.37 -/**
37.38 - *
37.39 - * @author Ing. František Kučera (frantovo.cz)
37.40 - */
37.41 -public class SuperReader implements XMLReader {
37.42 -
37.43 - private ContentHandler contentHandler;
37.44 - private ErrorHandler errorHandler;
37.45 - private DTDHandler dtdHandler;
37.46 - private EntityResolver entityResolver;
37.47 - private final Map<String, Object> properties = new HashMap<>();
37.48 - private final Map<String, Boolean> features = new HashMap<>();
37.49 - private final ReaderFinder readerFinder;
37.50 -
37.51 - public SuperReader(ReaderFinder readerFinder) {
37.52 - this.readerFinder = readerFinder;
37.53 - }
37.54 -
37.55 - @Override
37.56 - public void parse(InputSource input) throws IOException, SAXException {
37.57 -
37.58 - input = new AltInputSource(entityResolver, input);
37.59 -
37.60 - XMLReader reader = readerFinder.findReader(input.getSystemId());
37.61 -
37.62 - reader.setContentHandler(contentHandler);
37.63 - reader.setDTDHandler(dtdHandler);
37.64 - reader.setEntityResolver(entityResolver);
37.65 - reader.setErrorHandler(errorHandler);
37.66 -
37.67 - for (Entry<String, Object> e : properties.entrySet()) {
37.68 - reader.setProperty(e.getKey(), e.getValue());
37.69 - }
37.70 -
37.71 - for (Entry<String, Boolean> e : features.entrySet()) {
37.72 - reader.setFeature(e.getKey(), e.getValue());
37.73 - }
37.74 -
37.75 - reader.parse(input);
37.76 - }
37.77 -
37.78 - @Override
37.79 - public void parse(String systemId) throws IOException, SAXException {
37.80 - parse(new InputSource(systemId));
37.81 - }
37.82 -
37.83 - @Override
37.84 - public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
37.85 - /**
37.86 - * TODO:
37.87 - * All XMLReaders are required to recognize
37.88 - * the http://xml.org/sax/features/namespaces
37.89 - * and the http://xml.org/sax/features/namespace-prefixes feature names.
37.90 - */
37.91 - return features.get(name);
37.92 - }
37.93 -
37.94 - @Override
37.95 - public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
37.96 - /**
37.97 - * TODO: filtrovat – povolit jen náš jmenný prostor
37.98 - */
37.99 - features.put(name, value);
37.100 - }
37.101 -
37.102 - @Override
37.103 - public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
37.104 - return properties.get(name);
37.105 - }
37.106 -
37.107 - @Override
37.108 - public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
37.109 - properties.put(name, value);
37.110 - }
37.111 -
37.112 - @Override
37.113 - public void setEntityResolver(EntityResolver entityResolver) {
37.114 - this.entityResolver = entityResolver;
37.115 - }
37.116 -
37.117 - @Override
37.118 - public EntityResolver getEntityResolver() {
37.119 - return entityResolver;
37.120 - }
37.121 -
37.122 - @Override
37.123 - public void setDTDHandler(DTDHandler dtdHandler) {
37.124 - this.dtdHandler = dtdHandler;
37.125 - }
37.126 -
37.127 - @Override
37.128 - public DTDHandler getDTDHandler() {
37.129 - return dtdHandler;
37.130 - }
37.131 -
37.132 - @Override
37.133 - public void setContentHandler(ContentHandler contentHandler) {
37.134 - this.contentHandler = contentHandler;
37.135 - }
37.136 -
37.137 - @Override
37.138 - public ContentHandler getContentHandler() {
37.139 - return contentHandler;
37.140 - }
37.141 -
37.142 - @Override
37.143 - public void setErrorHandler(ErrorHandler errorHandler) {
37.144 - this.errorHandler = errorHandler;
37.145 - }
37.146 -
37.147 - @Override
37.148 - public ErrorHandler getErrorHandler() {
37.149 - return errorHandler;
37.150 - }
37.151 -}
38.1 --- a/scripts/alt2xml.sh Sat Jun 07 21:57:50 2014 +0200
38.2 +++ b/scripts/alt2xml.sh Sat Jun 07 22:09:32 2014 +0200
38.3 @@ -4,7 +4,7 @@
38.4
38.5 STANDARD_JARS=(
38.6 "$DIR/java/alt2xml-cli/dist/alt2xml-cli.jar"
38.7 - "$DIR/java/alt2xml-lib/dist/alt2xml-lib.jar"
38.8 + "$DIR/java/alt2xml-lib-input/dist/alt2xml-lib-input.jar"
38.9 );
38.10
38.11 PLUGINS=(