Web query for duplicates, preparing for feature-packed distribution of indexing-backend
1.1 --- a/duplicates/ide/impl/src/org/netbeans/modules/jackpot30/impl/duplicates/indexing/RemoteDuplicatesIndex.java Fri Jun 29 11:01:27 2012 +0200
1.2 +++ b/duplicates/ide/impl/src/org/netbeans/modules/jackpot30/impl/duplicates/indexing/RemoteDuplicatesIndex.java Tue Jul 03 21:14:12 2012 +0200
1.3 @@ -193,7 +193,7 @@
1.4 private static Map<String, Map<String, Collection<? extends String>>> findHashOccurrencesRemote(URI remoteIndex, Iterable<? extends String> hashes) {
1.5 try {
1.6 String indexURL = remoteIndex.toASCIIString();
1.7 - URI u = new URI(indexURL + "/findDuplicates?hashes=" + WebUtilities.escapeForQuery(Pojson.save(hashes)));
1.8 + URI u = new URI(indexURL + "/duplicates/findDuplicates?hashes=" + WebUtilities.escapeForQuery(Pojson.save(hashes)));
1.9 String hashesMap = WebUtilities.requestStringResponse(u);
1.10
1.11 if (hashesMap == null) {
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/duplicates/server/web/duplicates.web.api/build.xml Tue Jul 03 21:14:12 2012 +0200
2.3 @@ -0,0 +1,74 @@
2.4 +<?xml version="1.0" encoding="UTF-8"?>
2.5 +<!-- You may freely edit this file. See commented blocks below for -->
2.6 +<!-- some examples of how to customize the build. -->
2.7 +<!-- (If you delete it and reopen the project it will be recreated.) -->
2.8 +<!-- By default, only the Clean and Build commands use this build script. -->
2.9 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
2.10 +<!-- the Compile on Save feature is turned off for the project. -->
2.11 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
2.12 +<!-- in the project's Project Properties dialog box.-->
2.13 +<project name="duplicates.web.api" default="default" basedir=".">
2.14 + <description>Builds, tests, and runs the project duplicates.web.api.</description>
2.15 + <import file="nbproject/build-impl.xml"/>
2.16 + <!--
2.17 +
2.18 + There exist several targets which are by default empty and which can be
2.19 + used for execution of your tasks. These targets are usually executed
2.20 + before and after some main targets. They are:
2.21 +
2.22 + -pre-init: called before initialization of project properties
2.23 + -post-init: called after initialization of project properties
2.24 + -pre-compile: called before javac compilation
2.25 + -post-compile: called after javac compilation
2.26 + -pre-compile-single: called before javac compilation of single file
2.27 + -post-compile-single: called after javac compilation of single file
2.28 + -pre-compile-test: called before javac compilation of JUnit tests
2.29 + -post-compile-test: called after javac compilation of JUnit tests
2.30 + -pre-compile-test-single: called before javac compilation of single JUnit test
2.31 + -post-compile-test-single: called after javac compilation of single JUunit test
2.32 + -pre-jar: called before JAR building
2.33 + -post-jar: called after JAR building
2.34 + -post-clean: called after cleaning build products
2.35 +
2.36 + (Targets beginning with '-' are not intended to be called on their own.)
2.37 +
2.38 + Example of inserting an obfuscator after compilation could look like this:
2.39 +
2.40 + <target name="-post-compile">
2.41 + <obfuscate>
2.42 + <fileset dir="${build.classes.dir}"/>
2.43 + </obfuscate>
2.44 + </target>
2.45 +
2.46 + For list of available properties check the imported
2.47 + nbproject/build-impl.xml file.
2.48 +
2.49 +
2.50 + Another way to customize the build is by overriding existing main targets.
2.51 + The targets of interest are:
2.52 +
2.53 + -init-macrodef-javac: defines macro for javac compilation
2.54 + -init-macrodef-junit: defines macro for junit execution
2.55 + -init-macrodef-debug: defines macro for class debugging
2.56 + -init-macrodef-java: defines macro for class execution
2.57 + -do-jar-with-manifest: JAR building (if you are using a manifest)
2.58 + -do-jar-without-manifest: JAR building (if you are not using a manifest)
2.59 + run: execution of project
2.60 + -javadoc-build: Javadoc generation
2.61 + test-report: JUnit report generation
2.62 +
2.63 + An example of overriding the target for project execution could look like this:
2.64 +
2.65 + <target name="run" depends="duplicates.web.api-impl.jar">
2.66 + <exec dir="bin" executable="launcher.exe">
2.67 + <arg file="${dist.jar}"/>
2.68 + </exec>
2.69 + </target>
2.70 +
2.71 + Notice that the overridden target depends on the jar target and not only on
2.72 + the compile target as the regular run target does. Again, for a list of available
2.73 + properties which you can use, check the target you are overriding in the
2.74 + nbproject/build-impl.xml file.
2.75 +
2.76 + -->
2.77 +</project>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/duplicates/server/web/duplicates.web.api/manifest.mf Tue Jul 03 21:14:12 2012 +0200
3.3 @@ -0,0 +1,3 @@
3.4 +Manifest-Version: 1.0
3.5 +X-COMMENT: Main-Class will be added automatically by build
3.6 +
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/duplicates/server/web/duplicates.web.api/nbproject/build-impl.xml Tue Jul 03 21:14:12 2012 +0200
4.3 @@ -0,0 +1,1439 @@
4.4 +<?xml version="1.0" encoding="UTF-8"?>
4.5 +<!--
4.6 +*** GENERATED FROM project.xml - DO NOT EDIT ***
4.7 +*** EDIT ../build.xml INSTEAD ***
4.8 +
4.9 +For the purpose of easier reading the script
4.10 +is divided into following sections:
4.11 +
4.12 + - initialization
4.13 + - compilation
4.14 + - jar
4.15 + - execution
4.16 + - debugging
4.17 + - javadoc
4.18 + - test compilation
4.19 + - test execution
4.20 + - test debugging
4.21 + - applet
4.22 + - cleanup
4.23 +
4.24 + -->
4.25 +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="duplicates.web.api-impl">
4.26 + <fail message="Please build using Ant 1.8.0 or higher.">
4.27 + <condition>
4.28 + <not>
4.29 + <antversion atleast="1.8.0"/>
4.30 + </not>
4.31 + </condition>
4.32 + </fail>
4.33 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
4.34 + <!--
4.35 + ======================
4.36 + INITIALIZATION SECTION
4.37 + ======================
4.38 + -->
4.39 + <target name="-pre-init">
4.40 + <!-- Empty placeholder for easier customization. -->
4.41 + <!-- You can override this target in the ../build.xml file. -->
4.42 + </target>
4.43 + <target depends="-pre-init" name="-init-private">
4.44 + <property file="nbproject/private/config.properties"/>
4.45 + <property file="nbproject/private/configs/${config}.properties"/>
4.46 + <property file="nbproject/private/private.properties"/>
4.47 + </target>
4.48 + <target name="-pre-init-libraries">
4.49 + <property location="../../../../lib/nblibraries.properties" name="libraries.path"/>
4.50 + <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/>
4.51 + <pathconvert dirsep="/" property="libraries.dir">
4.52 + <path path="${libraries.dir.nativedirsep}"/>
4.53 + </pathconvert>
4.54 + <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/>
4.55 + <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/>
4.56 + </target>
4.57 + <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries">
4.58 + <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties">
4.59 + <filterchain>
4.60 + <replacestring from="$${base}" to="${libraries.dir}"/>
4.61 + <escapeunicode/>
4.62 + </filterchain>
4.63 + </loadproperties>
4.64 + </target>
4.65 + <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries">
4.66 + <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}">
4.67 + <filterchain>
4.68 + <replacestring from="$${base}" to="${libraries.dir}"/>
4.69 + <escapeunicode/>
4.70 + </filterchain>
4.71 + </loadproperties>
4.72 + </target>
4.73 + <target depends="-pre-init,-init-private,-init-libraries" name="-init-user">
4.74 + <property file="${user.properties.file}"/>
4.75 + <!-- The two properties below are usually overridden -->
4.76 + <!-- by the active platform. Just a fallback. -->
4.77 + <property name="default.javac.source" value="1.4"/>
4.78 + <property name="default.javac.target" value="1.4"/>
4.79 + </target>
4.80 + <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project">
4.81 + <property file="nbproject/configs/${config}.properties"/>
4.82 + <property file="nbproject/project.properties"/>
4.83 + </target>
4.84 + <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init">
4.85 + <available file="${manifest.file}" property="manifest.available"/>
4.86 + <condition property="splashscreen.available">
4.87 + <and>
4.88 + <not>
4.89 + <equals arg1="${application.splash}" arg2="" trim="true"/>
4.90 + </not>
4.91 + <available file="${application.splash}"/>
4.92 + </and>
4.93 + </condition>
4.94 + <condition property="main.class.available">
4.95 + <and>
4.96 + <isset property="main.class"/>
4.97 + <not>
4.98 + <equals arg1="${main.class}" arg2="" trim="true"/>
4.99 + </not>
4.100 + </and>
4.101 + </condition>
4.102 + <condition property="manifest.available+main.class">
4.103 + <and>
4.104 + <isset property="manifest.available"/>
4.105 + <isset property="main.class.available"/>
4.106 + </and>
4.107 + </condition>
4.108 + <condition property="do.archive">
4.109 + <not>
4.110 + <istrue value="${jar.archive.disabled}"/>
4.111 + </not>
4.112 + </condition>
4.113 + <condition property="do.mkdist">
4.114 + <and>
4.115 + <isset property="do.archive"/>
4.116 + <isset property="libs.CopyLibs.classpath"/>
4.117 + <not>
4.118 + <istrue value="${mkdist.disabled}"/>
4.119 + </not>
4.120 + </and>
4.121 + </condition>
4.122 + <condition property="manifest.available+main.class+mkdist.available">
4.123 + <and>
4.124 + <istrue value="${manifest.available+main.class}"/>
4.125 + <isset property="do.mkdist"/>
4.126 + </and>
4.127 + </condition>
4.128 + <condition property="do.archive+manifest.available">
4.129 + <and>
4.130 + <isset property="manifest.available"/>
4.131 + <istrue value="${do.archive}"/>
4.132 + </and>
4.133 + </condition>
4.134 + <condition property="do.archive+main.class.available">
4.135 + <and>
4.136 + <isset property="main.class.available"/>
4.137 + <istrue value="${do.archive}"/>
4.138 + </and>
4.139 + </condition>
4.140 + <condition property="do.archive+splashscreen.available">
4.141 + <and>
4.142 + <isset property="splashscreen.available"/>
4.143 + <istrue value="${do.archive}"/>
4.144 + </and>
4.145 + </condition>
4.146 + <condition property="do.archive+manifest.available+main.class">
4.147 + <and>
4.148 + <istrue value="${manifest.available+main.class}"/>
4.149 + <istrue value="${do.archive}"/>
4.150 + </and>
4.151 + </condition>
4.152 + <condition property="manifest.available-mkdist.available">
4.153 + <or>
4.154 + <istrue value="${manifest.available}"/>
4.155 + <isset property="do.mkdist"/>
4.156 + </or>
4.157 + </condition>
4.158 + <condition property="manifest.available+main.class-mkdist.available">
4.159 + <or>
4.160 + <istrue value="${manifest.available+main.class}"/>
4.161 + <isset property="do.mkdist"/>
4.162 + </or>
4.163 + </condition>
4.164 + <condition property="have.tests">
4.165 + <or>
4.166 + <available file="${test.src.dir}"/>
4.167 + </or>
4.168 + </condition>
4.169 + <condition property="have.sources">
4.170 + <or>
4.171 + <available file="${src.dir}"/>
4.172 + </or>
4.173 + </condition>
4.174 + <condition property="netbeans.home+have.tests">
4.175 + <and>
4.176 + <isset property="netbeans.home"/>
4.177 + <isset property="have.tests"/>
4.178 + </and>
4.179 + </condition>
4.180 + <condition property="no.javadoc.preview">
4.181 + <and>
4.182 + <isset property="javadoc.preview"/>
4.183 + <isfalse value="${javadoc.preview}"/>
4.184 + </and>
4.185 + </condition>
4.186 + <property name="run.jvmargs" value=""/>
4.187 + <property name="run.jvmargs.ide" value=""/>
4.188 + <property name="javac.compilerargs" value=""/>
4.189 + <property name="work.dir" value="${basedir}"/>
4.190 + <condition property="no.deps">
4.191 + <and>
4.192 + <istrue value="${no.dependencies}"/>
4.193 + </and>
4.194 + </condition>
4.195 + <property name="javac.debug" value="true"/>
4.196 + <property name="javadoc.preview" value="true"/>
4.197 + <property name="application.args" value=""/>
4.198 + <property name="source.encoding" value="${file.encoding}"/>
4.199 + <property name="runtime.encoding" value="${source.encoding}"/>
4.200 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
4.201 + <and>
4.202 + <isset property="javadoc.encoding"/>
4.203 + <not>
4.204 + <equals arg1="${javadoc.encoding}" arg2=""/>
4.205 + </not>
4.206 + </and>
4.207 + </condition>
4.208 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
4.209 + <property name="includes" value="**"/>
4.210 + <property name="excludes" value=""/>
4.211 + <property name="do.depend" value="false"/>
4.212 + <condition property="do.depend.true">
4.213 + <istrue value="${do.depend}"/>
4.214 + </condition>
4.215 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
4.216 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
4.217 + <length length="0" string="${endorsed.classpath}" when="greater"/>
4.218 + </condition>
4.219 + <condition else="false" property="jdkBug6558476">
4.220 + <and>
4.221 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
4.222 + <not>
4.223 + <os family="unix"/>
4.224 + </not>
4.225 + </and>
4.226 + </condition>
4.227 + <property name="javac.fork" value="${jdkBug6558476}"/>
4.228 + <property name="jar.index" value="false"/>
4.229 + <property name="jar.index.metainf" value="${jar.index}"/>
4.230 + <property name="copylibs.rebase" value="true"/>
4.231 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
4.232 + <condition property="junit.available">
4.233 + <or>
4.234 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
4.235 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
4.236 + </or>
4.237 + </condition>
4.238 + <condition property="testng.available">
4.239 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
4.240 + </condition>
4.241 + <condition property="junit+testng.available">
4.242 + <and>
4.243 + <istrue value="${junit.available}"/>
4.244 + <istrue value="${testng.available}"/>
4.245 + </and>
4.246 + </condition>
4.247 + <condition else="testng" property="testng.mode" value="mixed">
4.248 + <istrue value="${junit+testng.available}"/>
4.249 + </condition>
4.250 + <condition else="" property="testng.debug.mode" value="-mixed">
4.251 + <istrue value="${junit+testng.available}"/>
4.252 + </condition>
4.253 + </target>
4.254 + <target name="-post-init">
4.255 + <!-- Empty placeholder for easier customization. -->
4.256 + <!-- You can override this target in the ../build.xml file. -->
4.257 + </target>
4.258 + <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
4.259 + <fail unless="src.dir">Must set src.dir</fail>
4.260 + <fail unless="test.src.dir">Must set test.src.dir</fail>
4.261 + <fail unless="build.dir">Must set build.dir</fail>
4.262 + <fail unless="dist.dir">Must set dist.dir</fail>
4.263 + <fail unless="build.classes.dir">Must set build.classes.dir</fail>
4.264 + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
4.265 + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
4.266 + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
4.267 + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
4.268 + <fail unless="dist.jar">Must set dist.jar</fail>
4.269 + </target>
4.270 + <target name="-init-macrodef-property">
4.271 + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
4.272 + <attribute name="name"/>
4.273 + <attribute name="value"/>
4.274 + <sequential>
4.275 + <property name="@{name}" value="${@{value}}"/>
4.276 + </sequential>
4.277 + </macrodef>
4.278 + </target>
4.279 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
4.280 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
4.281 + <attribute default="${src.dir}" name="srcdir"/>
4.282 + <attribute default="${build.classes.dir}" name="destdir"/>
4.283 + <attribute default="${javac.classpath}" name="classpath"/>
4.284 + <attribute default="${javac.processorpath}" name="processorpath"/>
4.285 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
4.286 + <attribute default="${includes}" name="includes"/>
4.287 + <attribute default="${excludes}" name="excludes"/>
4.288 + <attribute default="${javac.debug}" name="debug"/>
4.289 + <attribute default="${empty.dir}" name="sourcepath"/>
4.290 + <attribute default="${empty.dir}" name="gensrcdir"/>
4.291 + <element name="customize" optional="true"/>
4.292 + <sequential>
4.293 + <property location="${build.dir}/empty" name="empty.dir"/>
4.294 + <mkdir dir="${empty.dir}"/>
4.295 + <mkdir dir="@{apgeneratedsrcdir}"/>
4.296 + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
4.297 + <src>
4.298 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
4.299 + <include name="*"/>
4.300 + </dirset>
4.301 + </src>
4.302 + <classpath>
4.303 + <path path="@{classpath}"/>
4.304 + </classpath>
4.305 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
4.306 + <compilerarg line="${javac.compilerargs}"/>
4.307 + <compilerarg value="-processorpath"/>
4.308 + <compilerarg path="@{processorpath}:${empty.dir}"/>
4.309 + <compilerarg line="${ap.processors.internal}"/>
4.310 + <compilerarg line="${annotation.processing.processor.options}"/>
4.311 + <compilerarg value="-s"/>
4.312 + <compilerarg path="@{apgeneratedsrcdir}"/>
4.313 + <compilerarg line="${ap.proc.none.internal}"/>
4.314 + <customize/>
4.315 + </javac>
4.316 + </sequential>
4.317 + </macrodef>
4.318 + </target>
4.319 + <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
4.320 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
4.321 + <attribute default="${src.dir}" name="srcdir"/>
4.322 + <attribute default="${build.classes.dir}" name="destdir"/>
4.323 + <attribute default="${javac.classpath}" name="classpath"/>
4.324 + <attribute default="${javac.processorpath}" name="processorpath"/>
4.325 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
4.326 + <attribute default="${includes}" name="includes"/>
4.327 + <attribute default="${excludes}" name="excludes"/>
4.328 + <attribute default="${javac.debug}" name="debug"/>
4.329 + <attribute default="${empty.dir}" name="sourcepath"/>
4.330 + <attribute default="${empty.dir}" name="gensrcdir"/>
4.331 + <element name="customize" optional="true"/>
4.332 + <sequential>
4.333 + <property location="${build.dir}/empty" name="empty.dir"/>
4.334 + <mkdir dir="${empty.dir}"/>
4.335 + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
4.336 + <src>
4.337 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
4.338 + <include name="*"/>
4.339 + </dirset>
4.340 + </src>
4.341 + <classpath>
4.342 + <path path="@{classpath}"/>
4.343 + </classpath>
4.344 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
4.345 + <compilerarg line="${javac.compilerargs}"/>
4.346 + <customize/>
4.347 + </javac>
4.348 + </sequential>
4.349 + </macrodef>
4.350 + </target>
4.351 + <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
4.352 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
4.353 + <attribute default="${src.dir}" name="srcdir"/>
4.354 + <attribute default="${build.classes.dir}" name="destdir"/>
4.355 + <attribute default="${javac.classpath}" name="classpath"/>
4.356 + <sequential>
4.357 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
4.358 + <classpath>
4.359 + <path path="@{classpath}"/>
4.360 + </classpath>
4.361 + </depend>
4.362 + </sequential>
4.363 + </macrodef>
4.364 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
4.365 + <attribute default="${build.classes.dir}" name="destdir"/>
4.366 + <sequential>
4.367 + <fail unless="javac.includes">Must set javac.includes</fail>
4.368 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
4.369 + <path>
4.370 + <filelist dir="@{destdir}" files="${javac.includes}"/>
4.371 + </path>
4.372 + <globmapper from="*.java" to="*.class"/>
4.373 + </pathconvert>
4.374 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
4.375 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
4.376 + <delete>
4.377 + <files includesfile="${javac.includesfile.binary}"/>
4.378 + </delete>
4.379 + <delete>
4.380 + <fileset file="${javac.includesfile.binary}"/>
4.381 + </delete>
4.382 + </sequential>
4.383 + </macrodef>
4.384 + </target>
4.385 + <target if="${junit.available}" name="-init-macrodef-junit-init">
4.386 + <condition else="false" property="nb.junit.batch" value="true">
4.387 + <and>
4.388 + <istrue value="${junit.available}"/>
4.389 + <not>
4.390 + <isset property="test.method"/>
4.391 + </not>
4.392 + </and>
4.393 + </condition>
4.394 + <condition else="false" property="nb.junit.single" value="true">
4.395 + <and>
4.396 + <istrue value="${junit.available}"/>
4.397 + <isset property="test.method"/>
4.398 + </and>
4.399 + </condition>
4.400 + </target>
4.401 + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
4.402 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
4.403 + <attribute default="${includes}" name="includes"/>
4.404 + <attribute default="${excludes}" name="excludes"/>
4.405 + <attribute default="**" name="testincludes"/>
4.406 + <attribute default="" name="testmethods"/>
4.407 + <element name="customize" optional="true"/>
4.408 + <sequential>
4.409 + <property name="junit.forkmode" value="perTest"/>
4.410 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
4.411 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
4.412 + <syspropertyset>
4.413 + <propertyref prefix="test-sys-prop."/>
4.414 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.415 + </syspropertyset>
4.416 + <formatter type="brief" usefile="false"/>
4.417 + <formatter type="xml"/>
4.418 + <jvmarg value="-ea"/>
4.419 + <customize/>
4.420 + </junit>
4.421 + </sequential>
4.422 + </macrodef>
4.423 + </target>
4.424 + <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
4.425 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
4.426 + <attribute default="${includes}" name="includes"/>
4.427 + <attribute default="${excludes}" name="excludes"/>
4.428 + <attribute default="**" name="testincludes"/>
4.429 + <attribute default="" name="testmethods"/>
4.430 + <element name="customize" optional="true"/>
4.431 + <sequential>
4.432 + <property name="junit.forkmode" value="perTest"/>
4.433 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
4.434 + <batchtest todir="${build.test.results.dir}">
4.435 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
4.436 + <filename name="@{testincludes}"/>
4.437 + </fileset>
4.438 + </batchtest>
4.439 + <syspropertyset>
4.440 + <propertyref prefix="test-sys-prop."/>
4.441 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.442 + </syspropertyset>
4.443 + <formatter type="brief" usefile="false"/>
4.444 + <formatter type="xml"/>
4.445 + <jvmarg value="-ea"/>
4.446 + <customize/>
4.447 + </junit>
4.448 + </sequential>
4.449 + </macrodef>
4.450 + </target>
4.451 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
4.452 + <target if="${testng.available}" name="-init-macrodef-testng">
4.453 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
4.454 + <attribute default="${includes}" name="includes"/>
4.455 + <attribute default="${excludes}" name="excludes"/>
4.456 + <attribute default="**" name="testincludes"/>
4.457 + <attribute default="" name="testmethods"/>
4.458 + <element name="customize" optional="true"/>
4.459 + <sequential>
4.460 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
4.461 + <isset property="test.method"/>
4.462 + </condition>
4.463 + <union id="test.set">
4.464 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
4.465 + <filename name="@{testincludes}"/>
4.466 + </fileset>
4.467 + </union>
4.468 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
4.469 + <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="duplicates.web.api" testname="TestNG tests" workingDir="${work.dir}">
4.470 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
4.471 + <propertyset>
4.472 + <propertyref prefix="test-sys-prop."/>
4.473 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.474 + </propertyset>
4.475 + <customize/>
4.476 + </testng>
4.477 + </sequential>
4.478 + </macrodef>
4.479 + </target>
4.480 + <target name="-init-macrodef-test-impl">
4.481 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.482 + <attribute default="${includes}" name="includes"/>
4.483 + <attribute default="${excludes}" name="excludes"/>
4.484 + <attribute default="**" name="testincludes"/>
4.485 + <attribute default="" name="testmethods"/>
4.486 + <element implicit="true" name="customize" optional="true"/>
4.487 + <sequential>
4.488 + <echo>No tests executed.</echo>
4.489 + </sequential>
4.490 + </macrodef>
4.491 + </target>
4.492 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
4.493 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.494 + <attribute default="${includes}" name="includes"/>
4.495 + <attribute default="${excludes}" name="excludes"/>
4.496 + <attribute default="**" name="testincludes"/>
4.497 + <attribute default="" name="testmethods"/>
4.498 + <element implicit="true" name="customize" optional="true"/>
4.499 + <sequential>
4.500 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.501 + <customize/>
4.502 + </j2seproject3:junit>
4.503 + </sequential>
4.504 + </macrodef>
4.505 + </target>
4.506 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
4.507 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.508 + <attribute default="${includes}" name="includes"/>
4.509 + <attribute default="${excludes}" name="excludes"/>
4.510 + <attribute default="**" name="testincludes"/>
4.511 + <attribute default="" name="testmethods"/>
4.512 + <element implicit="true" name="customize" optional="true"/>
4.513 + <sequential>
4.514 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.515 + <customize/>
4.516 + </j2seproject3:testng>
4.517 + </sequential>
4.518 + </macrodef>
4.519 + </target>
4.520 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
4.521 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
4.522 + <attribute default="${includes}" name="includes"/>
4.523 + <attribute default="${excludes}" name="excludes"/>
4.524 + <attribute default="**" name="testincludes"/>
4.525 + <attribute default="" name="testmethods"/>
4.526 + <sequential>
4.527 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.528 + <customize>
4.529 + <classpath>
4.530 + <path path="${run.test.classpath}"/>
4.531 + </classpath>
4.532 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.533 + <jvmarg line="${run.jvmargs}"/>
4.534 + <jvmarg line="${run.jvmargs.ide}"/>
4.535 + </customize>
4.536 + </j2seproject3:test-impl>
4.537 + </sequential>
4.538 + </macrodef>
4.539 + </target>
4.540 + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
4.541 + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.542 + <attribute default="${includes}" name="includes"/>
4.543 + <attribute default="${excludes}" name="excludes"/>
4.544 + <attribute default="**" name="testincludes"/>
4.545 + <attribute default="" name="testmethods"/>
4.546 + <element name="customize" optional="true"/>
4.547 + <sequential>
4.548 + <property name="junit.forkmode" value="perTest"/>
4.549 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
4.550 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
4.551 + <syspropertyset>
4.552 + <propertyref prefix="test-sys-prop."/>
4.553 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.554 + </syspropertyset>
4.555 + <formatter type="brief" usefile="false"/>
4.556 + <formatter type="xml"/>
4.557 + <jvmarg value="-ea"/>
4.558 + <jvmarg line="${debug-args-line}"/>
4.559 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
4.560 + <customize/>
4.561 + </junit>
4.562 + </sequential>
4.563 + </macrodef>
4.564 + </target>
4.565 + <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
4.566 + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.567 + <attribute default="${includes}" name="includes"/>
4.568 + <attribute default="${excludes}" name="excludes"/>
4.569 + <attribute default="**" name="testincludes"/>
4.570 + <attribute default="" name="testmethods"/>
4.571 + <element name="customize" optional="true"/>
4.572 + <sequential>
4.573 + <property name="junit.forkmode" value="perTest"/>
4.574 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
4.575 + <batchtest todir="${build.test.results.dir}">
4.576 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
4.577 + <filename name="@{testincludes}"/>
4.578 + </fileset>
4.579 + </batchtest>
4.580 + <syspropertyset>
4.581 + <propertyref prefix="test-sys-prop."/>
4.582 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.583 + </syspropertyset>
4.584 + <formatter type="brief" usefile="false"/>
4.585 + <formatter type="xml"/>
4.586 + <jvmarg value="-ea"/>
4.587 + <jvmarg line="${debug-args-line}"/>
4.588 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
4.589 + <customize/>
4.590 + </junit>
4.591 + </sequential>
4.592 + </macrodef>
4.593 + </target>
4.594 + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
4.595 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.596 + <attribute default="${includes}" name="includes"/>
4.597 + <attribute default="${excludes}" name="excludes"/>
4.598 + <attribute default="**" name="testincludes"/>
4.599 + <attribute default="" name="testmethods"/>
4.600 + <element implicit="true" name="customize" optional="true"/>
4.601 + <sequential>
4.602 + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.603 + <customize/>
4.604 + </j2seproject3:junit-debug>
4.605 + </sequential>
4.606 + </macrodef>
4.607 + </target>
4.608 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
4.609 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.610 + <attribute default="${main.class}" name="testClass"/>
4.611 + <attribute default="" name="testMethod"/>
4.612 + <element name="customize2" optional="true"/>
4.613 + <sequential>
4.614 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
4.615 + <isset property="test.method"/>
4.616 + </condition>
4.617 + <condition else="-suitename duplicates.web.api -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
4.618 + <matches pattern=".*\.xml" string="@{testClass}"/>
4.619 + </condition>
4.620 + <delete dir="${build.test.results.dir}" quiet="true"/>
4.621 + <mkdir dir="${build.test.results.dir}"/>
4.622 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
4.623 + <customize>
4.624 + <customize2/>
4.625 + <jvmarg value="-ea"/>
4.626 + <arg line="${testng.debug.mode}"/>
4.627 + <arg line="-d ${build.test.results.dir}"/>
4.628 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
4.629 + <arg line="${testng.cmd.args}"/>
4.630 + </customize>
4.631 + </j2seproject3:debug>
4.632 + </sequential>
4.633 + </macrodef>
4.634 + </target>
4.635 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
4.636 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
4.637 + <attribute default="${main.class}" name="testClass"/>
4.638 + <attribute default="" name="testMethod"/>
4.639 + <element implicit="true" name="customize2" optional="true"/>
4.640 + <sequential>
4.641 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
4.642 + <customize2/>
4.643 + </j2seproject3:testng-debug>
4.644 + </sequential>
4.645 + </macrodef>
4.646 + </target>
4.647 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
4.648 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.649 + <attribute default="${includes}" name="includes"/>
4.650 + <attribute default="${excludes}" name="excludes"/>
4.651 + <attribute default="**" name="testincludes"/>
4.652 + <attribute default="" name="testmethods"/>
4.653 + <attribute default="${main.class}" name="testClass"/>
4.654 + <attribute default="" name="testMethod"/>
4.655 + <sequential>
4.656 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
4.657 + <customize>
4.658 + <classpath>
4.659 + <path path="${run.test.classpath}"/>
4.660 + </classpath>
4.661 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.662 + <jvmarg line="${run.jvmargs}"/>
4.663 + <jvmarg line="${run.jvmargs.ide}"/>
4.664 + </customize>
4.665 + </j2seproject3:test-debug-impl>
4.666 + </sequential>
4.667 + </macrodef>
4.668 + </target>
4.669 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
4.670 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.671 + <attribute default="${includes}" name="includes"/>
4.672 + <attribute default="${excludes}" name="excludes"/>
4.673 + <attribute default="**" name="testincludes"/>
4.674 + <attribute default="" name="testmethods"/>
4.675 + <attribute default="${main.class}" name="testClass"/>
4.676 + <attribute default="" name="testMethod"/>
4.677 + <sequential>
4.678 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
4.679 + <customize2>
4.680 + <syspropertyset>
4.681 + <propertyref prefix="test-sys-prop."/>
4.682 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.683 + </syspropertyset>
4.684 + </customize2>
4.685 + </j2seproject3:testng-debug-impl>
4.686 + </sequential>
4.687 + </macrodef>
4.688 + </target>
4.689 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
4.690 + <!--
4.691 + pre NB7.2 profiling section; consider it deprecated
4.692 + -->
4.693 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
4.694 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
4.695 + <!-- Empty placeholder for easier customization. -->
4.696 + <!-- You can override this target in the ../build.xml file. -->
4.697 + </target>
4.698 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
4.699 + <!-- Empty placeholder for easier customization. -->
4.700 + <!-- You can override this target in the ../build.xml file. -->
4.701 + </target>
4.702 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
4.703 + <macrodef name="resolve">
4.704 + <attribute name="name"/>
4.705 + <attribute name="value"/>
4.706 + <sequential>
4.707 + <property name="@{name}" value="${env.@{value}}"/>
4.708 + </sequential>
4.709 + </macrodef>
4.710 + <macrodef name="profile">
4.711 + <attribute default="${main.class}" name="classname"/>
4.712 + <element name="customize" optional="true"/>
4.713 + <sequential>
4.714 + <property environment="env"/>
4.715 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
4.716 + <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
4.717 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.718 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
4.719 + <jvmarg line="${profiler.info.jvmargs}"/>
4.720 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
4.721 + <arg line="${application.args}"/>
4.722 + <classpath>
4.723 + <path path="${run.classpath}"/>
4.724 + </classpath>
4.725 + <syspropertyset>
4.726 + <propertyref prefix="run-sys-prop."/>
4.727 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
4.728 + </syspropertyset>
4.729 + <customize/>
4.730 + </java>
4.731 + </sequential>
4.732 + </macrodef>
4.733 + </target>
4.734 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
4.735 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
4.736 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
4.737 + </target>
4.738 + <!--
4.739 + end of pre NB7.2 profiling section
4.740 + -->
4.741 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
4.742 + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
4.743 + <attribute default="${main.class}" name="name"/>
4.744 + <attribute default="${debug.classpath}" name="classpath"/>
4.745 + <attribute default="" name="stopclassname"/>
4.746 + <sequential>
4.747 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
4.748 + <classpath>
4.749 + <path path="@{classpath}"/>
4.750 + </classpath>
4.751 + </nbjpdastart>
4.752 + </sequential>
4.753 + </macrodef>
4.754 + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
4.755 + <attribute default="${build.classes.dir}" name="dir"/>
4.756 + <sequential>
4.757 + <nbjpdareload>
4.758 + <fileset dir="@{dir}" includes="${fix.classes}">
4.759 + <include name="${fix.includes}*.class"/>
4.760 + </fileset>
4.761 + </nbjpdareload>
4.762 + </sequential>
4.763 + </macrodef>
4.764 + </target>
4.765 + <target name="-init-debug-args">
4.766 + <property name="version-output" value="java version "${ant.java.version}"/>
4.767 + <condition property="have-jdk-older-than-1.4">
4.768 + <or>
4.769 + <contains string="${version-output}" substring="java version "1.0"/>
4.770 + <contains string="${version-output}" substring="java version "1.1"/>
4.771 + <contains string="${version-output}" substring="java version "1.2"/>
4.772 + <contains string="${version-output}" substring="java version "1.3"/>
4.773 + </or>
4.774 + </condition>
4.775 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
4.776 + <istrue value="${have-jdk-older-than-1.4}"/>
4.777 + </condition>
4.778 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
4.779 + <os family="windows"/>
4.780 + </condition>
4.781 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
4.782 + <isset property="debug.transport"/>
4.783 + </condition>
4.784 + </target>
4.785 + <target depends="-init-debug-args" name="-init-macrodef-debug">
4.786 + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
4.787 + <attribute default="${main.class}" name="classname"/>
4.788 + <attribute default="${debug.classpath}" name="classpath"/>
4.789 + <element name="customize" optional="true"/>
4.790 + <sequential>
4.791 + <java classname="@{classname}" dir="${work.dir}" fork="true">
4.792 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.793 + <jvmarg line="${debug-args-line}"/>
4.794 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
4.795 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
4.796 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
4.797 + <jvmarg line="${run.jvmargs}"/>
4.798 + <jvmarg line="${run.jvmargs.ide}"/>
4.799 + <classpath>
4.800 + <path path="@{classpath}"/>
4.801 + </classpath>
4.802 + <syspropertyset>
4.803 + <propertyref prefix="run-sys-prop."/>
4.804 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
4.805 + </syspropertyset>
4.806 + <customize/>
4.807 + </java>
4.808 + </sequential>
4.809 + </macrodef>
4.810 + </target>
4.811 + <target name="-init-macrodef-java">
4.812 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
4.813 + <attribute default="${main.class}" name="classname"/>
4.814 + <attribute default="${run.classpath}" name="classpath"/>
4.815 + <attribute default="jvm" name="jvm"/>
4.816 + <element name="customize" optional="true"/>
4.817 + <sequential>
4.818 + <java classname="@{classname}" dir="${work.dir}" fork="true">
4.819 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
4.820 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
4.821 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
4.822 + <jvmarg line="${run.jvmargs}"/>
4.823 + <jvmarg line="${run.jvmargs.ide}"/>
4.824 + <classpath>
4.825 + <path path="@{classpath}"/>
4.826 + </classpath>
4.827 + <syspropertyset>
4.828 + <propertyref prefix="run-sys-prop."/>
4.829 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
4.830 + </syspropertyset>
4.831 + <customize/>
4.832 + </java>
4.833 + </sequential>
4.834 + </macrodef>
4.835 + </target>
4.836 + <target name="-init-macrodef-copylibs">
4.837 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
4.838 + <attribute default="${manifest.file}" name="manifest"/>
4.839 + <element name="customize" optional="true"/>
4.840 + <sequential>
4.841 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
4.842 + <pathconvert property="run.classpath.without.build.classes.dir">
4.843 + <path path="${run.classpath}"/>
4.844 + <map from="${build.classes.dir.resolved}" to=""/>
4.845 + </pathconvert>
4.846 + <pathconvert pathsep=" " property="jar.classpath">
4.847 + <path path="${run.classpath.without.build.classes.dir}"/>
4.848 + <chainedmapper>
4.849 + <flattenmapper/>
4.850 + <filtermapper>
4.851 + <replacestring from=" " to="%20"/>
4.852 + </filtermapper>
4.853 + <globmapper from="*" to="lib/*"/>
4.854 + </chainedmapper>
4.855 + </pathconvert>
4.856 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
4.857 + <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
4.858 + <fileset dir="${build.classes.dir}"/>
4.859 + <manifest>
4.860 + <attribute name="Class-Path" value="${jar.classpath}"/>
4.861 + <customize/>
4.862 + </manifest>
4.863 + </copylibs>
4.864 + </sequential>
4.865 + </macrodef>
4.866 + </target>
4.867 + <target name="-init-presetdef-jar">
4.868 + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
4.869 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
4.870 + <j2seproject1:fileset dir="${build.classes.dir}"/>
4.871 + </jar>
4.872 + </presetdef>
4.873 + </target>
4.874 + <target name="-init-ap-cmdline-properties">
4.875 + <property name="annotation.processing.enabled" value="true"/>
4.876 + <property name="annotation.processing.processors.list" value=""/>
4.877 + <property name="annotation.processing.processor.options" value=""/>
4.878 + <property name="annotation.processing.run.all.processors" value="true"/>
4.879 + <property name="javac.processorpath" value="${javac.classpath}"/>
4.880 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
4.881 + <condition property="ap.supported.internal" value="true">
4.882 + <not>
4.883 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
4.884 + </not>
4.885 + </condition>
4.886 + </target>
4.887 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
4.888 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
4.889 + <isfalse value="${annotation.processing.run.all.processors}"/>
4.890 + </condition>
4.891 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
4.892 + <isfalse value="${annotation.processing.enabled}"/>
4.893 + </condition>
4.894 + </target>
4.895 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
4.896 + <property name="ap.cmd.line.internal" value=""/>
4.897 + </target>
4.898 + <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
4.899 + <!--
4.900 + ===================
4.901 + COMPILATION SECTION
4.902 + ===================
4.903 + -->
4.904 + <target name="-deps-jar-init" unless="built-jar.properties">
4.905 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
4.906 + <delete file="${built-jar.properties}" quiet="true"/>
4.907 + </target>
4.908 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
4.909 + <echo level="warn" message="Cycle detected: duplicates.web.api was already built"/>
4.910 + </target>
4.911 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
4.912 + <mkdir dir="${build.dir}"/>
4.913 + <touch file="${built-jar.properties}" verbose="false"/>
4.914 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
4.915 + <antcall target="-warn-already-built-jar"/>
4.916 + <propertyfile file="${built-jar.properties}">
4.917 + <entry key="${basedir}" value=""/>
4.918 + </propertyfile>
4.919 + <antcall target="-maybe-call-dep">
4.920 + <param name="call.built.properties" value="${built-jar.properties}"/>
4.921 + <param location="${project.base_web_api}" name="call.subproject"/>
4.922 + <param location="${project.base_web_api}/build.xml" name="call.script"/>
4.923 + <param name="call.target" value="jar"/>
4.924 + <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
4.925 + </antcall>
4.926 + </target>
4.927 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
4.928 + <target depends="init" name="-check-automatic-build">
4.929 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
4.930 + </target>
4.931 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
4.932 + <antcall target="clean"/>
4.933 + </target>
4.934 + <target depends="init,deps-jar" name="-pre-pre-compile">
4.935 + <mkdir dir="${build.classes.dir}"/>
4.936 + </target>
4.937 + <target name="-pre-compile">
4.938 + <!-- Empty placeholder for easier customization. -->
4.939 + <!-- You can override this target in the ../build.xml file. -->
4.940 + </target>
4.941 + <target if="do.depend.true" name="-compile-depend">
4.942 + <pathconvert property="build.generated.subdirs">
4.943 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
4.944 + <include name="*"/>
4.945 + </dirset>
4.946 + </pathconvert>
4.947 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
4.948 + </target>
4.949 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
4.950 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
4.951 + <copy todir="${build.classes.dir}">
4.952 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
4.953 + </copy>
4.954 + </target>
4.955 + <target if="has.persistence.xml" name="-copy-persistence-xml">
4.956 + <mkdir dir="${build.classes.dir}/META-INF"/>
4.957 + <copy todir="${build.classes.dir}/META-INF">
4.958 + <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
4.959 + </copy>
4.960 + </target>
4.961 + <target name="-post-compile">
4.962 + <!-- Empty placeholder for easier customization. -->
4.963 + <!-- You can override this target in the ../build.xml file. -->
4.964 + </target>
4.965 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
4.966 + <target name="-pre-compile-single">
4.967 + <!-- Empty placeholder for easier customization. -->
4.968 + <!-- You can override this target in the ../build.xml file. -->
4.969 + </target>
4.970 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
4.971 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
4.972 + <j2seproject3:force-recompile/>
4.973 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
4.974 + </target>
4.975 + <target name="-post-compile-single">
4.976 + <!-- Empty placeholder for easier customization. -->
4.977 + <!-- You can override this target in the ../build.xml file. -->
4.978 + </target>
4.979 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
4.980 + <!--
4.981 + ====================
4.982 + JAR BUILDING SECTION
4.983 + ====================
4.984 + -->
4.985 + <target depends="init" name="-pre-pre-jar">
4.986 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
4.987 + <mkdir dir="${dist.jar.dir}"/>
4.988 + </target>
4.989 + <target name="-pre-jar">
4.990 + <!-- Empty placeholder for easier customization. -->
4.991 + <!-- You can override this target in the ../build.xml file. -->
4.992 + </target>
4.993 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
4.994 + <j2seproject1:jar/>
4.995 + </target>
4.996 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
4.997 + <j2seproject1:jar manifest="${manifest.file}"/>
4.998 + </target>
4.999 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
4.1000 + <j2seproject1:jar manifest="${manifest.file}">
4.1001 + <j2seproject1:manifest>
4.1002 + <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
4.1003 + </j2seproject1:manifest>
4.1004 + </j2seproject1:jar>
4.1005 + <echo level="info">To run this application from the command line without Ant, try:</echo>
4.1006 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
4.1007 + <property location="${dist.jar}" name="dist.jar.resolved"/>
4.1008 + <pathconvert property="run.classpath.with.dist.jar">
4.1009 + <path path="${run.classpath}"/>
4.1010 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
4.1011 + </pathconvert>
4.1012 + <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
4.1013 + </target>
4.1014 + <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
4.1015 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
4.1016 + <touch file="${tmp.manifest.file}" verbose="false"/>
4.1017 + </target>
4.1018 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
4.1019 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
4.1020 + <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
4.1021 + </target>
4.1022 + <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
4.1023 + <manifest file="${tmp.manifest.file}" mode="update">
4.1024 + <attribute name="Main-Class" value="${main.class}"/>
4.1025 + </manifest>
4.1026 + </target>
4.1027 + <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
4.1028 + <basename file="${application.splash}" property="splashscreen.basename"/>
4.1029 + <mkdir dir="${build.classes.dir}/META-INF"/>
4.1030 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
4.1031 + <manifest file="${tmp.manifest.file}" mode="update">
4.1032 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
4.1033 + </manifest>
4.1034 + </target>
4.1035 + <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
4.1036 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
4.1037 + <echo level="info">To run this application from the command line without Ant, try:</echo>
4.1038 + <property location="${dist.jar}" name="dist.jar.resolved"/>
4.1039 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
4.1040 + </target>
4.1041 + <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
4.1042 + <delete>
4.1043 + <fileset file="${tmp.manifest.file}"/>
4.1044 + </delete>
4.1045 + </target>
4.1046 + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
4.1047 + <target name="-post-jar">
4.1048 + <!-- Empty placeholder for easier customization. -->
4.1049 + <!-- You can override this target in the ../build.xml file. -->
4.1050 + </target>
4.1051 + <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
4.1052 + <!--
4.1053 + =================
4.1054 + EXECUTION SECTION
4.1055 + =================
4.1056 + -->
4.1057 + <target depends="init,compile" description="Run a main class." name="run">
4.1058 + <j2seproject1:java>
4.1059 + <customize>
4.1060 + <arg line="${application.args}"/>
4.1061 + </customize>
4.1062 + </j2seproject1:java>
4.1063 + </target>
4.1064 + <target name="-do-not-recompile">
4.1065 + <property name="javac.includes.binary" value=""/>
4.1066 + </target>
4.1067 + <target depends="init,compile-single" name="run-single">
4.1068 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1069 + <j2seproject1:java classname="${run.class}"/>
4.1070 + </target>
4.1071 + <target depends="init,compile-test-single" name="run-test-with-main">
4.1072 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1073 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
4.1074 + </target>
4.1075 + <!--
4.1076 + =================
4.1077 + DEBUGGING SECTION
4.1078 + =================
4.1079 + -->
4.1080 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
4.1081 + <j2seproject1:nbjpdastart name="${debug.class}"/>
4.1082 + </target>
4.1083 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
4.1084 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
4.1085 + </target>
4.1086 + <target depends="init,compile" name="-debug-start-debuggee">
4.1087 + <j2seproject3:debug>
4.1088 + <customize>
4.1089 + <arg line="${application.args}"/>
4.1090 + </customize>
4.1091 + </j2seproject3:debug>
4.1092 + </target>
4.1093 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
4.1094 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
4.1095 + <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
4.1096 + </target>
4.1097 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
4.1098 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
4.1099 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
4.1100 + <j2seproject3:debug classname="${debug.class}"/>
4.1101 + </target>
4.1102 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
4.1103 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
4.1104 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
4.1105 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
4.1106 + </target>
4.1107 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
4.1108 + <target depends="init" name="-pre-debug-fix">
4.1109 + <fail unless="fix.includes">Must set fix.includes</fail>
4.1110 + <property name="javac.includes" value="${fix.includes}.java"/>
4.1111 + </target>
4.1112 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
4.1113 + <j2seproject1:nbjpdareload/>
4.1114 + </target>
4.1115 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
4.1116 + <!--
4.1117 + =================
4.1118 + PROFILING SECTION
4.1119 + =================
4.1120 + -->
4.1121 + <!--
4.1122 + pre NB7.2 profiler integration
4.1123 + -->
4.1124 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
4.1125 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1126 + <nbprofiledirect>
4.1127 + <classpath>
4.1128 + <path path="${run.classpath}"/>
4.1129 + </classpath>
4.1130 + </nbprofiledirect>
4.1131 + <profile/>
4.1132 + </target>
4.1133 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
4.1134 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
4.1135 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1136 + <nbprofiledirect>
4.1137 + <classpath>
4.1138 + <path path="${run.classpath}"/>
4.1139 + </classpath>
4.1140 + </nbprofiledirect>
4.1141 + <profile classname="${profile.class}"/>
4.1142 + </target>
4.1143 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
4.1144 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1145 + <nbprofiledirect>
4.1146 + <classpath>
4.1147 + <path path="${run.classpath}"/>
4.1148 + </classpath>
4.1149 + </nbprofiledirect>
4.1150 + <profile classname="sun.applet.AppletViewer">
4.1151 + <customize>
4.1152 + <arg value="${applet.url}"/>
4.1153 + </customize>
4.1154 + </profile>
4.1155 + </target>
4.1156 + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
4.1157 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
4.1158 + <nbprofiledirect>
4.1159 + <classpath>
4.1160 + <path path="${run.test.classpath}"/>
4.1161 + </classpath>
4.1162 + </nbprofiledirect>
4.1163 + <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
4.1164 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
4.1165 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
4.1166 + <jvmarg line="${profiler.info.jvmargs}"/>
4.1167 + <test name="${profile.class}"/>
4.1168 + <classpath>
4.1169 + <path path="${run.test.classpath}"/>
4.1170 + </classpath>
4.1171 + <syspropertyset>
4.1172 + <propertyref prefix="test-sys-prop."/>
4.1173 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
4.1174 + </syspropertyset>
4.1175 + <formatter type="brief" usefile="false"/>
4.1176 + <formatter type="xml"/>
4.1177 + </junit>
4.1178 + </target>
4.1179 + <!--
4.1180 + end of pre NB72 profiling section
4.1181 + -->
4.1182 + <target if="netbeans.home" name="-profile-check">
4.1183 + <condition property="profiler.configured">
4.1184 + <or>
4.1185 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
4.1186 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
4.1187 + </or>
4.1188 + </condition>
4.1189 + </target>
4.1190 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
4.1191 + <startprofiler/>
4.1192 + <antcall target="run"/>
4.1193 + </target>
4.1194 + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
4.1195 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1196 + <startprofiler/>
4.1197 + <antcall target="run-single"/>
4.1198 + </target>
4.1199 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
4.1200 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
4.1201 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
4.1202 + <startprofiler/>
4.1203 + <antcall target="test-single"/>
4.1204 + </target>
4.1205 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
4.1206 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
4.1207 + <startprofiler/>
4.1208 + <antcal target="run-test-with-main"/>
4.1209 + </target>
4.1210 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
4.1211 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
4.1212 + <startprofiler/>
4.1213 + <antcall target="run-applet"/>
4.1214 + </target>
4.1215 + <!--
4.1216 + ===============
4.1217 + JAVADOC SECTION
4.1218 + ===============
4.1219 + -->
4.1220 + <target depends="init" if="have.sources" name="-javadoc-build">
4.1221 + <mkdir dir="${dist.javadoc.dir}"/>
4.1222 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
4.1223 + <and>
4.1224 + <isset property="endorsed.classpath.cmd.line.arg"/>
4.1225 + <not>
4.1226 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
4.1227 + </not>
4.1228 + </and>
4.1229 + </condition>
4.1230 + <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
4.1231 + <classpath>
4.1232 + <path path="${javac.classpath}"/>
4.1233 + </classpath>
4.1234 + <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
4.1235 + <filename name="**/*.java"/>
4.1236 + </fileset>
4.1237 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
4.1238 + <include name="**/*.java"/>
4.1239 + <exclude name="*.java"/>
4.1240 + </fileset>
4.1241 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
4.1242 + </javadoc>
4.1243 + <copy todir="${dist.javadoc.dir}">
4.1244 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
4.1245 + <filename name="**/doc-files/**"/>
4.1246 + </fileset>
4.1247 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
4.1248 + <include name="**/doc-files/**"/>
4.1249 + </fileset>
4.1250 + </copy>
4.1251 + </target>
4.1252 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
4.1253 + <nbbrowse file="${dist.javadoc.dir}/index.html"/>
4.1254 + </target>
4.1255 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
4.1256 + <!--
4.1257 + =========================
4.1258 + TEST COMPILATION SECTION
4.1259 + =========================
4.1260 + -->
4.1261 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
4.1262 + <mkdir dir="${build.test.classes.dir}"/>
4.1263 + </target>
4.1264 + <target name="-pre-compile-test">
4.1265 + <!-- Empty placeholder for easier customization. -->
4.1266 + <!-- You can override this target in the ../build.xml file. -->
4.1267 + </target>
4.1268 + <target if="do.depend.true" name="-compile-test-depend">
4.1269 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
4.1270 + </target>
4.1271 + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
4.1272 + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
4.1273 + <copy todir="${build.test.classes.dir}">
4.1274 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
4.1275 + </copy>
4.1276 + </target>
4.1277 + <target name="-post-compile-test">
4.1278 + <!-- Empty placeholder for easier customization. -->
4.1279 + <!-- You can override this target in the ../build.xml file. -->
4.1280 + </target>
4.1281 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
4.1282 + <target name="-pre-compile-test-single">
4.1283 + <!-- Empty placeholder for easier customization. -->
4.1284 + <!-- You can override this target in the ../build.xml file. -->
4.1285 + </target>
4.1286 + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
4.1287 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
4.1288 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
4.1289 + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
4.1290 + <copy todir="${build.test.classes.dir}">
4.1291 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
4.1292 + </copy>
4.1293 + </target>
4.1294 + <target name="-post-compile-test-single">
4.1295 + <!-- Empty placeholder for easier customization. -->
4.1296 + <!-- You can override this target in the ../build.xml file. -->
4.1297 + </target>
4.1298 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
4.1299 + <!--
4.1300 + =======================
4.1301 + TEST EXECUTION SECTION
4.1302 + =======================
4.1303 + -->
4.1304 + <target depends="init" if="have.tests" name="-pre-test-run">
4.1305 + <mkdir dir="${build.test.results.dir}"/>
4.1306 + </target>
4.1307 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
4.1308 + <j2seproject3:test testincludes="**/*Test.java"/>
4.1309 + </target>
4.1310 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
4.1311 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
4.1312 + </target>
4.1313 + <target depends="init" if="have.tests" name="test-report"/>
4.1314 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
4.1315 + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
4.1316 + <target depends="init" if="have.tests" name="-pre-test-run-single">
4.1317 + <mkdir dir="${build.test.results.dir}"/>
4.1318 + </target>
4.1319 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
4.1320 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
4.1321 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
4.1322 + </target>
4.1323 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
4.1324 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
4.1325 + </target>
4.1326 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
4.1327 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
4.1328 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
4.1329 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
4.1330 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
4.1331 + </target>
4.1332 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
4.1333 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
4.1334 + </target>
4.1335 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
4.1336 + <!--
4.1337 + =======================
4.1338 + TEST DEBUGGING SECTION
4.1339 + =======================
4.1340 + -->
4.1341 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
4.1342 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
4.1343 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
4.1344 + </target>
4.1345 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
4.1346 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
4.1347 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
4.1348 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
4.1349 + </target>
4.1350 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
4.1351 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
4.1352 + </target>
4.1353 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
4.1354 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
4.1355 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
4.1356 + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
4.1357 + </target>
4.1358 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
4.1359 + <!--
4.1360 + =========================
4.1361 + APPLET EXECUTION SECTION
4.1362 + =========================
4.1363 + -->
4.1364 + <target depends="init,compile-single" name="run-applet">
4.1365 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
4.1366 + <j2seproject1:java classname="sun.applet.AppletViewer">
4.1367 + <customize>
4.1368 + <arg value="${applet.url}"/>
4.1369 + </customize>
4.1370 + </j2seproject1:java>
4.1371 + </target>
4.1372 + <!--
4.1373 + =========================
4.1374 + APPLET DEBUGGING SECTION
4.1375 + =========================
4.1376 + -->
4.1377 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
4.1378 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
4.1379 + <j2seproject3:debug classname="sun.applet.AppletViewer">
4.1380 + <customize>
4.1381 + <arg value="${applet.url}"/>
4.1382 + </customize>
4.1383 + </j2seproject3:debug>
4.1384 + </target>
4.1385 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
4.1386 + <!--
4.1387 + ===============
4.1388 + CLEANUP SECTION
4.1389 + ===============
4.1390 + -->
4.1391 + <target name="-deps-clean-init" unless="built-clean.properties">
4.1392 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
4.1393 + <delete file="${built-clean.properties}" quiet="true"/>
4.1394 + </target>
4.1395 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
4.1396 + <echo level="warn" message="Cycle detected: duplicates.web.api was already built"/>
4.1397 + </target>
4.1398 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
4.1399 + <mkdir dir="${build.dir}"/>
4.1400 + <touch file="${built-clean.properties}" verbose="false"/>
4.1401 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
4.1402 + <antcall target="-warn-already-built-clean"/>
4.1403 + <propertyfile file="${built-clean.properties}">
4.1404 + <entry key="${basedir}" value=""/>
4.1405 + </propertyfile>
4.1406 + <antcall target="-maybe-call-dep">
4.1407 + <param name="call.built.properties" value="${built-clean.properties}"/>
4.1408 + <param location="${project.base_web_api}" name="call.subproject"/>
4.1409 + <param location="${project.base_web_api}/build.xml" name="call.script"/>
4.1410 + <param name="call.target" value="clean"/>
4.1411 + <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
4.1412 + </antcall>
4.1413 + </target>
4.1414 + <target depends="init" name="-do-clean">
4.1415 + <delete dir="${build.dir}"/>
4.1416 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
4.1417 + </target>
4.1418 + <target name="-post-clean">
4.1419 + <!-- Empty placeholder for easier customization. -->
4.1420 + <!-- You can override this target in the ../build.xml file. -->
4.1421 + </target>
4.1422 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
4.1423 + <target name="-check-call-dep">
4.1424 + <property file="${call.built.properties}" prefix="already.built."/>
4.1425 + <condition property="should.call.dep">
4.1426 + <and>
4.1427 + <not>
4.1428 + <isset property="already.built.${call.subproject}"/>
4.1429 + </not>
4.1430 + <available file="${call.script}"/>
4.1431 + </and>
4.1432 + </condition>
4.1433 + </target>
4.1434 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
4.1435 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
4.1436 + <propertyset>
4.1437 + <propertyref prefix="transfer."/>
4.1438 + <mapper from="transfer.*" to="*" type="glob"/>
4.1439 + </propertyset>
4.1440 + </ant>
4.1441 + </target>
4.1442 +</project>
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/duplicates/server/web/duplicates.web.api/nbproject/genfiles.properties Tue Jul 03 21:14:12 2012 +0200
5.3 @@ -0,0 +1,8 @@
5.4 +build.xml.data.CRC32=56aa19cb
5.5 +build.xml.script.CRC32=bd5d8978
5.6 +build.xml.stylesheet.CRC32=28e38971@1.54.0.46
5.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
5.9 +nbproject/build-impl.xml.data.CRC32=56aa19cb
5.10 +nbproject/build-impl.xml.script.CRC32=4340035e
5.11 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.54.0.46
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/duplicates/server/web/duplicates.web.api/nbproject/project.properties Tue Jul 03 21:14:12 2012 +0200
6.3 @@ -0,0 +1,95 @@
6.4 +annotation.processing.enabled=true
6.5 +annotation.processing.enabled.in.editor=false
6.6 +annotation.processing.processors.list=
6.7 +annotation.processing.run.all.processors=true
6.8 +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
6.9 +application.title=duplicates.web.api
6.10 +application.vendor=lahvac
6.11 +build.classes.dir=${build.dir}/classes
6.12 +build.classes.excludes=**/*.java,**/*.form
6.13 +# This directory is removed when the project is cleaned:
6.14 +build.dir=build
6.15 +build.generated.dir=${build.dir}/generated
6.16 +build.generated.sources.dir=${build.dir}/generated-sources
6.17 +# Only compile against the classpath explicitly listed here:
6.18 +build.sysclasspath=ignore
6.19 +build.test.classes.dir=${build.dir}/test/classes
6.20 +build.test.results.dir=${build.dir}/test/results
6.21 +# Uncomment to specify the preferred debugger connection transport:
6.22 +#debug.transport=dt_socket
6.23 +debug.classpath=\
6.24 + ${run.classpath}
6.25 +debug.test.classpath=\
6.26 + ${run.test.classpath}
6.27 +# This directory is removed when the project is cleaned:
6.28 +dist.dir=dist
6.29 +dist.jar=${dist.dir}/duplicates.web.api.jar
6.30 +dist.javadoc.dir=${dist.dir}/javadoc
6.31 +endorsed.classpath=
6.32 +excludes=
6.33 +file.reference.org-netbeans-modules-parsing-lucene.jar=../../../../lib/org-netbeans-modules-parsing-lucene.jar
6.34 +file.reference.util-commons.jar=../../../../remoting/ide/api/external/util-commons.jar
6.35 +file.reference.util-pojson.jar=../../../../remoting/ide/api/external/util-pojson.jar
6.36 +includes=**
6.37 +jar.archive.disabled=${jnlp.enabled}
6.38 +jar.compress=false
6.39 +jar.index=${jnlp.enabled}
6.40 +javac.classpath=\
6.41 + ${reference.base_web_api.jar}:\
6.42 + ${libs.jersey.classpath}:\
6.43 + ${libs.lucene.classpath}:\
6.44 + ${file.reference.org-netbeans-modules-parsing-lucene.jar}:\
6.45 + ${file.reference.util-commons.jar}:\
6.46 + ${file.reference.util-pojson.jar}
6.47 +# Space-separated list of extra javac options
6.48 +javac.compilerargs=
6.49 +javac.deprecation=false
6.50 +javac.processorpath=\
6.51 + ${javac.classpath}
6.52 +javac.source=1.6
6.53 +javac.target=1.6
6.54 +javac.test.classpath=\
6.55 + ${javac.classpath}:\
6.56 + ${build.classes.dir}
6.57 +javac.test.processorpath=\
6.58 + ${javac.test.classpath}
6.59 +javadoc.additionalparam=
6.60 +javadoc.author=false
6.61 +javadoc.encoding=${source.encoding}
6.62 +javadoc.noindex=false
6.63 +javadoc.nonavbar=false
6.64 +javadoc.notree=false
6.65 +javadoc.private=false
6.66 +javadoc.splitindex=true
6.67 +javadoc.use=true
6.68 +javadoc.version=false
6.69 +javadoc.windowtitle=
6.70 +jnlp.codebase.type=no.codebase
6.71 +jnlp.descriptor=application
6.72 +jnlp.enabled=false
6.73 +jnlp.mixed.code=default
6.74 +jnlp.offline-allowed=false
6.75 +jnlp.signed=false
6.76 +jnlp.signing=
6.77 +jnlp.signing.alias=
6.78 +jnlp.signing.keystore=
6.79 +main.class=duplicates.web.api.DuplicatesWebApi
6.80 +manifest.file=manifest.mf
6.81 +meta.inf.dir=${src.dir}/META-INF
6.82 +mkdist.disabled=false
6.83 +platform.active=default_platform
6.84 +project.base_web_api=../../../../remoting/server/web/base.web.api
6.85 +reference.base_web_api.jar=${project.base_web_api}/dist/base.web.api.jar
6.86 +run.classpath=\
6.87 + ${javac.classpath}:\
6.88 + ${build.classes.dir}
6.89 +# Space-separated list of JVM arguments used when running the project.
6.90 +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
6.91 +# To set system properties for unit tests define test-sys-prop.name=value:
6.92 +run.jvmargs=
6.93 +run.test.classpath=\
6.94 + ${javac.test.classpath}:\
6.95 + ${build.test.classes.dir}
6.96 +source.encoding=UTF-8
6.97 +src.dir=src
6.98 +test.src.dir=test
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/duplicates/server/web/duplicates.web.api/nbproject/project.xml Tue Jul 03 21:14:12 2012 +0200
7.3 @@ -0,0 +1,28 @@
7.4 +<?xml version="1.0" encoding="UTF-8"?>
7.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
7.6 + <type>org.netbeans.modules.java.j2seproject</type>
7.7 + <configuration>
7.8 + <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
7.9 + <name>duplicates.web.api</name>
7.10 + <source-roots>
7.11 + <root id="src.dir"/>
7.12 + </source-roots>
7.13 + <test-roots>
7.14 + <root id="test.src.dir"/>
7.15 + </test-roots>
7.16 + </data>
7.17 + <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
7.18 + <definitions>../../../../lib/nblibraries.properties</definitions>
7.19 + </libraries>
7.20 + <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
7.21 + <reference>
7.22 + <foreign-project>base_web_api</foreign-project>
7.23 + <artifact-type>jar</artifact-type>
7.24 + <script>build.xml</script>
7.25 + <target>jar</target>
7.26 + <clean-target>clean</clean-target>
7.27 + <id>jar</id>
7.28 + </reference>
7.29 + </references>
7.30 + </configuration>
7.31 +</project>
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/duplicates/server/web/duplicates.web.api/src/org/netbeans/modules/jackpot30/backend/duplicates/api/API.java Tue Jul 03 21:14:12 2012 +0200
8.3 @@ -0,0 +1,115 @@
8.4 +/*
8.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8.6 + *
8.7 + * Copyright 2009-2012 Sun Microsystems, Inc. All rights reserved.
8.8 + *
8.9 + * The contents of this file are subject to the terms of either the GNU
8.10 + * General Public License Version 2 only ("GPL") or the Common
8.11 + * Development and Distribution License("CDDL") (collectively, the
8.12 + * "License"). You may not use this file except in compliance with the
8.13 + * License. You can obtain a copy of the License at
8.14 + * http://www.netbeans.org/cddl-gplv2.html
8.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
8.16 + * specific language governing permissions and limitations under the
8.17 + * License. When distributing the software, include this License Header
8.18 + * Notice in each file and include the License file at
8.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
8.20 + * particular file as subject to the "Classpath" exception as provided
8.21 + * by Sun in the GPL Version 2 section of the License file that
8.22 + * accompanied this code. If applicable, add the following below the
8.23 + * License Header, with the fields enclosed by brackets [] replaced by
8.24 + * your own identifying information:
8.25 + * "Portions Copyrighted [year] [name of copyright owner]"
8.26 + *
8.27 + * If you wish your version of this file to be governed by only the CDDL
8.28 + * or only the GPL Version 2, indicate your decision by adding
8.29 + * "[Contributor] elects to include this software in this distribution
8.30 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
8.31 + * single choice of license, a recipient has the option to distribute
8.32 + * your version of this file under either the CDDL, the GPL Version 2 or
8.33 + * to extend the choice of license to its licensees as provided above.
8.34 + * However, if you add GPL Version 2 code and therefore, elected the GPL
8.35 + * Version 2 license, then the option applies only if the new code is
8.36 + * made subject to such option by the copyright holder.
8.37 + *
8.38 + * Contributor(s):
8.39 + *
8.40 + * Portions Copyrighted 2009-2012 Sun Microsystems, Inc.
8.41 + */
8.42 +
8.43 +package org.netbeans.modules.jackpot30.backend.duplicates.api;
8.44 +
8.45 +import java.io.IOException;
8.46 +import java.util.ArrayList;
8.47 +import java.util.Arrays;
8.48 +import java.util.Collection;
8.49 +import java.util.HashMap;
8.50 +import java.util.LinkedList;
8.51 +import java.util.List;
8.52 +import java.util.Map;
8.53 +import java.util.concurrent.atomic.AtomicBoolean;
8.54 +import javax.ws.rs.GET;
8.55 +import javax.ws.rs.Path;
8.56 +import javax.ws.rs.Produces;
8.57 +import javax.ws.rs.QueryParam;
8.58 +import org.apache.lucene.document.Document;
8.59 +import org.apache.lucene.document.FieldSelector;
8.60 +import org.apache.lucene.document.FieldSelectorResult;
8.61 +import org.apache.lucene.index.Term;
8.62 +import org.apache.lucene.search.Query;
8.63 +import org.apache.lucene.search.TermQuery;
8.64 +import org.codeviation.pojson.Pojson;
8.65 +import org.netbeans.modules.jackpot30.backend.base.CategoryStorage;
8.66 +import org.netbeans.modules.parsing.lucene.support.Convertor;
8.67 +import org.netbeans.modules.parsing.lucene.support.Index;
8.68 +
8.69 +/**
8.70 + *
8.71 + * @author lahvac
8.72 + */
8.73 +@Path("/index/duplicates")
8.74 +public class API {
8.75 +
8.76 + @GET
8.77 + @Path("/findDuplicates")
8.78 + @Produces("text/plain")
8.79 + public String findDuplicates(@QueryParam("path") String segment, @QueryParam("hashes") String hashes) throws IOException, InterruptedException {
8.80 + Map<String, Map<String, Collection<? extends String>>> hash2Segment2Contains = new HashMap<String, Map<String, Collection<? extends String>>>();
8.81 + Collection<String> segments = new LinkedList<String>();
8.82 +
8.83 + if (segment != null) segments.add(segment);
8.84 + else {
8.85 + for (CategoryStorage cat : CategoryStorage.listCategories()) {
8.86 + segments.add(cat.getId());
8.87 + }
8.88 + }
8.89 +
8.90 + Iterable<? extends String> hashesList = Arrays.asList(Pojson.load(String[].class, hashes));
8.91 +
8.92 + for (String key : segments) {
8.93 + for (String hash : hashesList) {
8.94 + CategoryStorage category = CategoryStorage.forId(key);
8.95 + Index index = category.getIndex();
8.96 + List<String> files = new ArrayList<String>();
8.97 + Query query = new TermQuery(new Term("duplicatesGeneralized", hash));
8.98 + index.query(files, new Convertor<Document, String>() {
8.99 + @Override public String convert(Document p) {
8.100 + return p.get("duplicatesPath");
8.101 + }
8.102 + }, new FieldSelector() {
8.103 + @Override public FieldSelectorResult accept(String fieldName) {
8.104 + return "duplicatesPath".equals(fieldName) ? FieldSelectorResult.LOAD : FieldSelectorResult.NO_LOAD;
8.105 + }
8.106 + }, new AtomicBoolean(), query);
8.107 + Map<String, Collection<? extends String>> segment2Contains = hash2Segment2Contains.get(hash);
8.108 + if (segment2Contains == null) {
8.109 + hash2Segment2Contains.put(hash, segment2Contains = new HashMap<String, Collection<? extends String>>());
8.110 + }
8.111 + segment2Contains.put(key, files);
8.112 + }
8.113 + }
8.114 +
8.115 + return Pojson.save(hash2Segment2Contains);
8.116 + }
8.117 +
8.118 +}
9.1 --- a/hudson/trunk Fri Jun 29 11:01:27 2012 +0200
9.2 +++ b/hudson/trunk Tue Jul 03 21:14:12 2012 +0200
9.3 @@ -47,6 +47,12 @@
9.4 (cd $subproject; ./build.sh -Dnbplatform.default.harness.dir=$PLATFORM/harness -Dnbplatform.default.netbeans.dest.dir=$PLATFORM -Dnbplatform.active.dir=$PLATFORM) || exit 1
9.5 done
9.6
9.7 +for subproject in $SUBPROJECTS; do
9.8 + if [ -x $subproject/post-build.sh ] ; then
9.9 + (cd $subproject; ./post-build.sh -Dnbplatform.default.harness.dir=$PLATFORM/harness -Dnbplatform.default.netbeans.dest.dir=$PLATFORM -Dnbplatform.active.dir=$PLATFORM) || exit 1
9.10 + fi;
9.11 +done
9.12 +
9.13 mkdir -p build/updates
9.14
9.15 NBMS_SUBPROJECTS="remoting language duplicates";
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/remoting/post-build.sh Tue Jul 03 21:14:12 2012 +0200
10.3 @@ -0,0 +1,6 @@
10.4 +#!/bin/bash
10.5 +cp -r ../duplicates/server/indexer/build/cluster/* build/indexing-backend/indexer
10.6 +cp -r ../duplicates/server/web/duplicates.web.api/dist/*.jar build/indexing-backend/web/lib
10.7 +
10.8 +(cd build; zip -r indexing-backend-feature-packed.zip indexing-backend) || exit 1
10.9 +(cd build; zip -r indexing-backend-feature-packed-shortened.zip `find indexing-backend -type f | grep -v indexing-backend/indexer/enterprise/ | grep -v indexing-backend/indexer/apisupport/ | grep -v indexing-backend/indexer/cnd/ | grep -v indexing-backend/indexer/dlight/ | grep -v indexing-backend/indexer/harness/ | grep -v indexing-backend/indexer/ide/ | grep -v indexing-backend/indexer/java | grep -v indexing-backend/indexer/nb/ | grep -v indexing-backend/indexer/platform/ | grep -v indexing-backend/indexer/profiler/ | grep -v indexing-backend/indexer/websvccommon/`) || exit 1
11.1 --- a/remoting/server/scripts/web.sh Fri Jun 29 11:01:27 2012 +0200
11.2 +++ b/remoting/server/scripts/web.sh Tue Jul 03 21:14:12 2012 +0200
11.3 @@ -1,2 +1,8 @@
11.4 +#!/bin/bash
11.5 +#XXX: unix only
11.6 DIR=`dirname $0`
11.7 -java -Djava.index.useMemCache=false -Xbootclasspath/p:$DIR/web/lib/nb-javac-api.jar:$DIR/web/lib/nb-javac-impl.jar -jar $DIR/web/web.main.jar "$@"
11.8 +classpath="$DIR/web/web.main.jar"
11.9 +for jar in $DIR/web/lib/*.jar; do
11.10 + classpath="$classpath:$jar"
11.11 +done
11.12 +java -Djava.index.useMemCache=false -Xbootclasspath/p:$DIR/web/lib/nb-javac-api.jar:$DIR/web/lib/nb-javac-impl.jar -classpath "$classpath" web.main.WebMain "$@"