Downloadable index??? (no IDE binding)
authorJan Lahoda <jlahoda@netbeans.org>
Mon, 12 Sep 2011 19:28:00 +0200
changeset 6914273130f27f4
parent 690 ec7ffe8b7195
child 692 4853f67582ce
Downloadable index??? (no IDE binding)
remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/OptionProcessorImpl.java
remoting/server/web/base.web.api/src/org/netbeans/modules/jackpot30/backend/base/CategoryStorage.java
remoting/server/web/nbindex.web.api/build.xml
remoting/server/web/nbindex.web.api/manifest.mf
remoting/server/web/nbindex.web.api/nbproject/build-impl.xml
remoting/server/web/nbindex.web.api/nbproject/genfiles.properties
remoting/server/web/nbindex.web.api/nbproject/project.properties
remoting/server/web/nbindex.web.api/nbproject/project.xml
remoting/server/web/nbindex.web.api/src/org/netbeans/modules/jackpot30/backend/usages/api/DownloadableIndex.java
remoting/server/web/web.main/nbproject/build-impl.xml
remoting/server/web/web.main/nbproject/genfiles.properties
remoting/server/web/web.main/nbproject/project.properties
remoting/server/web/web.main/nbproject/project.xml
     1.1 --- a/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/OptionProcessorImpl.java	Fri Sep 02 21:55:07 2011 +0200
     1.2 +++ b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/OptionProcessorImpl.java	Mon Sep 12 19:28:00 2011 +0200
     1.3 @@ -46,6 +46,7 @@
     1.4  import java.io.FileOutputStream;
     1.5  import java.io.IOException;
     1.6  import java.io.InputStream;
     1.7 +import java.net.URL;
     1.8  import java.util.Arrays;
     1.9  import java.util.HashSet;
    1.10  import java.util.Map;
    1.11 @@ -192,7 +193,11 @@
    1.12  
    1.13              for (String segment : in.stringPropertyNames()) {
    1.14                  String url = in.getProperty(segment);
    1.15 -                String rel = url.startsWith(baseDirPath) ? "rel:/" + url.substring(baseDirPath.length()) : url;
    1.16 +                String rel;
    1.17 +                
    1.18 +                if (url.startsWith(baseDirPath)) rel = "rel:/" + url.substring(baseDirPath.length());
    1.19 +                else if (url.startsWith("jar:" + baseDirPath)) rel = "jar:rel:/" + url.substring(4 + baseDirPath.length());
    1.20 +                else rel = url;
    1.21  
    1.22                  outSegments.setProperty(segment, rel);
    1.23              }
    1.24 @@ -204,6 +209,23 @@
    1.25              out.putNextEntry(new ZipEntry(categoryId + "/info"));
    1.26  
    1.27              out.write(("{ \"displayName\": \"" + categoryName + "\" }").getBytes("UTF-8"));
    1.28 +
    1.29 +            for (FileObject s : cacheFolder.getChildren()) {
    1.30 +                if (!s.isFolder() || !s.getNameExt().startsWith("s")) continue;
    1.31 +
    1.32 +                JarOutputStream local = null;
    1.33 +                try {
    1.34 +                    out.putNextEntry(new ZipEntry(categoryId + "/" + s.getNameExt()));
    1.35 +
    1.36 +                    local = new JarOutputStream(out);
    1.37 +
    1.38 +                    pack(local, s, s.getNameExt(), new StringBuilder(categoryId));
    1.39 +                } finally {
    1.40 +                    if (local != null) {
    1.41 +                        local.finish();
    1.42 +                    }
    1.43 +                }
    1.44 +            }
    1.45          } catch (IOException ex) {
    1.46              LOG.log(Level.FINE, null, ex);
    1.47              throw (CommandException) new CommandException(0).initCause(ex);
     2.1 --- a/remoting/server/web/base.web.api/src/org/netbeans/modules/jackpot30/backend/base/CategoryStorage.java	Fri Sep 02 21:55:07 2011 +0200
     2.2 +++ b/remoting/server/web/base.web.api/src/org/netbeans/modules/jackpot30/backend/base/CategoryStorage.java	Mon Sep 12 19:28:00 2011 +0200
     2.3 @@ -171,7 +171,7 @@
     2.4  
     2.5          for (URL srcRoot : getCategoryIndexFolders()) {
     2.6              if (!"rel".equals(srcRoot.getProtocol())) continue;
     2.7 -            result.add(srcRoot.getPath().substring(1));
     2.8 +                result.add(srcRoot.getPath().substring(1));
     2.9          }
    2.10  
    2.11          return result;
    2.12 @@ -212,4 +212,48 @@
    2.13              throw new IllegalStateException(ex);
    2.14          }
    2.15      }
    2.16 +
    2.17 +    public File getSegment(String relPath) {
    2.18 +        try {
    2.19 +            FileObject root = getCacheRoot();
    2.20 +            CacheFolder.setCacheFolder(root);
    2.21 +            Set<URL> result = new HashSet<URL>();
    2.22 +
    2.23 +            CacheFolder.getDataFolder(new URL("file:/"), true);
    2.24 +
    2.25 +            //XXX:
    2.26 +            Field invertedSegmentsField = CacheFolder.class.getDeclaredField("invertedSegments");
    2.27 +
    2.28 +            invertedSegmentsField.setAccessible(true);
    2.29 +
    2.30 +            @SuppressWarnings("unchecked")
    2.31 +            Map<String, String> invertedSegments = (Map<String, String>) invertedSegmentsField.get(null);
    2.32 +            String segment = invertedSegments.get(relPath);
    2.33 +
    2.34 +            if (segment == null) {
    2.35 +                segment = invertedSegments.get("rel:/" + relPath);
    2.36 +            }
    2.37 +
    2.38 +            if (segment == null) {
    2.39 +                segment = invertedSegments.get("rel:/" + relPath + "/");
    2.40 +            }
    2.41 +            
    2.42 +            if (segment != null) {
    2.43 +                return new File(new File(cacheRoot, id), segment);
    2.44 +            } else {
    2.45 +                return null;
    2.46 +            }
    2.47 +        } catch (IllegalArgumentException ex) {
    2.48 +            Logger.getLogger(CategoryStorage.class.getName()).log(Level.SEVERE, null, ex);
    2.49 +        } catch (IllegalAccessException ex) {
    2.50 +            Logger.getLogger(CategoryStorage.class.getName()).log(Level.SEVERE, null, ex);
    2.51 +        } catch (NoSuchFieldException ex) {
    2.52 +            Logger.getLogger(CategoryStorage.class.getName()).log(Level.SEVERE, null, ex);
    2.53 +        } catch (SecurityException ex) {
    2.54 +            Logger.getLogger(CategoryStorage.class.getName()).log(Level.SEVERE, null, ex);
    2.55 +        } catch (IOException ex) {
    2.56 +            Logger.getLogger(CategoryStorage.class.getName()).log(Level.SEVERE, null, ex);
    2.57 +        }
    2.58 +        return null;
    2.59 +    }
    2.60  }
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/remoting/server/web/nbindex.web.api/build.xml	Mon Sep 12 19:28:00 2011 +0200
     3.3 @@ -0,0 +1,74 @@
     3.4 +<?xml version="1.0" encoding="UTF-8"?>
     3.5 +<!-- You may freely edit this file. See commented blocks below for -->
     3.6 +<!-- some examples of how to customize the build. -->
     3.7 +<!-- (If you delete it and reopen the project it will be recreated.) -->
     3.8 +<!-- By default, only the Clean and Build commands use this build script. -->
     3.9 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
    3.10 +<!-- the Compile on Save feature is turned off for the project. -->
    3.11 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
    3.12 +<!-- in the project's Project Properties dialog box.-->
    3.13 +<project name="nbindex.web.api" default="default" basedir=".">
    3.14 +    <description>Builds, tests, and runs the project nbindex.web.api.</description>
    3.15 +    <import file="nbproject/build-impl.xml"/>
    3.16 +    <!--
    3.17 +
    3.18 +    There exist several targets which are by default empty and which can be 
    3.19 +    used for execution of your tasks. These targets are usually executed 
    3.20 +    before and after some main targets. They are: 
    3.21 +
    3.22 +      -pre-init:                 called before initialization of project properties
    3.23 +      -post-init:                called after initialization of project properties
    3.24 +      -pre-compile:              called before javac compilation
    3.25 +      -post-compile:             called after javac compilation
    3.26 +      -pre-compile-single:       called before javac compilation of single file
    3.27 +      -post-compile-single:      called after javac compilation of single file
    3.28 +      -pre-compile-test:         called before javac compilation of JUnit tests
    3.29 +      -post-compile-test:        called after javac compilation of JUnit tests
    3.30 +      -pre-compile-test-single:  called before javac compilation of single JUnit test
    3.31 +      -post-compile-test-single: called after javac compilation of single JUunit test
    3.32 +      -pre-jar:                  called before JAR building
    3.33 +      -post-jar:                 called after JAR building
    3.34 +      -post-clean:               called after cleaning build products
    3.35 +
    3.36 +    (Targets beginning with '-' are not intended to be called on their own.)
    3.37 +
    3.38 +    Example of inserting an obfuscator after compilation could look like this:
    3.39 +
    3.40 +        <target name="-post-compile">
    3.41 +            <obfuscate>
    3.42 +                <fileset dir="${build.classes.dir}"/>
    3.43 +            </obfuscate>
    3.44 +        </target>
    3.45 +
    3.46 +    For list of available properties check the imported 
    3.47 +    nbproject/build-impl.xml file. 
    3.48 +
    3.49 +
    3.50 +    Another way to customize the build is by overriding existing main targets.
    3.51 +    The targets of interest are: 
    3.52 +
    3.53 +      -init-macrodef-javac:     defines macro for javac compilation
    3.54 +      -init-macrodef-junit:     defines macro for junit execution
    3.55 +      -init-macrodef-debug:     defines macro for class debugging
    3.56 +      -init-macrodef-java:      defines macro for class execution
    3.57 +      -do-jar-with-manifest:    JAR building (if you are using a manifest)
    3.58 +      -do-jar-without-manifest: JAR building (if you are not using a manifest)
    3.59 +      run:                      execution of project 
    3.60 +      -javadoc-build:           Javadoc generation
    3.61 +      test-report:              JUnit report generation
    3.62 +
    3.63 +    An example of overriding the target for project execution could look like this:
    3.64 +
    3.65 +        <target name="run" depends="nbindex.web.api-impl.jar">
    3.66 +            <exec dir="bin" executable="launcher.exe">
    3.67 +                <arg file="${dist.jar}"/>
    3.68 +            </exec>
    3.69 +        </target>
    3.70 +
    3.71 +    Notice that the overridden target depends on the jar target and not only on 
    3.72 +    the compile target as the regular run target does. Again, for a list of available 
    3.73 +    properties which you can use, check the target you are overriding in the
    3.74 +    nbproject/build-impl.xml file. 
    3.75 +
    3.76 +    -->
    3.77 +</project>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/remoting/server/web/nbindex.web.api/manifest.mf	Mon Sep 12 19:28:00 2011 +0200
     4.3 @@ -0,0 +1,3 @@
     4.4 +Manifest-Version: 1.0
     4.5 +X-COMMENT: Main-Class will be added automatically by build
     4.6 +
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/remoting/server/web/nbindex.web.api/nbproject/build-impl.xml	Mon Sep 12 19:28:00 2011 +0200
     5.3 @@ -0,0 +1,1083 @@
     5.4 +<?xml version="1.0" encoding="UTF-8"?>
     5.5 +<!--
     5.6 +*** GENERATED FROM project.xml - DO NOT EDIT  ***
     5.7 +***         EDIT ../build.xml INSTEAD         ***
     5.8 +
     5.9 +For the purpose of easier reading the script
    5.10 +is divided into following sections:
    5.11 +
    5.12 +  - initialization
    5.13 +  - compilation
    5.14 +  - jar
    5.15 +  - execution
    5.16 +  - debugging
    5.17 +  - javadoc
    5.18 +  - junit compilation
    5.19 +  - junit execution
    5.20 +  - junit debugging
    5.21 +  - applet
    5.22 +  - cleanup
    5.23 +
    5.24 +        -->
    5.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="nbindex.web.api-impl">
    5.26 +    <fail message="Please build using Ant 1.8.0 or higher.">
    5.27 +        <condition>
    5.28 +            <not>
    5.29 +                <antversion atleast="1.8.0"/>
    5.30 +            </not>
    5.31 +        </condition>
    5.32 +    </fail>
    5.33 +    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
    5.34 +    <!-- 
    5.35 +                ======================
    5.36 +                INITIALIZATION SECTION 
    5.37 +                ======================
    5.38 +            -->
    5.39 +    <target name="-pre-init">
    5.40 +        <!-- Empty placeholder for easier customization. -->
    5.41 +        <!-- You can override this target in the ../build.xml file. -->
    5.42 +    </target>
    5.43 +    <target depends="-pre-init" name="-init-private">
    5.44 +        <property file="nbproject/private/config.properties"/>
    5.45 +        <property file="nbproject/private/configs/${config}.properties"/>
    5.46 +        <property file="nbproject/private/private.properties"/>
    5.47 +    </target>
    5.48 +    <target name="-pre-init-libraries">
    5.49 +        <property location="../../../../server/lib/nblibraries.properties" name="libraries.path"/>
    5.50 +        <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/>
    5.51 +        <pathconvert dirsep="/" property="libraries.dir">
    5.52 +            <path path="${libraries.dir.nativedirsep}"/>
    5.53 +        </pathconvert>
    5.54 +        <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/>
    5.55 +        <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/>
    5.56 +    </target>
    5.57 +    <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries">
    5.58 +        <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties">
    5.59 +            <filterchain>
    5.60 +                <replacestring from="$${base}" to="${libraries.dir}"/>
    5.61 +                <escapeunicode/>
    5.62 +            </filterchain>
    5.63 +        </loadproperties>
    5.64 +    </target>
    5.65 +    <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries">
    5.66 +        <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}">
    5.67 +            <filterchain>
    5.68 +                <replacestring from="$${base}" to="${libraries.dir}"/>
    5.69 +                <escapeunicode/>
    5.70 +            </filterchain>
    5.71 +        </loadproperties>
    5.72 +    </target>
    5.73 +    <target depends="-pre-init,-init-private,-init-libraries" name="-init-user">
    5.74 +        <property file="${user.properties.file}"/>
    5.75 +        <!-- The two properties below are usually overridden -->
    5.76 +        <!-- by the active platform. Just a fallback. -->
    5.77 +        <property name="default.javac.source" value="1.4"/>
    5.78 +        <property name="default.javac.target" value="1.4"/>
    5.79 +    </target>
    5.80 +    <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project">
    5.81 +        <property file="nbproject/configs/${config}.properties"/>
    5.82 +        <property file="nbproject/project.properties"/>
    5.83 +    </target>
    5.84 +    <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    5.85 +        <available file="${manifest.file}" property="manifest.available"/>
    5.86 +        <condition property="splashscreen.available">
    5.87 +            <and>
    5.88 +                <not>
    5.89 +                    <equals arg1="${application.splash}" arg2="" trim="true"/>
    5.90 +                </not>
    5.91 +                <available file="${application.splash}"/>
    5.92 +            </and>
    5.93 +        </condition>
    5.94 +        <condition property="main.class.available">
    5.95 +            <and>
    5.96 +                <isset property="main.class"/>
    5.97 +                <not>
    5.98 +                    <equals arg1="${main.class}" arg2="" trim="true"/>
    5.99 +                </not>
   5.100 +            </and>
   5.101 +        </condition>
   5.102 +        <condition property="manifest.available+main.class">
   5.103 +            <and>
   5.104 +                <isset property="manifest.available"/>
   5.105 +                <isset property="main.class.available"/>
   5.106 +            </and>
   5.107 +        </condition>
   5.108 +        <condition property="do.archive">
   5.109 +            <not>
   5.110 +                <istrue value="${jar.archive.disabled}"/>
   5.111 +            </not>
   5.112 +        </condition>
   5.113 +        <condition property="do.mkdist">
   5.114 +            <and>
   5.115 +                <isset property="do.archive"/>
   5.116 +                <isset property="libs.CopyLibs.classpath"/>
   5.117 +                <not>
   5.118 +                    <istrue value="${mkdist.disabled}"/>
   5.119 +                </not>
   5.120 +            </and>
   5.121 +        </condition>
   5.122 +        <condition property="manifest.available+main.class+mkdist.available">
   5.123 +            <and>
   5.124 +                <istrue value="${manifest.available+main.class}"/>
   5.125 +                <isset property="do.mkdist"/>
   5.126 +            </and>
   5.127 +        </condition>
   5.128 +        <condition property="do.archive+manifest.available">
   5.129 +            <and>
   5.130 +                <isset property="manifest.available"/>
   5.131 +                <istrue value="${do.archive}"/>
   5.132 +            </and>
   5.133 +        </condition>
   5.134 +        <condition property="do.archive+main.class.available">
   5.135 +            <and>
   5.136 +                <isset property="main.class.available"/>
   5.137 +                <istrue value="${do.archive}"/>
   5.138 +            </and>
   5.139 +        </condition>
   5.140 +        <condition property="do.archive+splashscreen.available">
   5.141 +            <and>
   5.142 +                <isset property="splashscreen.available"/>
   5.143 +                <istrue value="${do.archive}"/>
   5.144 +            </and>
   5.145 +        </condition>
   5.146 +        <condition property="do.archive+manifest.available+main.class">
   5.147 +            <and>
   5.148 +                <istrue value="${manifest.available+main.class}"/>
   5.149 +                <istrue value="${do.archive}"/>
   5.150 +            </and>
   5.151 +        </condition>
   5.152 +        <condition property="manifest.available-mkdist.available">
   5.153 +            <or>
   5.154 +                <istrue value="${manifest.available}"/>
   5.155 +                <isset property="do.mkdist"/>
   5.156 +            </or>
   5.157 +        </condition>
   5.158 +        <condition property="manifest.available+main.class-mkdist.available">
   5.159 +            <or>
   5.160 +                <istrue value="${manifest.available+main.class}"/>
   5.161 +                <isset property="do.mkdist"/>
   5.162 +            </or>
   5.163 +        </condition>
   5.164 +        <condition property="have.tests">
   5.165 +            <or>
   5.166 +                <available file="${test.src.dir}"/>
   5.167 +            </or>
   5.168 +        </condition>
   5.169 +        <condition property="have.sources">
   5.170 +            <or>
   5.171 +                <available file="${src.dir}"/>
   5.172 +            </or>
   5.173 +        </condition>
   5.174 +        <condition property="netbeans.home+have.tests">
   5.175 +            <and>
   5.176 +                <isset property="netbeans.home"/>
   5.177 +                <isset property="have.tests"/>
   5.178 +            </and>
   5.179 +        </condition>
   5.180 +        <condition property="no.javadoc.preview">
   5.181 +            <and>
   5.182 +                <isset property="javadoc.preview"/>
   5.183 +                <isfalse value="${javadoc.preview}"/>
   5.184 +            </and>
   5.185 +        </condition>
   5.186 +        <property name="run.jvmargs" value=""/>
   5.187 +        <property name="javac.compilerargs" value=""/>
   5.188 +        <property name="work.dir" value="${basedir}"/>
   5.189 +        <condition property="no.deps">
   5.190 +            <and>
   5.191 +                <istrue value="${no.dependencies}"/>
   5.192 +            </and>
   5.193 +        </condition>
   5.194 +        <property name="javac.debug" value="true"/>
   5.195 +        <property name="javadoc.preview" value="true"/>
   5.196 +        <property name="application.args" value=""/>
   5.197 +        <property name="source.encoding" value="${file.encoding}"/>
   5.198 +        <property name="runtime.encoding" value="${source.encoding}"/>
   5.199 +        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
   5.200 +            <and>
   5.201 +                <isset property="javadoc.encoding"/>
   5.202 +                <not>
   5.203 +                    <equals arg1="${javadoc.encoding}" arg2=""/>
   5.204 +                </not>
   5.205 +            </and>
   5.206 +        </condition>
   5.207 +        <property name="javadoc.encoding.used" value="${source.encoding}"/>
   5.208 +        <property name="includes" value="**"/>
   5.209 +        <property name="excludes" value=""/>
   5.210 +        <property name="do.depend" value="false"/>
   5.211 +        <condition property="do.depend.true">
   5.212 +            <istrue value="${do.depend}"/>
   5.213 +        </condition>
   5.214 +        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   5.215 +        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   5.216 +            <length length="0" string="${endorsed.classpath}" when="greater"/>
   5.217 +        </condition>
   5.218 +        <condition else="false" property="jdkBug6558476">
   5.219 +            <and>
   5.220 +                <matches pattern="1\.[56]" string="${java.specification.version}"/>
   5.221 +                <not>
   5.222 +                    <os family="unix"/>
   5.223 +                </not>
   5.224 +            </and>
   5.225 +        </condition>
   5.226 +        <property name="javac.fork" value="${jdkBug6558476}"/>
   5.227 +        <property name="jar.index" value="false"/>
   5.228 +        <property name="jar.index.metainf" value="${jar.index}"/>
   5.229 +        <property name="copylibs.rebase" value="true"/>
   5.230 +        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
   5.231 +    </target>
   5.232 +    <target name="-post-init">
   5.233 +        <!-- Empty placeholder for easier customization. -->
   5.234 +        <!-- You can override this target in the ../build.xml file. -->
   5.235 +    </target>
   5.236 +    <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
   5.237 +        <fail unless="src.dir">Must set src.dir</fail>
   5.238 +        <fail unless="test.src.dir">Must set test.src.dir</fail>
   5.239 +        <fail unless="build.dir">Must set build.dir</fail>
   5.240 +        <fail unless="dist.dir">Must set dist.dir</fail>
   5.241 +        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
   5.242 +        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
   5.243 +        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
   5.244 +        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
   5.245 +        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
   5.246 +        <fail unless="dist.jar">Must set dist.jar</fail>
   5.247 +    </target>
   5.248 +    <target name="-init-macrodef-property">
   5.249 +        <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
   5.250 +            <attribute name="name"/>
   5.251 +            <attribute name="value"/>
   5.252 +            <sequential>
   5.253 +                <property name="@{name}" value="${@{value}}"/>
   5.254 +            </sequential>
   5.255 +        </macrodef>
   5.256 +    </target>
   5.257 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
   5.258 +        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   5.259 +            <attribute default="${src.dir}" name="srcdir"/>
   5.260 +            <attribute default="${build.classes.dir}" name="destdir"/>
   5.261 +            <attribute default="${javac.classpath}" name="classpath"/>
   5.262 +            <attribute default="${javac.processorpath}" name="processorpath"/>
   5.263 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   5.264 +            <attribute default="${includes}" name="includes"/>
   5.265 +            <attribute default="${excludes}" name="excludes"/>
   5.266 +            <attribute default="${javac.debug}" name="debug"/>
   5.267 +            <attribute default="${empty.dir}" name="sourcepath"/>
   5.268 +            <attribute default="${empty.dir}" name="gensrcdir"/>
   5.269 +            <element name="customize" optional="true"/>
   5.270 +            <sequential>
   5.271 +                <property location="${build.dir}/empty" name="empty.dir"/>
   5.272 +                <mkdir dir="${empty.dir}"/>
   5.273 +                <mkdir dir="@{apgeneratedsrcdir}"/>
   5.274 +                <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}">
   5.275 +                    <src>
   5.276 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   5.277 +                            <include name="*"/>
   5.278 +                        </dirset>
   5.279 +                    </src>
   5.280 +                    <classpath>
   5.281 +                        <path path="@{classpath}"/>
   5.282 +                    </classpath>
   5.283 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   5.284 +                    <compilerarg line="${javac.compilerargs}"/>
   5.285 +                    <compilerarg value="-processorpath"/>
   5.286 +                    <compilerarg path="@{processorpath}:${empty.dir}"/>
   5.287 +                    <compilerarg line="${ap.processors.internal}"/>
   5.288 +                    <compilerarg line="${annotation.processing.processor.options}"/>
   5.289 +                    <compilerarg value="-s"/>
   5.290 +                    <compilerarg path="@{apgeneratedsrcdir}"/>
   5.291 +                    <compilerarg line="${ap.proc.none.internal}"/>
   5.292 +                    <customize/>
   5.293 +                </javac>
   5.294 +            </sequential>
   5.295 +        </macrodef>
   5.296 +    </target>
   5.297 +    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
   5.298 +        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   5.299 +            <attribute default="${src.dir}" name="srcdir"/>
   5.300 +            <attribute default="${build.classes.dir}" name="destdir"/>
   5.301 +            <attribute default="${javac.classpath}" name="classpath"/>
   5.302 +            <attribute default="${javac.processorpath}" name="processorpath"/>
   5.303 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   5.304 +            <attribute default="${includes}" name="includes"/>
   5.305 +            <attribute default="${excludes}" name="excludes"/>
   5.306 +            <attribute default="${javac.debug}" name="debug"/>
   5.307 +            <attribute default="${empty.dir}" name="sourcepath"/>
   5.308 +            <attribute default="${empty.dir}" name="gensrcdir"/>
   5.309 +            <element name="customize" optional="true"/>
   5.310 +            <sequential>
   5.311 +                <property location="${build.dir}/empty" name="empty.dir"/>
   5.312 +                <mkdir dir="${empty.dir}"/>
   5.313 +                <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}">
   5.314 +                    <src>
   5.315 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   5.316 +                            <include name="*"/>
   5.317 +                        </dirset>
   5.318 +                    </src>
   5.319 +                    <classpath>
   5.320 +                        <path path="@{classpath}"/>
   5.321 +                    </classpath>
   5.322 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   5.323 +                    <compilerarg line="${javac.compilerargs}"/>
   5.324 +                    <customize/>
   5.325 +                </javac>
   5.326 +            </sequential>
   5.327 +        </macrodef>
   5.328 +    </target>
   5.329 +    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
   5.330 +        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   5.331 +            <attribute default="${src.dir}" name="srcdir"/>
   5.332 +            <attribute default="${build.classes.dir}" name="destdir"/>
   5.333 +            <attribute default="${javac.classpath}" name="classpath"/>
   5.334 +            <sequential>
   5.335 +                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
   5.336 +                    <classpath>
   5.337 +                        <path path="@{classpath}"/>
   5.338 +                    </classpath>
   5.339 +                </depend>
   5.340 +            </sequential>
   5.341 +        </macrodef>
   5.342 +        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
   5.343 +            <attribute default="${build.classes.dir}" name="destdir"/>
   5.344 +            <sequential>
   5.345 +                <fail unless="javac.includes">Must set javac.includes</fail>
   5.346 +                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
   5.347 +                    <path>
   5.348 +                        <filelist dir="@{destdir}" files="${javac.includes}"/>
   5.349 +                    </path>
   5.350 +                    <globmapper from="*.java" to="*.class"/>
   5.351 +                </pathconvert>
   5.352 +                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
   5.353 +                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
   5.354 +                <delete>
   5.355 +                    <files includesfile="${javac.includesfile.binary}"/>
   5.356 +                </delete>
   5.357 +                <delete>
   5.358 +                    <fileset file="${javac.includesfile.binary}"/>
   5.359 +                </delete>
   5.360 +            </sequential>
   5.361 +        </macrodef>
   5.362 +    </target>
   5.363 +    <target name="-init-macrodef-junit">
   5.364 +        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   5.365 +            <attribute default="${includes}" name="includes"/>
   5.366 +            <attribute default="${excludes}" name="excludes"/>
   5.367 +            <attribute default="**" name="testincludes"/>
   5.368 +            <sequential>
   5.369 +                <property name="junit.forkmode" value="perTest"/>
   5.370 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   5.371 +                    <batchtest todir="${build.test.results.dir}">
   5.372 +                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   5.373 +                            <filename name="@{testincludes}"/>
   5.374 +                        </fileset>
   5.375 +                    </batchtest>
   5.376 +                    <classpath>
   5.377 +                        <path path="${run.test.classpath}"/>
   5.378 +                    </classpath>
   5.379 +                    <syspropertyset>
   5.380 +                        <propertyref prefix="test-sys-prop."/>
   5.381 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   5.382 +                    </syspropertyset>
   5.383 +                    <formatter type="brief" usefile="false"/>
   5.384 +                    <formatter type="xml"/>
   5.385 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   5.386 +                    <jvmarg value="-ea"/>
   5.387 +                    <jvmarg line="${run.jvmargs}"/>
   5.388 +                </junit>
   5.389 +            </sequential>
   5.390 +        </macrodef>
   5.391 +    </target>
   5.392 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
   5.393 +    <target name="-profile-pre-init">
   5.394 +        <!-- Empty placeholder for easier customization. -->
   5.395 +        <!-- You can override this target in the ../build.xml file. -->
   5.396 +    </target>
   5.397 +    <target name="-profile-post-init">
   5.398 +        <!-- Empty placeholder for easier customization. -->
   5.399 +        <!-- You can override this target in the ../build.xml file. -->
   5.400 +    </target>
   5.401 +    <target name="-profile-init-macrodef-profile">
   5.402 +        <macrodef name="resolve">
   5.403 +            <attribute name="name"/>
   5.404 +            <attribute name="value"/>
   5.405 +            <sequential>
   5.406 +                <property name="@{name}" value="${env.@{value}}"/>
   5.407 +            </sequential>
   5.408 +        </macrodef>
   5.409 +        <macrodef name="profile">
   5.410 +            <attribute default="${main.class}" name="classname"/>
   5.411 +            <element name="customize" optional="true"/>
   5.412 +            <sequential>
   5.413 +                <property environment="env"/>
   5.414 +                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
   5.415 +                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
   5.416 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   5.417 +                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
   5.418 +                    <jvmarg line="${profiler.info.jvmargs}"/>
   5.419 +                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   5.420 +                    <arg line="${application.args}"/>
   5.421 +                    <classpath>
   5.422 +                        <path path="${run.classpath}"/>
   5.423 +                    </classpath>
   5.424 +                    <syspropertyset>
   5.425 +                        <propertyref prefix="run-sys-prop."/>
   5.426 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   5.427 +                    </syspropertyset>
   5.428 +                    <customize/>
   5.429 +                </java>
   5.430 +            </sequential>
   5.431 +        </macrodef>
   5.432 +    </target>
   5.433 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
   5.434 +        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
   5.435 +        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
   5.436 +    </target>
   5.437 +    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   5.438 +        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   5.439 +            <attribute default="${main.class}" name="name"/>
   5.440 +            <attribute default="${debug.classpath}" name="classpath"/>
   5.441 +            <attribute default="" name="stopclassname"/>
   5.442 +            <sequential>
   5.443 +                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
   5.444 +                    <classpath>
   5.445 +                        <path path="@{classpath}"/>
   5.446 +                    </classpath>
   5.447 +                </nbjpdastart>
   5.448 +            </sequential>
   5.449 +        </macrodef>
   5.450 +        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
   5.451 +            <attribute default="${build.classes.dir}" name="dir"/>
   5.452 +            <sequential>
   5.453 +                <nbjpdareload>
   5.454 +                    <fileset dir="@{dir}" includes="${fix.classes}">
   5.455 +                        <include name="${fix.includes}*.class"/>
   5.456 +                    </fileset>
   5.457 +                </nbjpdareload>
   5.458 +            </sequential>
   5.459 +        </macrodef>
   5.460 +    </target>
   5.461 +    <target name="-init-debug-args">
   5.462 +        <property name="version-output" value="java version &quot;${ant.java.version}"/>
   5.463 +        <condition property="have-jdk-older-than-1.4">
   5.464 +            <or>
   5.465 +                <contains string="${version-output}" substring="java version &quot;1.0"/>
   5.466 +                <contains string="${version-output}" substring="java version &quot;1.1"/>
   5.467 +                <contains string="${version-output}" substring="java version &quot;1.2"/>
   5.468 +                <contains string="${version-output}" substring="java version &quot;1.3"/>
   5.469 +            </or>
   5.470 +        </condition>
   5.471 +        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   5.472 +            <istrue value="${have-jdk-older-than-1.4}"/>
   5.473 +        </condition>
   5.474 +        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
   5.475 +            <os family="windows"/>
   5.476 +        </condition>
   5.477 +        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
   5.478 +            <isset property="debug.transport"/>
   5.479 +        </condition>
   5.480 +    </target>
   5.481 +    <target depends="-init-debug-args" name="-init-macrodef-debug">
   5.482 +        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   5.483 +            <attribute default="${main.class}" name="classname"/>
   5.484 +            <attribute default="${debug.classpath}" name="classpath"/>
   5.485 +            <element name="customize" optional="true"/>
   5.486 +            <sequential>
   5.487 +                <java classname="@{classname}" dir="${work.dir}" fork="true">
   5.488 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   5.489 +                    <jvmarg line="${debug-args-line}"/>
   5.490 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   5.491 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   5.492 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   5.493 +                    <jvmarg line="${run.jvmargs}"/>
   5.494 +                    <classpath>
   5.495 +                        <path path="@{classpath}"/>
   5.496 +                    </classpath>
   5.497 +                    <syspropertyset>
   5.498 +                        <propertyref prefix="run-sys-prop."/>
   5.499 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   5.500 +                    </syspropertyset>
   5.501 +                    <customize/>
   5.502 +                </java>
   5.503 +            </sequential>
   5.504 +        </macrodef>
   5.505 +    </target>
   5.506 +    <target name="-init-macrodef-java">
   5.507 +        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   5.508 +            <attribute default="${main.class}" name="classname"/>
   5.509 +            <attribute default="${run.classpath}" name="classpath"/>
   5.510 +            <element name="customize" optional="true"/>
   5.511 +            <sequential>
   5.512 +                <java classname="@{classname}" dir="${work.dir}" fork="true">
   5.513 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   5.514 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   5.515 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   5.516 +                    <jvmarg line="${run.jvmargs}"/>
   5.517 +                    <classpath>
   5.518 +                        <path path="@{classpath}"/>
   5.519 +                    </classpath>
   5.520 +                    <syspropertyset>
   5.521 +                        <propertyref prefix="run-sys-prop."/>
   5.522 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   5.523 +                    </syspropertyset>
   5.524 +                    <customize/>
   5.525 +                </java>
   5.526 +            </sequential>
   5.527 +        </macrodef>
   5.528 +    </target>
   5.529 +    <target name="-init-macrodef-copylibs">
   5.530 +        <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
   5.531 +            <attribute default="${manifest.file}" name="manifest"/>
   5.532 +            <element name="customize" optional="true"/>
   5.533 +            <sequential>
   5.534 +                <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   5.535 +                <pathconvert property="run.classpath.without.build.classes.dir">
   5.536 +                    <path path="${run.classpath}"/>
   5.537 +                    <map from="${build.classes.dir.resolved}" to=""/>
   5.538 +                </pathconvert>
   5.539 +                <pathconvert pathsep=" " property="jar.classpath">
   5.540 +                    <path path="${run.classpath.without.build.classes.dir}"/>
   5.541 +                    <chainedmapper>
   5.542 +                        <flattenmapper/>
   5.543 +                        <globmapper from="*" to="lib/*"/>
   5.544 +                    </chainedmapper>
   5.545 +                </pathconvert>
   5.546 +                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   5.547 +                <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}">
   5.548 +                    <fileset dir="${build.classes.dir}"/>
   5.549 +                    <manifest>
   5.550 +                        <attribute name="Class-Path" value="${jar.classpath}"/>
   5.551 +                        <customize/>
   5.552 +                    </manifest>
   5.553 +                </copylibs>
   5.554 +            </sequential>
   5.555 +        </macrodef>
   5.556 +    </target>
   5.557 +    <target name="-init-presetdef-jar">
   5.558 +        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
   5.559 +            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
   5.560 +                <j2seproject1:fileset dir="${build.classes.dir}"/>
   5.561 +            </jar>
   5.562 +        </presetdef>
   5.563 +    </target>
   5.564 +    <target name="-init-ap-cmdline-properties">
   5.565 +        <property name="annotation.processing.enabled" value="true"/>
   5.566 +        <property name="annotation.processing.processors.list" value=""/>
   5.567 +        <property name="annotation.processing.processor.options" value=""/>
   5.568 +        <property name="annotation.processing.run.all.processors" value="true"/>
   5.569 +        <property name="javac.processorpath" value="${javac.classpath}"/>
   5.570 +        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
   5.571 +        <condition property="ap.supported.internal" value="true">
   5.572 +            <not>
   5.573 +                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
   5.574 +            </not>
   5.575 +        </condition>
   5.576 +    </target>
   5.577 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
   5.578 +        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
   5.579 +            <isfalse value="${annotation.processing.run.all.processors}"/>
   5.580 +        </condition>
   5.581 +        <condition else="" property="ap.proc.none.internal" value="-proc:none">
   5.582 +            <isfalse value="${annotation.processing.enabled}"/>
   5.583 +        </condition>
   5.584 +    </target>
   5.585 +    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
   5.586 +        <property name="ap.cmd.line.internal" value=""/>
   5.587 +    </target>
   5.588 +    <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-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
   5.589 +    <!--
   5.590 +                ===================
   5.591 +                COMPILATION SECTION
   5.592 +                ===================
   5.593 +            -->
   5.594 +    <target name="-deps-jar-init" unless="built-jar.properties">
   5.595 +        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
   5.596 +        <delete file="${built-jar.properties}" quiet="true"/>
   5.597 +    </target>
   5.598 +    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
   5.599 +        <echo level="warn" message="Cycle detected: nbindex.web.api was already built"/>
   5.600 +    </target>
   5.601 +    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
   5.602 +        <mkdir dir="${build.dir}"/>
   5.603 +        <touch file="${built-jar.properties}" verbose="false"/>
   5.604 +        <property file="${built-jar.properties}" prefix="already.built.jar."/>
   5.605 +        <antcall target="-warn-already-built-jar"/>
   5.606 +        <propertyfile file="${built-jar.properties}">
   5.607 +            <entry key="${basedir}" value=""/>
   5.608 +        </propertyfile>
   5.609 +        <antcall target="-maybe-call-dep">
   5.610 +            <param name="call.built.properties" value="${built-jar.properties}"/>
   5.611 +            <param location="${project.base_web_api}" name="call.subproject"/>
   5.612 +            <param location="${project.base_web_api}/build.xml" name="call.script"/>
   5.613 +            <param name="call.target" value="jar"/>
   5.614 +            <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
   5.615 +        </antcall>
   5.616 +    </target>
   5.617 +    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
   5.618 +    <target depends="init" name="-check-automatic-build">
   5.619 +        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
   5.620 +    </target>
   5.621 +    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
   5.622 +        <antcall target="clean"/>
   5.623 +    </target>
   5.624 +    <target depends="init,deps-jar" name="-pre-pre-compile">
   5.625 +        <mkdir dir="${build.classes.dir}"/>
   5.626 +    </target>
   5.627 +    <target name="-pre-compile">
   5.628 +        <!-- Empty placeholder for easier customization. -->
   5.629 +        <!-- You can override this target in the ../build.xml file. -->
   5.630 +    </target>
   5.631 +    <target if="do.depend.true" name="-compile-depend">
   5.632 +        <pathconvert property="build.generated.subdirs">
   5.633 +            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   5.634 +                <include name="*"/>
   5.635 +            </dirset>
   5.636 +        </pathconvert>
   5.637 +        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
   5.638 +    </target>
   5.639 +    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
   5.640 +        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
   5.641 +        <copy todir="${build.classes.dir}">
   5.642 +            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   5.643 +        </copy>
   5.644 +    </target>
   5.645 +    <target if="has.persistence.xml" name="-copy-persistence-xml">
   5.646 +        <mkdir dir="${build.classes.dir}/META-INF"/>
   5.647 +        <copy todir="${build.classes.dir}/META-INF">
   5.648 +            <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
   5.649 +        </copy>
   5.650 +    </target>
   5.651 +    <target name="-post-compile">
   5.652 +        <!-- Empty placeholder for easier customization. -->
   5.653 +        <!-- You can override this target in the ../build.xml file. -->
   5.654 +    </target>
   5.655 +    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
   5.656 +    <target name="-pre-compile-single">
   5.657 +        <!-- Empty placeholder for easier customization. -->
   5.658 +        <!-- You can override this target in the ../build.xml file. -->
   5.659 +    </target>
   5.660 +    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   5.661 +        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   5.662 +        <j2seproject3:force-recompile/>
   5.663 +        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
   5.664 +    </target>
   5.665 +    <target name="-post-compile-single">
   5.666 +        <!-- Empty placeholder for easier customization. -->
   5.667 +        <!-- You can override this target in the ../build.xml file. -->
   5.668 +    </target>
   5.669 +    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   5.670 +    <!--
   5.671 +                ====================
   5.672 +                JAR BUILDING SECTION
   5.673 +                ====================
   5.674 +            -->
   5.675 +    <target depends="init" name="-pre-pre-jar">
   5.676 +        <dirname file="${dist.jar}" property="dist.jar.dir"/>
   5.677 +        <mkdir dir="${dist.jar.dir}"/>
   5.678 +    </target>
   5.679 +    <target name="-pre-jar">
   5.680 +        <!-- Empty placeholder for easier customization. -->
   5.681 +        <!-- You can override this target in the ../build.xml file. -->
   5.682 +    </target>
   5.683 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
   5.684 +        <j2seproject1:jar/>
   5.685 +    </target>
   5.686 +    <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">
   5.687 +        <j2seproject1:jar manifest="${manifest.file}"/>
   5.688 +    </target>
   5.689 +    <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">
   5.690 +        <j2seproject1:jar manifest="${manifest.file}">
   5.691 +            <j2seproject1:manifest>
   5.692 +                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   5.693 +            </j2seproject1:manifest>
   5.694 +        </j2seproject1:jar>
   5.695 +        <echo level="info">To run this application from the command line without Ant, try:</echo>
   5.696 +        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   5.697 +        <property location="${dist.jar}" name="dist.jar.resolved"/>
   5.698 +        <pathconvert property="run.classpath.with.dist.jar">
   5.699 +            <path path="${run.classpath}"/>
   5.700 +            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   5.701 +        </pathconvert>
   5.702 +        <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   5.703 +    </target>
   5.704 +    <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
   5.705 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   5.706 +        <touch file="${tmp.manifest.file}" verbose="false"/>
   5.707 +    </target>
   5.708 +    <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
   5.709 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   5.710 +        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
   5.711 +    </target>
   5.712 +    <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">
   5.713 +        <manifest file="${tmp.manifest.file}" mode="update">
   5.714 +            <attribute name="Main-Class" value="${main.class}"/>
   5.715 +        </manifest>
   5.716 +    </target>
   5.717 +    <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">
   5.718 +        <basename file="${application.splash}" property="splashscreen.basename"/>
   5.719 +        <mkdir dir="${build.classes.dir}/META-INF"/>
   5.720 +        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
   5.721 +        <manifest file="${tmp.manifest.file}" mode="update">
   5.722 +            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
   5.723 +        </manifest>
   5.724 +    </target>
   5.725 +    <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">
   5.726 +        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
   5.727 +        <echo level="info">To run this application from the command line without Ant, try:</echo>
   5.728 +        <property location="${dist.jar}" name="dist.jar.resolved"/>
   5.729 +        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
   5.730 +    </target>
   5.731 +    <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
   5.732 +        <delete>
   5.733 +            <fileset file="${tmp.manifest.file}"/>
   5.734 +        </delete>
   5.735 +    </target>
   5.736 +    <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"/>
   5.737 +    <target name="-post-jar">
   5.738 +        <!-- Empty placeholder for easier customization. -->
   5.739 +        <!-- You can override this target in the ../build.xml file. -->
   5.740 +    </target>
   5.741 +    <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"/>
   5.742 +    <!--
   5.743 +                =================
   5.744 +                EXECUTION SECTION
   5.745 +                =================
   5.746 +            -->
   5.747 +    <target depends="init,compile" description="Run a main class." name="run">
   5.748 +        <j2seproject1:java>
   5.749 +            <customize>
   5.750 +                <arg line="${application.args}"/>
   5.751 +            </customize>
   5.752 +        </j2seproject1:java>
   5.753 +    </target>
   5.754 +    <target name="-do-not-recompile">
   5.755 +        <property name="javac.includes.binary" value=""/>
   5.756 +    </target>
   5.757 +    <target depends="init,compile-single" name="run-single">
   5.758 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   5.759 +        <j2seproject1:java classname="${run.class}"/>
   5.760 +    </target>
   5.761 +    <target depends="init,compile-test-single" name="run-test-with-main">
   5.762 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   5.763 +        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
   5.764 +    </target>
   5.765 +    <!--
   5.766 +                =================
   5.767 +                DEBUGGING SECTION
   5.768 +                =================
   5.769 +            -->
   5.770 +    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
   5.771 +        <j2seproject1:nbjpdastart name="${debug.class}"/>
   5.772 +    </target>
   5.773 +    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
   5.774 +        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
   5.775 +    </target>
   5.776 +    <target depends="init,compile" name="-debug-start-debuggee">
   5.777 +        <j2seproject3:debug>
   5.778 +            <customize>
   5.779 +                <arg line="${application.args}"/>
   5.780 +            </customize>
   5.781 +        </j2seproject3:debug>
   5.782 +    </target>
   5.783 +    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
   5.784 +    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
   5.785 +        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
   5.786 +    </target>
   5.787 +    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
   5.788 +    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
   5.789 +        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   5.790 +        <j2seproject3:debug classname="${debug.class}"/>
   5.791 +    </target>
   5.792 +    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   5.793 +    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
   5.794 +        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   5.795 +        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
   5.796 +    </target>
   5.797 +    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
   5.798 +    <target depends="init" name="-pre-debug-fix">
   5.799 +        <fail unless="fix.includes">Must set fix.includes</fail>
   5.800 +        <property name="javac.includes" value="${fix.includes}.java"/>
   5.801 +    </target>
   5.802 +    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
   5.803 +        <j2seproject1:nbjpdareload/>
   5.804 +    </target>
   5.805 +    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   5.806 +    <!--
   5.807 +                =================
   5.808 +                PROFILING SECTION
   5.809 +                =================
   5.810 +            -->
   5.811 +    <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
   5.812 +        <nbprofiledirect>
   5.813 +            <classpath>
   5.814 +                <path path="${run.classpath}"/>
   5.815 +            </classpath>
   5.816 +        </nbprofiledirect>
   5.817 +        <profile/>
   5.818 +    </target>
   5.819 +    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
   5.820 +        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
   5.821 +        <nbprofiledirect>
   5.822 +            <classpath>
   5.823 +                <path path="${run.classpath}"/>
   5.824 +            </classpath>
   5.825 +        </nbprofiledirect>
   5.826 +        <profile classname="${profile.class}"/>
   5.827 +    </target>
   5.828 +    <!--
   5.829 +                =========================
   5.830 +                APPLET PROFILING  SECTION
   5.831 +                =========================
   5.832 +            -->
   5.833 +    <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
   5.834 +        <nbprofiledirect>
   5.835 +            <classpath>
   5.836 +                <path path="${run.classpath}"/>
   5.837 +            </classpath>
   5.838 +        </nbprofiledirect>
   5.839 +        <profile classname="sun.applet.AppletViewer">
   5.840 +            <customize>
   5.841 +                <arg value="${applet.url}"/>
   5.842 +            </customize>
   5.843 +        </profile>
   5.844 +    </target>
   5.845 +    <!--
   5.846 +                =========================
   5.847 +                TESTS PROFILING  SECTION
   5.848 +                =========================
   5.849 +            -->
   5.850 +    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
   5.851 +        <nbprofiledirect>
   5.852 +            <classpath>
   5.853 +                <path path="${run.test.classpath}"/>
   5.854 +            </classpath>
   5.855 +        </nbprofiledirect>
   5.856 +        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
   5.857 +            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   5.858 +            <jvmarg value="${profiler.info.jvmargs.agent}"/>
   5.859 +            <jvmarg line="${profiler.info.jvmargs}"/>
   5.860 +            <test name="${profile.class}"/>
   5.861 +            <classpath>
   5.862 +                <path path="${run.test.classpath}"/>
   5.863 +            </classpath>
   5.864 +            <syspropertyset>
   5.865 +                <propertyref prefix="test-sys-prop."/>
   5.866 +                <mapper from="test-sys-prop.*" to="*" type="glob"/>
   5.867 +            </syspropertyset>
   5.868 +            <formatter type="brief" usefile="false"/>
   5.869 +            <formatter type="xml"/>
   5.870 +        </junit>
   5.871 +    </target>
   5.872 +    <!--
   5.873 +                ===============
   5.874 +                JAVADOC SECTION
   5.875 +                ===============
   5.876 +            -->
   5.877 +    <target depends="init" if="have.sources" name="-javadoc-build">
   5.878 +        <mkdir dir="${dist.javadoc.dir}"/>
   5.879 +        <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}">
   5.880 +            <classpath>
   5.881 +                <path path="${javac.classpath}"/>
   5.882 +            </classpath>
   5.883 +            <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
   5.884 +                <filename name="**/*.java"/>
   5.885 +            </fileset>
   5.886 +            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   5.887 +                <include name="**/*.java"/>
   5.888 +                <exclude name="*.java"/>
   5.889 +            </fileset>
   5.890 +        </javadoc>
   5.891 +        <copy todir="${dist.javadoc.dir}">
   5.892 +            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   5.893 +                <filename name="**/doc-files/**"/>
   5.894 +            </fileset>
   5.895 +            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   5.896 +                <include name="**/doc-files/**"/>
   5.897 +            </fileset>
   5.898 +        </copy>
   5.899 +    </target>
   5.900 +    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
   5.901 +        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
   5.902 +    </target>
   5.903 +    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
   5.904 +    <!--
   5.905 +                =========================
   5.906 +                JUNIT COMPILATION SECTION
   5.907 +                =========================
   5.908 +            -->
   5.909 +    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
   5.910 +        <mkdir dir="${build.test.classes.dir}"/>
   5.911 +    </target>
   5.912 +    <target name="-pre-compile-test">
   5.913 +        <!-- Empty placeholder for easier customization. -->
   5.914 +        <!-- You can override this target in the ../build.xml file. -->
   5.915 +    </target>
   5.916 +    <target if="do.depend.true" name="-compile-test-depend">
   5.917 +        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   5.918 +    </target>
   5.919 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
   5.920 +        <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}"/>
   5.921 +        <copy todir="${build.test.classes.dir}">
   5.922 +            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   5.923 +        </copy>
   5.924 +    </target>
   5.925 +    <target name="-post-compile-test">
   5.926 +        <!-- Empty placeholder for easier customization. -->
   5.927 +        <!-- You can override this target in the ../build.xml file. -->
   5.928 +    </target>
   5.929 +    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
   5.930 +    <target name="-pre-compile-test-single">
   5.931 +        <!-- Empty placeholder for easier customization. -->
   5.932 +        <!-- You can override this target in the ../build.xml file. -->
   5.933 +    </target>
   5.934 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   5.935 +        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   5.936 +        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
   5.937 +        <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}"/>
   5.938 +        <copy todir="${build.test.classes.dir}">
   5.939 +            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   5.940 +        </copy>
   5.941 +    </target>
   5.942 +    <target name="-post-compile-test-single">
   5.943 +        <!-- Empty placeholder for easier customization. -->
   5.944 +        <!-- You can override this target in the ../build.xml file. -->
   5.945 +    </target>
   5.946 +    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
   5.947 +    <!--
   5.948 +                =======================
   5.949 +                JUNIT EXECUTION SECTION
   5.950 +                =======================
   5.951 +            -->
   5.952 +    <target depends="init" if="have.tests" name="-pre-test-run">
   5.953 +        <mkdir dir="${build.test.results.dir}"/>
   5.954 +    </target>
   5.955 +    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
   5.956 +        <j2seproject3:junit testincludes="**/*Test.java"/>
   5.957 +    </target>
   5.958 +    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
   5.959 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
   5.960 +    </target>
   5.961 +    <target depends="init" if="have.tests" name="test-report"/>
   5.962 +    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
   5.963 +    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
   5.964 +    <target depends="init" if="have.tests" name="-pre-test-run-single">
   5.965 +        <mkdir dir="${build.test.results.dir}"/>
   5.966 +    </target>
   5.967 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
   5.968 +        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
   5.969 +        <j2seproject3:junit excludes="" includes="${test.includes}"/>
   5.970 +    </target>
   5.971 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
   5.972 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
   5.973 +    </target>
   5.974 +    <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"/>
   5.975 +    <!--
   5.976 +                =======================
   5.977 +                JUNIT DEBUGGING SECTION
   5.978 +                =======================
   5.979 +            -->
   5.980 +    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
   5.981 +        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
   5.982 +        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
   5.983 +        <delete file="${test.report.file}"/>
   5.984 +        <mkdir dir="${build.test.results.dir}"/>
   5.985 +        <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
   5.986 +            <customize>
   5.987 +                <syspropertyset>
   5.988 +                    <propertyref prefix="test-sys-prop."/>
   5.989 +                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
   5.990 +                </syspropertyset>
   5.991 +                <arg value="${test.class}"/>
   5.992 +                <arg value="showoutput=true"/>
   5.993 +                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
   5.994 +                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
   5.995 +            </customize>
   5.996 +        </j2seproject3:debug>
   5.997 +    </target>
   5.998 +    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
   5.999 +        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  5.1000 +    </target>
  5.1001 +    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  5.1002 +    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  5.1003 +        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  5.1004 +    </target>
  5.1005 +    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  5.1006 +    <!--
  5.1007 +                =========================
  5.1008 +                APPLET EXECUTION SECTION
  5.1009 +                =========================
  5.1010 +            -->
  5.1011 +    <target depends="init,compile-single" name="run-applet">
  5.1012 +        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  5.1013 +        <j2seproject1:java classname="sun.applet.AppletViewer">
  5.1014 +            <customize>
  5.1015 +                <arg value="${applet.url}"/>
  5.1016 +            </customize>
  5.1017 +        </j2seproject1:java>
  5.1018 +    </target>
  5.1019 +    <!--
  5.1020 +                =========================
  5.1021 +                APPLET DEBUGGING  SECTION
  5.1022 +                =========================
  5.1023 +            -->
  5.1024 +    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  5.1025 +        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  5.1026 +        <j2seproject3:debug classname="sun.applet.AppletViewer">
  5.1027 +            <customize>
  5.1028 +                <arg value="${applet.url}"/>
  5.1029 +            </customize>
  5.1030 +        </j2seproject3:debug>
  5.1031 +    </target>
  5.1032 +    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  5.1033 +    <!--
  5.1034 +                ===============
  5.1035 +                CLEANUP SECTION
  5.1036 +                ===============
  5.1037 +            -->
  5.1038 +    <target name="-deps-clean-init" unless="built-clean.properties">
  5.1039 +        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
  5.1040 +        <delete file="${built-clean.properties}" quiet="true"/>
  5.1041 +    </target>
  5.1042 +    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
  5.1043 +        <echo level="warn" message="Cycle detected: nbindex.web.api was already built"/>
  5.1044 +    </target>
  5.1045 +    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
  5.1046 +        <mkdir dir="${build.dir}"/>
  5.1047 +        <touch file="${built-clean.properties}" verbose="false"/>
  5.1048 +        <property file="${built-clean.properties}" prefix="already.built.clean."/>
  5.1049 +        <antcall target="-warn-already-built-clean"/>
  5.1050 +        <propertyfile file="${built-clean.properties}">
  5.1051 +            <entry key="${basedir}" value=""/>
  5.1052 +        </propertyfile>
  5.1053 +        <antcall target="-maybe-call-dep">
  5.1054 +            <param name="call.built.properties" value="${built-clean.properties}"/>
  5.1055 +            <param location="${project.base_web_api}" name="call.subproject"/>
  5.1056 +            <param location="${project.base_web_api}/build.xml" name="call.script"/>
  5.1057 +            <param name="call.target" value="clean"/>
  5.1058 +            <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
  5.1059 +        </antcall>
  5.1060 +    </target>
  5.1061 +    <target depends="init" name="-do-clean">
  5.1062 +        <delete dir="${build.dir}"/>
  5.1063 +        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  5.1064 +    </target>
  5.1065 +    <target name="-post-clean">
  5.1066 +        <!-- Empty placeholder for easier customization. -->
  5.1067 +        <!-- You can override this target in the ../build.xml file. -->
  5.1068 +    </target>
  5.1069 +    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  5.1070 +    <target name="-check-call-dep">
  5.1071 +        <property file="${call.built.properties}" prefix="already.built."/>
  5.1072 +        <condition property="should.call.dep">
  5.1073 +            <not>
  5.1074 +                <isset property="already.built.${call.subproject}"/>
  5.1075 +            </not>
  5.1076 +        </condition>
  5.1077 +    </target>
  5.1078 +    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
  5.1079 +        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
  5.1080 +            <propertyset>
  5.1081 +                <propertyref prefix="transfer."/>
  5.1082 +                <mapper from="transfer.*" to="*" type="glob"/>
  5.1083 +            </propertyset>
  5.1084 +        </ant>
  5.1085 +    </target>
  5.1086 +</project>
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/remoting/server/web/nbindex.web.api/nbproject/genfiles.properties	Mon Sep 12 19:28:00 2011 +0200
     6.3 @@ -0,0 +1,8 @@
     6.4 +build.xml.data.CRC32=a5bf9572
     6.5 +build.xml.script.CRC32=db0f33ed
     6.6 +build.xml.stylesheet.CRC32=28e38971@1.46.0.46
     6.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
     6.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
     6.9 +nbproject/build-impl.xml.data.CRC32=a5bf9572
    6.10 +nbproject/build-impl.xml.script.CRC32=b4235dd6
    6.11 +nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.46.0.46
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/remoting/server/web/nbindex.web.api/nbproject/project.properties	Mon Sep 12 19:28:00 2011 +0200
     7.3 @@ -0,0 +1,86 @@
     7.4 +annotation.processing.enabled=true
     7.5 +annotation.processing.enabled.in.editor=false
     7.6 +annotation.processing.processor.options=
     7.7 +annotation.processing.processors.list=
     7.8 +annotation.processing.run.all.processors=true
     7.9 +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
    7.10 +build.classes.dir=${build.dir}/classes
    7.11 +build.classes.excludes=**/*.java,**/*.form
    7.12 +# This directory is removed when the project is cleaned:
    7.13 +build.dir=build
    7.14 +build.generated.dir=${build.dir}/generated
    7.15 +build.generated.sources.dir=${build.dir}/generated-sources
    7.16 +# Only compile against the classpath explicitly listed here:
    7.17 +build.sysclasspath=ignore
    7.18 +build.test.classes.dir=${build.dir}/test/classes
    7.19 +build.test.results.dir=${build.dir}/test/results
    7.20 +# Uncomment to specify the preferred debugger connection transport:
    7.21 +#debug.transport=dt_socket
    7.22 +debug.classpath=\
    7.23 +    ${run.classpath}
    7.24 +debug.test.classpath=\
    7.25 +    ${run.test.classpath}
    7.26 +# This directory is removed when the project is cleaned:
    7.27 +dist.dir=dist
    7.28 +dist.jar=${dist.dir}/nbindex.web.api.jar
    7.29 +dist.javadoc.dir=${dist.dir}/javadoc
    7.30 +excludes=
    7.31 +file.reference.org-netbeans-modules-parsing-api.jar=../../../../server/lib/org-netbeans-modules-parsing-api.jar
    7.32 +file.reference.org-netbeans-modules-parsing-lucene.jar=../../../../server/lib/org-netbeans-modules-parsing-lucene.jar
    7.33 +file.reference.org-openide-filesystems.jar=../../../../server/lib/org-openide-filesystems.jar
    7.34 +file.reference.util-commons.jar=../../../ide/api/external/util-commons.jar
    7.35 +file.reference.util-pojson.jar=../../../ide/api/external/util-pojson.jar
    7.36 +includes=**
    7.37 +jar.compress=false
    7.38 +javac.classpath=\
    7.39 +    ${libs.jersey.classpath}:\
    7.40 +    ${libs.lucene.classpath}:\
    7.41 +    ${reference.base_web_api.jar}:\
    7.42 +    ${file.reference.org-netbeans-modules-parsing-api.jar}:\
    7.43 +    ${file.reference.org-openide-filesystems.jar}:\
    7.44 +    ${file.reference.org-netbeans-modules-parsing-lucene.jar}:\
    7.45 +    ${file.reference.util-commons.jar}:\
    7.46 +    ${file.reference.util-pojson.jar}
    7.47 +# Space-separated list of extra javac options
    7.48 +javac.compilerargs=
    7.49 +javac.deprecation=false
    7.50 +javac.processorpath=\
    7.51 +    ${javac.classpath}
    7.52 +javac.source=1.6
    7.53 +javac.target=1.6
    7.54 +javac.test.classpath=\
    7.55 +    ${javac.classpath}:\
    7.56 +    ${build.classes.dir}
    7.57 +javac.test.processorpath=\
    7.58 +    ${javac.test.classpath}
    7.59 +javadoc.additionalparam=
    7.60 +javadoc.author=false
    7.61 +javadoc.encoding=${source.encoding}
    7.62 +javadoc.noindex=false
    7.63 +javadoc.nonavbar=false
    7.64 +javadoc.notree=false
    7.65 +javadoc.private=false
    7.66 +javadoc.splitindex=true
    7.67 +javadoc.use=true
    7.68 +javadoc.version=false
    7.69 +javadoc.windowtitle=
    7.70 +main.class=
    7.71 +manifest.file=manifest.mf
    7.72 +meta.inf.dir=${src.dir}/META-INF
    7.73 +mkdist.disabled=false
    7.74 +platform.active=default_platform
    7.75 +project.base_web_api=../base.web.api
    7.76 +reference.base_web_api.jar=${project.base_web_api}/dist/base.web.api.jar
    7.77 +run.classpath=\
    7.78 +    ${javac.classpath}:\
    7.79 +    ${build.classes.dir}
    7.80 +# Space-separated list of JVM arguments used when running the project
    7.81 +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
    7.82 +# or test-sys-prop.name=value to set system properties for unit tests):
    7.83 +run.jvmargs=
    7.84 +run.test.classpath=\
    7.85 +    ${javac.test.classpath}:\
    7.86 +    ${build.test.classes.dir}
    7.87 +source.encoding=UTF-8
    7.88 +src.dir=src
    7.89 +test.src.dir=test
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/remoting/server/web/nbindex.web.api/nbproject/project.xml	Mon Sep 12 19:28:00 2011 +0200
     8.3 @@ -0,0 +1,28 @@
     8.4 +<?xml version="1.0" encoding="UTF-8"?>
     8.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
     8.6 +    <type>org.netbeans.modules.java.j2seproject</type>
     8.7 +    <configuration>
     8.8 +        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
     8.9 +            <name>nbindex.web.api</name>
    8.10 +            <source-roots>
    8.11 +                <root id="src.dir"/>
    8.12 +            </source-roots>
    8.13 +            <test-roots>
    8.14 +                <root id="test.src.dir"/>
    8.15 +            </test-roots>
    8.16 +        </data>
    8.17 +        <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
    8.18 +            <definitions>../../../../server/lib/nblibraries.properties</definitions>
    8.19 +        </libraries>
    8.20 +        <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
    8.21 +            <reference>
    8.22 +                <foreign-project>base_web_api</foreign-project>
    8.23 +                <artifact-type>jar</artifact-type>
    8.24 +                <script>build.xml</script>
    8.25 +                <target>jar</target>
    8.26 +                <clean-target>clean</clean-target>
    8.27 +                <id>jar</id>
    8.28 +            </reference>
    8.29 +        </references>
    8.30 +    </configuration>
    8.31 +</project>
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/remoting/server/web/nbindex.web.api/src/org/netbeans/modules/jackpot30/backend/usages/api/DownloadableIndex.java	Mon Sep 12 19:28:00 2011 +0200
     9.3 @@ -0,0 +1,84 @@
     9.4 +/*
     9.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     9.6 + *
     9.7 + * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
     9.8 + *
     9.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    9.10 + * Other names may be trademarks of their respective owners.
    9.11 + *
    9.12 + * The contents of this file are subject to the terms of either the GNU
    9.13 + * General Public License Version 2 only ("GPL") or the Common
    9.14 + * Development and Distribution License("CDDL") (collectively, the
    9.15 + * "License"). You may not use this file except in compliance with the
    9.16 + * License. You can obtain a copy of the License at
    9.17 + * http://www.netbeans.org/cddl-gplv2.html
    9.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    9.19 + * specific language governing permissions and limitations under the
    9.20 + * License.  When distributing the software, include this License Header
    9.21 + * Notice in each file and include the License file at
    9.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    9.23 + * particular file as subject to the "Classpath" exception as provided
    9.24 + * by Oracle in the GPL Version 2 section of the License file that
    9.25 + * accompanied this code. If applicable, add the following below the
    9.26 + * License Header, with the fields enclosed by brackets [] replaced by
    9.27 + * your own identifying information:
    9.28 + * "Portions Copyrighted [year] [name of copyright owner]"
    9.29 + *
    9.30 + * If you wish your version of this file to be governed by only the CDDL
    9.31 + * or only the GPL Version 2, indicate your decision by adding
    9.32 + * "[Contributor] elects to include this software in this distribution
    9.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
    9.34 + * single choice of license, a recipient has the option to distribute
    9.35 + * your version of this file under either the CDDL, the GPL Version 2 or
    9.36 + * to extend the choice of license to its licensees as provided above.
    9.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
    9.38 + * Version 2 license, then the option applies only if the new code is
    9.39 + * made subject to such option by the copyright holder.
    9.40 + *
    9.41 + * Contributor(s):
    9.42 + *
    9.43 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
    9.44 + */
    9.45 +package org.netbeans.modules.jackpot30.backend.usages.api;
    9.46 +
    9.47 +import java.io.*;
    9.48 +import javax.ws.rs.*;
    9.49 +import javax.ws.rs.core.Response;
    9.50 +import javax.ws.rs.core.StreamingOutput;
    9.51 +import org.netbeans.modules.jackpot30.backend.base.CategoryStorage;
    9.52 +
    9.53 +/**
    9.54 + *
    9.55 + * @author lahvac
    9.56 + */
    9.57 +@Path("/index/downloadable")
    9.58 +public class DownloadableIndex {
    9.59 +
    9.60 +    @GET
    9.61 +    @Path("/netbeans")
    9.62 +    @Produces("application/octet-stream")
    9.63 +    public Response netbeans(@QueryParam("path") String segment, @QueryParam("root") String root) throws IOException, InterruptedException {
    9.64 +        CategoryStorage category = CategoryStorage.forId(segment);
    9.65 +        final File idx = category.getSegment(root);
    9.66 +
    9.67 +        if (idx == null) return Response.status(Response.Status.NOT_FOUND).build();
    9.68 +        
    9.69 +        return Response.ok().entity(new StreamingOutput() {
    9.70 +            @Override public void write(OutputStream output) throws IOException, WebApplicationException {
    9.71 +                InputStream in = new FileInputStream(idx);
    9.72 +                byte[] read = new byte[8 * 1024];
    9.73 +
    9.74 +                while (true) {
    9.75 +                    int n = in.read(read);
    9.76 +
    9.77 +                    if (n == (-1)) break;
    9.78 +
    9.79 +                    output.write(read, 0, n);
    9.80 +                }
    9.81 +
    9.82 +                in.close(); //TODO: finally
    9.83 +            }
    9.84 +        } ).build();
    9.85 +    }
    9.86 +
    9.87 +}
    10.1 --- a/remoting/server/web/web.main/nbproject/build-impl.xml	Fri Sep 02 21:55:07 2011 +0200
    10.2 +++ b/remoting/server/web/web.main/nbproject/build-impl.xml	Mon Sep 12 19:28:00 2011 +0200
    10.3 @@ -612,6 +612,13 @@
    10.4          </antcall>
    10.5          <antcall target="-maybe-call-dep">
    10.6              <param name="call.built.properties" value="${built-jar.properties}"/>
    10.7 +            <param location="${project.nbindex_web_api}" name="call.subproject"/>
    10.8 +            <param location="${project.nbindex_web_api}/build.xml" name="call.script"/>
    10.9 +            <param name="call.target" value="jar"/>
   10.10 +            <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
   10.11 +        </antcall>
   10.12 +        <antcall target="-maybe-call-dep">
   10.13 +            <param name="call.built.properties" value="${built-jar.properties}"/>
   10.14              <param location="${project.source_web_api}" name="call.subproject"/>
   10.15              <param location="${project.source_web_api}/build.xml" name="call.script"/>
   10.16              <param name="call.target" value="jar"/>
   10.17 @@ -1077,6 +1084,13 @@
   10.18          </antcall>
   10.19          <antcall target="-maybe-call-dep">
   10.20              <param name="call.built.properties" value="${built-clean.properties}"/>
   10.21 +            <param location="${project.nbindex_web_api}" name="call.subproject"/>
   10.22 +            <param location="${project.nbindex_web_api}/build.xml" name="call.script"/>
   10.23 +            <param name="call.target" value="clean"/>
   10.24 +            <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
   10.25 +        </antcall>
   10.26 +        <antcall target="-maybe-call-dep">
   10.27 +            <param name="call.built.properties" value="${built-clean.properties}"/>
   10.28              <param location="${project.source_web_api}" name="call.subproject"/>
   10.29              <param location="${project.source_web_api}/build.xml" name="call.script"/>
   10.30              <param name="call.target" value="clean"/>
    11.1 --- a/remoting/server/web/web.main/nbproject/genfiles.properties	Fri Sep 02 21:55:07 2011 +0200
    11.2 +++ b/remoting/server/web/web.main/nbproject/genfiles.properties	Mon Sep 12 19:28:00 2011 +0200
    11.3 @@ -1,8 +1,8 @@
    11.4 -build.xml.data.CRC32=770a9613
    11.5 +build.xml.data.CRC32=f536def6
    11.6  build.xml.script.CRC32=5ddf268c
    11.7 -build.xml.stylesheet.CRC32=28e38971@1.45.0.45
    11.8 +build.xml.stylesheet.CRC32=28e38971@1.46.0.46
    11.9  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   11.10  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   11.11 -nbproject/build-impl.xml.data.CRC32=770a9613
   11.12 -nbproject/build-impl.xml.script.CRC32=ad157b46
   11.13 +nbproject/build-impl.xml.data.CRC32=f536def6
   11.14 +nbproject/build-impl.xml.script.CRC32=8d827783
   11.15  nbproject/build-impl.xml.stylesheet.CRC32=c12040a1@1.46.0.46
    12.1 --- a/remoting/server/web/web.main/nbproject/project.properties	Fri Sep 02 21:55:07 2011 +0200
    12.2 +++ b/remoting/server/web/web.main/nbproject/project.properties	Mon Sep 12 19:28:00 2011 +0200
    12.3 @@ -68,7 +68,8 @@
    12.4      ${file.reference.util-commons.jar}:\
    12.5      ${file.reference.util-pojson.jar}:\
    12.6      ${reference.source_web_api.jar}:\
    12.7 -    ${reference.usages_web_api.jar}
    12.8 +    ${reference.usages_web_api.jar}:\
    12.9 +    ${reference.nbindex_web_api.jar}
   12.10  # Space-separated list of extra javac options
   12.11  javac.compilerargs=
   12.12  javac.deprecation=false
   12.13 @@ -99,10 +100,12 @@
   12.14  mkdist.disabled=false
   12.15  platform.active=default_platform
   12.16  project.base_web_api=../base.web.api
   12.17 +project.nbindex_web_api=../nbindex.web.api
   12.18  project.source_web_api=../source.web.api
   12.19  project.type_web_api=../type.web.api
   12.20  project.usages_web_api=../usages.web.api
   12.21  reference.base_web_api.jar=${project.base_web_api}/dist/base.web.api.jar
   12.22 +reference.nbindex_web_api.jar=${project.nbindex_web_api}/dist/nbindex.web.api.jar
   12.23  reference.source_web_api.jar=${project.source_web_api}/dist/source.web.api.jar
   12.24  reference.type_web_api.jar=${project.type_web_api}/dist/type.web.api.jar
   12.25  reference.usages_web_api.jar=${project.usages_web_api}/dist/usages.web.api.jar
    13.1 --- a/remoting/server/web/web.main/nbproject/project.xml	Fri Sep 02 21:55:07 2011 +0200
    13.2 +++ b/remoting/server/web/web.main/nbproject/project.xml	Mon Sep 12 19:28:00 2011 +0200
    13.3 @@ -24,6 +24,14 @@
    13.4                  <id>jar</id>
    13.5              </reference>
    13.6              <reference>
    13.7 +                <foreign-project>nbindex_web_api</foreign-project>
    13.8 +                <artifact-type>jar</artifact-type>
    13.9 +                <script>build.xml</script>
   13.10 +                <target>jar</target>
   13.11 +                <clean-target>clean</clean-target>
   13.12 +                <id>jar</id>
   13.13 +            </reference>
   13.14 +            <reference>
   13.15                  <foreign-project>source_web_api</foreign-project>
   13.16                  <artifact-type>jar</artifact-type>
   13.17                  <script>build.xml</script>