OSDN Git Service

Merge branch 'master' into dev20110528_setting_reduce
[coroid/inqubus.git] / frontend / nbproject / build-impl.xml
index bf0b0c4..67567dc 100644 (file)
@@ -55,6 +55,14 @@ is divided into following sections:
     </target>\r
     <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">\r
         <available file="${manifest.file}" property="manifest.available"/>\r
+        <condition property="splashscreen.available">\r
+            <and>\r
+                <not>\r
+                    <equals arg1="${application.splash}" arg2="" trim="true"/>\r
+                </not>\r
+                <available file="${application.splash}"/>\r
+            </and>\r
+        </condition>\r
         <condition property="main.class.available">\r
             <and>\r
                 <isset property="main.class"/>\r
@@ -69,8 +77,14 @@ is divided into following sections:
                 <isset property="main.class.available"/>\r
             </and>\r
         </condition>\r
+        <condition property="do.archive">\r
+            <not>\r
+                <istrue value="${jar.archive.disabled}"/>\r
+            </not>\r
+        </condition>\r
         <condition property="do.mkdist">\r
             <and>\r
+                <isset property="do.archive"/>\r
                 <isset property="libs.CopyLibs.classpath"/>\r
                 <not>\r
                     <istrue value="${mkdist.disabled}"/>\r
@@ -83,10 +97,28 @@ is divided into following sections:
                 <isset property="do.mkdist"/>\r
             </and>\r
         </condition>\r
-        <condition property="manifest.available+mkdist.available">\r
+        <condition property="do.archive+manifest.available">\r
             <and>\r
-                <istrue value="${manifest.available}"/>\r
-                <isset property="do.mkdist"/>\r
+                <isset property="manifest.available"/>\r
+                <istrue value="${do.archive}"/>\r
+            </and>\r
+        </condition>\r
+        <condition property="do.archive+main.class.available">\r
+            <and>\r
+                <isset property="main.class.available"/>\r
+                <istrue value="${do.archive}"/>\r
+            </and>\r
+        </condition>\r
+        <condition property="do.archive+splashscreen.available">\r
+            <and>\r
+                <isset property="splashscreen.available"/>\r
+                <istrue value="${do.archive}"/>\r
+            </and>\r
+        </condition>\r
+        <condition property="do.archive+manifest.available+main.class">\r
+            <and>\r
+                <istrue value="${manifest.available+main.class}"/>\r
+                <istrue value="${do.archive}"/>\r
             </and>\r
         </condition>\r
         <condition property="manifest.available-mkdist.available">\r
@@ -155,6 +187,18 @@ is divided into following sections:
         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">\r
             <length length="0" string="${endorsed.classpath}" when="greater"/>\r
         </condition>\r
+        <condition else="false" property="jdkBug6558476">\r
+            <and>\r
+                <matches pattern="1\.[56]" string="${java.specification.version}"/>\r
+                <not>\r
+                    <os family="unix"/>\r
+                </not>\r
+            </and>\r
+        </condition>\r
+        <property name="javac.fork" value="${jdkBug6558476}"/>\r
+        <property name="jar.index" value="false"/>\r
+        <property name="jar.index.metainf" value="${jar.index}"/>\r
+        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>\r
     </target>\r
     <target name="-post-init">\r
         <!-- Empty placeholder for easier customization. -->\r
@@ -181,11 +225,53 @@ is divided into following sections:
             </sequential>\r
         </macrodef>\r
     </target>\r
-    <target name="-init-macrodef-javac">\r
+    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">\r
+        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">\r
+            <attribute default="${src.dir}" name="srcdir"/>\r
+            <attribute default="${build.classes.dir}" name="destdir"/>\r
+            <attribute default="${javac.classpath}" name="classpath"/>\r
+            <attribute default="${javac.processorpath}" name="processorpath"/>\r
+            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>\r
+            <attribute default="${includes}" name="includes"/>\r
+            <attribute default="${excludes}" name="excludes"/>\r
+            <attribute default="${javac.debug}" name="debug"/>\r
+            <attribute default="${empty.dir}" name="sourcepath"/>\r
+            <attribute default="${empty.dir}" name="gensrcdir"/>\r
+            <element name="customize" optional="true"/>\r
+            <sequential>\r
+                <property location="${build.dir}/empty" name="empty.dir"/>\r
+                <mkdir dir="${empty.dir}"/>\r
+                <mkdir dir="@{apgeneratedsrcdir}"/>\r
+                <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}">\r
+                    <src>\r
+                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">\r
+                            <include name="*"/>\r
+                        </dirset>\r
+                    </src>\r
+                    <classpath>\r
+                        <path path="@{classpath}"/>\r
+                    </classpath>\r
+                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+                    <compilerarg line="${javac.compilerargs}"/>\r
+                    <compilerarg value="-processorpath"/>\r
+                    <compilerarg path="@{processorpath}:${empty.dir}"/>\r
+                    <compilerarg line="${ap.processors.internal}"/>\r
+                    <compilerarg line="${annotation.processing.processor.options}"/>\r
+                    <compilerarg value="-s"/>\r
+                    <compilerarg path="@{apgeneratedsrcdir}"/>\r
+                    <compilerarg line="${ap.proc.none.internal}"/>\r
+                    <customize/>\r
+                </javac>\r
+            </sequential>\r
+        </macrodef>\r
+    </target>\r
+    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">\r
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">\r
             <attribute default="${src.dir}" name="srcdir"/>\r
             <attribute default="${build.classes.dir}" name="destdir"/>\r
             <attribute default="${javac.classpath}" name="classpath"/>\r
+            <attribute default="${javac.processorpath}" name="processorpath"/>\r
+            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>\r
             <attribute default="${includes}" name="includes"/>\r
             <attribute default="${excludes}" name="excludes"/>\r
             <attribute default="${javac.debug}" name="debug"/>\r
@@ -195,7 +281,7 @@ is divided into following sections:
             <sequential>\r
                 <property location="${build.dir}/empty" name="empty.dir"/>\r
                 <mkdir dir="${empty.dir}"/>\r
-                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">\r
+                <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}">\r
                     <src>\r
                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">\r
                             <include name="*"/>\r
@@ -210,6 +296,8 @@ is divided into following sections:
                 </javac>\r
             </sequential>\r
         </macrodef>\r
+    </target>\r
+    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">\r
         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">\r
             <attribute default="${src.dir}" name="srcdir"/>\r
             <attribute default="${build.classes.dir}" name="destdir"/>\r
@@ -226,14 +314,19 @@ is divided into following sections:
             <attribute default="${build.classes.dir}" name="destdir"/>\r
             <sequential>\r
                 <fail unless="javac.includes">Must set javac.includes</fail>\r
-                <pathconvert pathsep="," property="javac.includes.binary">\r
+                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">\r
                     <path>\r
                         <filelist dir="@{destdir}" files="${javac.includes}"/>\r
                     </path>\r
                     <globmapper from="*.java" to="*.class"/>\r
                 </pathconvert>\r
+                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>\r
+                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>\r
+                <delete>\r
+                    <files includesfile="${javac.includesfile.binary}"/>\r
+                </delete>\r
                 <delete>\r
-                    <files includes="${javac.includes.binary}"/>\r
+                    <fileset file="${javac.includesfile.binary}"/>\r
                 </delete>\r
             </sequential>\r
         </macrodef>\r
@@ -244,7 +337,8 @@ is divided into following sections:
             <attribute default="${excludes}" name="excludes"/>\r
             <attribute default="**" name="testincludes"/>\r
             <sequential>\r
-                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">\r
+                <property name="junit.forkmode" value="perTest"/>\r
+                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">\r
                     <batchtest todir="${build.test.results.dir}">\r
                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">\r
                             <filename name="@{testincludes}"/>\r
@@ -260,11 +354,56 @@ is divided into following sections:
                     <formatter type="brief" usefile="false"/>\r
                     <formatter type="xml"/>\r
                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+                    <jvmarg value="-ea"/>\r
                     <jvmarg line="${run.jvmargs}"/>\r
                 </junit>\r
             </sequential>\r
         </macrodef>\r
     </target>\r
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>\r
+    <target name="-profile-pre-init">\r
+        <!-- Empty placeholder for easier customization. -->\r
+        <!-- You can override this target in the ../build.xml file. -->\r
+    </target>\r
+    <target name="-profile-post-init">\r
+        <!-- Empty placeholder for easier customization. -->\r
+        <!-- You can override this target in the ../build.xml file. -->\r
+    </target>\r
+    <target name="-profile-init-macrodef-profile">\r
+        <macrodef name="resolve">\r
+            <attribute name="name"/>\r
+            <attribute name="value"/>\r
+            <sequential>\r
+                <property name="@{name}" value="${env.@{value}}"/>\r
+            </sequential>\r
+        </macrodef>\r
+        <macrodef name="profile">\r
+            <attribute default="${main.class}" name="classname"/>\r
+            <element name="customize" optional="true"/>\r
+            <sequential>\r
+                <property environment="env"/>\r
+                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>\r
+                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">\r
+                    <jvmarg value="${profiler.info.jvmargs.agent}"/>\r
+                    <jvmarg line="${profiler.info.jvmargs}"/>\r
+                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>\r
+                    <arg line="${application.args}"/>\r
+                    <classpath>\r
+                        <path path="${run.classpath}"/>\r
+                    </classpath>\r
+                    <syspropertyset>\r
+                        <propertyref prefix="run-sys-prop."/>\r
+                        <mapper from="run-sys-prop.*" to="*" type="glob"/>\r
+                    </syspropertyset>\r
+                    <customize/>\r
+                </java>\r
+            </sequential>\r
+        </macrodef>\r
+    </target>\r
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">\r
+        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>\r
+        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>\r
+    </target>\r
     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">\r
         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">\r
             <attribute default="${main.class}" name="name"/>\r
@@ -357,14 +496,66 @@ is divided into following sections:
             </sequential>\r
         </macrodef>\r
     </target>\r
+    <target name="-init-macrodef-copylibs">\r
+        <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">\r
+            <attribute default="${manifest.file}" name="manifest"/>\r
+            <element name="customize" optional="true"/>\r
+            <sequential>\r
+                <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
+                <pathconvert property="run.classpath.without.build.classes.dir">\r
+                    <path path="${run.classpath}"/>\r
+                    <map from="${build.classes.dir.resolved}" to=""/>\r
+                </pathconvert>\r
+                <pathconvert pathsep=" " property="jar.classpath">\r
+                    <path path="${run.classpath.without.build.classes.dir}"/>\r
+                    <chainedmapper>\r
+                        <flattenmapper/>\r
+                        <globmapper from="*" to="lib/*"/>\r
+                    </chainedmapper>\r
+                </pathconvert>\r
+                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>\r
+                <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">\r
+                    <fileset dir="${build.classes.dir}"/>\r
+                    <manifest>\r
+                        <attribute name="Class-Path" value="${jar.classpath}"/>\r
+                        <customize/>\r
+                    </manifest>\r
+                </copylibs>\r
+            </sequential>\r
+        </macrodef>\r
+    </target>\r
     <target name="-init-presetdef-jar">\r
         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">\r
-            <jar compress="${jar.compress}" jarfile="${dist.jar}">\r
+            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">\r
                 <j2seproject1:fileset dir="${build.classes.dir}"/>\r
             </jar>\r
         </presetdef>\r
     </target>\r
-    <target depends="-pre-init,-init-private,-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" name="init"/>\r
+    <target name="-init-ap-cmdline-properties">\r
+        <property name="annotation.processing.enabled" value="true"/>\r
+        <property name="annotation.processing.processors.list" value=""/>\r
+        <property name="annotation.processing.processor.options" value=""/>\r
+        <property name="annotation.processing.run.all.processors" value="true"/>\r
+        <property name="javac.processorpath" value="${javac.classpath}"/>\r
+        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>\r
+        <condition property="ap.supported.internal" value="true">\r
+            <not>\r
+                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>\r
+            </not>\r
+        </condition>\r
+    </target>\r
+    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">\r
+        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">\r
+            <isfalse value="${annotation.processing.run.all.processors}"/>\r
+        </condition>\r
+        <condition else="" property="ap.proc.none.internal" value="-proc:none">\r
+            <isfalse value="${annotation.processing.enabled}"/>\r
+        </condition>\r
+    </target>\r
+    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">\r
+        <property name="ap.cmd.line.internal" value=""/>\r
+    </target>\r
+    <target depends="-pre-init,-init-private,-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"/>\r
     <!--\r
                 ===================\r
                 COMPILATION SECTION\r
@@ -374,20 +565,26 @@ is divided into following sections:
         <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>\r
         <delete file="${built-jar.properties}" quiet="true"/>\r
     </target>\r
+    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">\r
+        <echo level="warn" message="Cycle detected: Saccubus was already built"/>\r
+    </target>\r
     <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">\r
         <mkdir dir="${build.dir}"/>\r
         <touch file="${built-jar.properties}" verbose="false"/>\r
         <property file="${built-jar.properties}" prefix="already.built.jar."/>\r
-        <fail message="Cycle detected: Saccubus was already built">\r
-            <condition>\r
-                <isset property="already.built.jar.${basedir}"/>\r
-            </condition>\r
-        </fail>\r
+        <antcall target="-warn-already-built-jar"/>\r
         <propertyfile file="${built-jar.properties}">\r
             <entry key="${basedir}" value=""/>\r
         </propertyfile>\r
         <antcall target="-maybe-call-dep">\r
             <param name="call.built.properties" value="${built-jar.properties}"/>\r
+            <param location="${project.MediaInfoWrapper}" name="call.subproject"/>\r
+            <param location="${project.MediaInfoWrapper}/build.xml" name="call.script"/>\r
+            <param name="call.target" value="jar"/>\r
+            <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>\r
+        </antcall>\r
+        <antcall target="-maybe-call-dep">\r
+            <param name="call.built.properties" value="${built-jar.properties}"/>\r
             <param location="${project.NicoBrowser}" name="call.subproject"/>\r
             <param location="${project.NicoBrowser}/build.xml" name="call.script"/>\r
             <param name="call.target" value="jar"/>\r
@@ -416,12 +613,18 @@ is divided into following sections:
         </pathconvert>\r
         <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>\r
     </target>\r
-    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">\r
+    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">\r
         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>\r
         <copy todir="${build.classes.dir}">\r
             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
         </copy>\r
     </target>\r
+    <target if="has.persistence.xml" name="-copy-persistence-xml">\r
+        <mkdir dir="${build.classes.dir}/META-INF"/>\r
+        <copy todir="${build.classes.dir}/META-INF">\r
+            <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>\r
+        </copy>\r
+    </target>\r
     <target name="-post-compile">\r
         <!-- Empty placeholder for easier customization. -->\r
         <!-- You can override this target in the ../build.xml file. -->\r
@@ -454,99 +657,65 @@ is divided into following sections:
         <!-- Empty placeholder for easier customization. -->\r
         <!-- You can override this target in the ../build.xml file. -->\r
     </target>\r
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">\r
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">\r
         <j2seproject1:jar/>\r
     </target>\r
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">\r
+    <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">\r
         <j2seproject1:jar manifest="${manifest.file}"/>\r
     </target>\r
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">\r
+    <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">\r
         <j2seproject1:jar manifest="${manifest.file}">\r
             <j2seproject1:manifest>\r
                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>\r
             </j2seproject1:manifest>\r
         </j2seproject1:jar>\r
-        <echo>To run this application from the command line without Ant, try:</echo>\r
+        <echo level="info">To run this application from the command line without Ant, try:</echo>\r
         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
         <property location="${dist.jar}" name="dist.jar.resolved"/>\r
         <pathconvert property="run.classpath.with.dist.jar">\r
             <path path="${run.classpath}"/>\r
             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>\r
         </pathconvert>\r
-        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>\r
-    </target>\r
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">\r
-        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
-        <pathconvert property="run.classpath.without.build.classes.dir">\r
-            <path path="${run.classpath}"/>\r
-            <map from="${build.classes.dir.resolved}" to=""/>\r
-        </pathconvert>\r
-        <pathconvert pathsep=" " property="jar.classpath">\r
-            <path path="${run.classpath.without.build.classes.dir}"/>\r
-            <chainedmapper>\r
-                <flattenmapper/>\r
-                <globmapper from="*" to="lib/*"/>\r
-            </chainedmapper>\r
-        </pathconvert>\r
-        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>\r
-        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">\r
-            <fileset dir="${build.classes.dir}"/>\r
-            <manifest>\r
-                <attribute name="Main-Class" value="${main.class}"/>\r
-                <attribute name="Class-Path" value="${jar.classpath}"/>\r
-            </manifest>\r
-        </copylibs>\r
-        <echo>To run this application from the command line without Ant, try:</echo>\r
+        <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>\r
+    </target>\r
+    <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">\r
+        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>\r
+        <touch file="${tmp.manifest.file}" verbose="false"/>\r
+    </target>\r
+    <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">\r
+        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>\r
+        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>\r
+    </target>\r
+    <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">\r
+        <manifest file="${tmp.manifest.file}" mode="update">\r
+            <attribute name="Main-Class" value="${main.class}"/>\r
+        </manifest>\r
+    </target>\r
+    <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">\r
+        <basename file="${application.splash}" property="splashscreen.basename"/>\r
+        <mkdir dir="${build.classes.dir}/META-INF"/>\r
+        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>\r
+        <manifest file="${tmp.manifest.file}" mode="update">\r
+            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>\r
+        </manifest>\r
+    </target>\r
+    <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">\r
+        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>\r
+        <echo level="info">To run this application from the command line without Ant, try:</echo>\r
         <property location="${dist.jar}" name="dist.jar.resolved"/>\r
-        <echo>java -jar "${dist.jar.resolved}"</echo>\r
+        <echo level="info">java -jar "${dist.jar.resolved}"</echo>\r
     </target>\r
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">\r
-        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
-        <pathconvert property="run.classpath.without.build.classes.dir">\r
-            <path path="${run.classpath}"/>\r
-            <map from="${build.classes.dir.resolved}" to=""/>\r
-        </pathconvert>\r
-        <pathconvert pathsep=" " property="jar.classpath">\r
-            <path path="${run.classpath.without.build.classes.dir}"/>\r
-            <chainedmapper>\r
-                <flattenmapper/>\r
-                <globmapper from="*" to="lib/*"/>\r
-            </chainedmapper>\r
-        </pathconvert>\r
-        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>\r
-        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">\r
-            <fileset dir="${build.classes.dir}"/>\r
-            <manifest>\r
-                <attribute name="Class-Path" value="${jar.classpath}"/>\r
-            </manifest>\r
-        </copylibs>\r
-    </target>\r
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">\r
-        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
-        <pathconvert property="run.classpath.without.build.classes.dir">\r
-            <path path="${run.classpath}"/>\r
-            <map from="${build.classes.dir.resolved}" to=""/>\r
-        </pathconvert>\r
-        <pathconvert pathsep=" " property="jar.classpath">\r
-            <path path="${run.classpath.without.build.classes.dir}"/>\r
-            <chainedmapper>\r
-                <flattenmapper/>\r
-                <globmapper from="*" to="lib/*"/>\r
-            </chainedmapper>\r
-        </pathconvert>\r
-        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>\r
-        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">\r
-            <fileset dir="${build.classes.dir}"/>\r
-            <manifest>\r
-                <attribute name="Class-Path" value="${jar.classpath}"/>\r
-            </manifest>\r
-        </copylibs>\r
+    <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">\r
+        <delete>\r
+            <fileset file="${tmp.manifest.file}"/>\r
+        </delete>\r
     </target>\r
+    <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"/>\r
     <target name="-post-jar">\r
         <!-- Empty placeholder for easier customization. -->\r
         <!-- You can override this target in the ../build.xml file. -->\r
     </target>\r
-    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>\r
+    <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"/>\r
     <!--\r
                 =================\r
                 EXECUTION SECTION\r
@@ -562,11 +731,11 @@ is divided into following sections:
     <target name="-do-not-recompile">\r
         <property name="javac.includes.binary" value=""/>\r
     </target>\r
-    <target depends="init,-do-not-recompile,compile-single" name="run-single">\r
+    <target depends="init,compile-single" name="run-single">\r
         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
         <j2seproject1:java classname="${run.class}"/>\r
     </target>\r
-    <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">\r
+    <target depends="init,compile-test-single" name="run-test-with-main">\r
         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
         <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>\r
     </target>\r
@@ -597,12 +766,12 @@ is divided into following sections:
         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>\r
         <j2seproject3:debug classname="${debug.class}"/>\r
     </target>\r
-    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>\r
+    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>\r
     <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">\r
         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>\r
         <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>\r
     </target>\r
-    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>\r
+    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>\r
     <target depends="init" name="-pre-debug-fix">\r
         <fail unless="fix.includes">Must set fix.includes</fail>\r
         <property name="javac.includes" value="${fix.includes}.java"/>\r
@@ -612,11 +781,77 @@ is divided into following sections:
     </target>\r
     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>\r
     <!--\r
+                =================\r
+                PROFILING SECTION\r
+                =================\r
+            -->\r
+    <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">\r
+        <nbprofiledirect>\r
+            <classpath>\r
+                <path path="${run.classpath}"/>\r
+            </classpath>\r
+        </nbprofiledirect>\r
+        <profile/>\r
+    </target>\r
+    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">\r
+        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>\r
+        <nbprofiledirect>\r
+            <classpath>\r
+                <path path="${run.classpath}"/>\r
+            </classpath>\r
+        </nbprofiledirect>\r
+        <profile classname="${profile.class}"/>\r
+    </target>\r
+    <!--\r
+                =========================\r
+                APPLET PROFILING  SECTION\r
+                =========================\r
+            -->\r
+    <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">\r
+        <nbprofiledirect>\r
+            <classpath>\r
+                <path path="${run.classpath}"/>\r
+            </classpath>\r
+        </nbprofiledirect>\r
+        <profile classname="sun.applet.AppletViewer">\r
+            <customize>\r
+                <arg value="${applet.url}"/>\r
+            </customize>\r
+        </profile>\r
+    </target>\r
+    <!--\r
+                =========================\r
+                TESTS PROFILING  SECTION\r
+                =========================\r
+            -->\r
+    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">\r
+        <nbprofiledirect>\r
+            <classpath>\r
+                <path path="${run.test.classpath}"/>\r
+            </classpath>\r
+        </nbprofiledirect>\r
+        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">\r
+            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>\r
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>\r
+            <jvmarg line="${profiler.info.jvmargs}"/>\r
+            <test name="${profile.class}"/>\r
+            <classpath>\r
+                <path path="${run.test.classpath}"/>\r
+            </classpath>\r
+            <syspropertyset>\r
+                <propertyref prefix="test-sys-prop."/>\r
+                <mapper from="test-sys-prop.*" to="*" type="glob"/>\r
+            </syspropertyset>\r
+            <formatter type="brief" usefile="false"/>\r
+            <formatter type="xml"/>\r
+        </junit>\r
+    </target>\r
+    <!--\r
                 ===============\r
                 JAVADOC SECTION\r
                 ===============\r
             -->\r
-    <target depends="init" name="-javadoc-build">\r
+    <target depends="init" if="have.sources" name="-javadoc-build">\r
         <mkdir dir="${dist.javadoc.dir}"/>\r
         <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}">\r
             <classpath>\r
@@ -629,6 +864,14 @@ is divided into following sections:
                 <include name="**/*.java"/>\r
             </fileset>\r
         </javadoc>\r
+        <copy todir="${dist.javadoc.dir}">\r
+            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">\r
+                <filename name="**/doc-files/**"/>\r
+            </fileset>\r
+            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
+                <include name="**/doc-files/**"/>\r
+            </fileset>\r
+        </copy>\r
     </target>\r
     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">\r
         <nbbrowse file="${dist.javadoc.dir}/index.html"/>\r
@@ -649,8 +892,8 @@ is divided into following sections:
     <target if="do.depend.true" name="-compile-test-depend">\r
         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>\r
     </target>\r
-    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">\r
-        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>\r
+    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">\r
+        <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}"/>\r
         <copy todir="${build.test.classes.dir}">\r
             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
         </copy>\r
@@ -664,10 +907,10 @@ is divided into following sections:
         <!-- Empty placeholder for easier customization. -->\r
         <!-- You can override this target in the ../build.xml file. -->\r
     </target>\r
-    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">\r
+    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">\r
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>\r
         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>\r
-        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>\r
+        <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}"/>\r
         <copy todir="${build.test.classes.dir}">\r
             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
         </copy>\r
@@ -704,7 +947,7 @@ is divided into following sections:
     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">\r
         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>\r
     </target>\r
-    <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>\r
+    <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"/>\r
     <!--\r
                 =======================\r
                 JUNIT DEBUGGING SECTION\r
@@ -731,7 +974,7 @@ is divided into following sections:
     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">\r
         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>\r
     </target>\r
-    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>\r
+    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>\r
     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">\r
         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>\r
     </target>\r
@@ -772,20 +1015,26 @@ is divided into following sections:
         <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>\r
         <delete file="${built-clean.properties}" quiet="true"/>\r
     </target>\r
+    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">\r
+        <echo level="warn" message="Cycle detected: Saccubus was already built"/>\r
+    </target>\r
     <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">\r
         <mkdir dir="${build.dir}"/>\r
         <touch file="${built-clean.properties}" verbose="false"/>\r
         <property file="${built-clean.properties}" prefix="already.built.clean."/>\r
-        <fail message="Cycle detected: Saccubus was already built">\r
-            <condition>\r
-                <isset property="already.built.clean.${basedir}"/>\r
-            </condition>\r
-        </fail>\r
+        <antcall target="-warn-already-built-clean"/>\r
         <propertyfile file="${built-clean.properties}">\r
             <entry key="${basedir}" value=""/>\r
         </propertyfile>\r
         <antcall target="-maybe-call-dep">\r
             <param name="call.built.properties" value="${built-clean.properties}"/>\r
+            <param location="${project.MediaInfoWrapper}" name="call.subproject"/>\r
+            <param location="${project.MediaInfoWrapper}/build.xml" name="call.script"/>\r
+            <param name="call.target" value="clean"/>\r
+            <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>\r
+        </antcall>\r
+        <antcall target="-maybe-call-dep">\r
+            <param name="call.built.properties" value="${built-clean.properties}"/>\r
             <param location="${project.NicoBrowser}" name="call.subproject"/>\r
             <param location="${project.NicoBrowser}/build.xml" name="call.script"/>\r
             <param name="call.target" value="clean"/>\r
@@ -794,7 +1043,7 @@ is divided into following sections:
     </target>\r
     <target depends="init" name="-do-clean">\r
         <delete dir="${build.dir}"/>\r
-        <delete dir="${dist.dir}"/>\r
+        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>\r
     </target>\r
     <target name="-post-clean">\r
         <!-- Empty placeholder for easier customization. -->\r