<target name="build-zip" depends="build,build-launchers" description="Builds a ZIP distribution of the suite, launchers, and selected modules from the platform.">
<mkdir dir="${dist.dir}"/> <!-- pathfileset does not support 'prefix' and 'filemode' parameters,
we have to copy them to temp location -->
<tempfile property="temp.dir.nbexec" destdir="${suite.build.dir}" deleteonexit="true" prefix="nbexec"/>
<tempfile property="temp.dir.rest" destdir="${suite.build.dir}" deleteonexit="delete" prefix="rest"/>
<subant genericantfile="${harness.dir}/suite.xml" target="copy-cluster" inheritrefs="true">
<property name="dest.dir" value="${temp.dir.rest}"/>
<property name="nbexec.dir" value="${temp.dir.nbexec}"/>
<property name="build.dir" value="${suite.build.dir}"/>
<resources refid="zip.platform.clusters"/>
</subant>
<zip destfile="${dist.dir}/${app.name}.zip">
<zipfileset dir="${build.launcher.dir}/bin/" filemode="755" prefix="${app.name}/bin"/>
<zipfileset dir="${build.launcher.dir}/etc/" prefix="${app.name}/etc"/>
<zipfileset dir="${temp.dir.nbexec}" filemode="755" prefix="${app.name}"/>
<zipfileset dir="${temp.dir.rest}" prefix="${app.name}"/>
<!-- Yes, the doubled app.name is a bit ugly, but better than the alternative; cf. #66441: -->
<zipfileset dir="${cluster}" prefix="${app.name}/${app.name}">
<exclude name="config/Modules/*.xml_hidden"/>
</zipfileset>
<target name="copy-nbexec" if="copy.nbexec" description="Copies nbexec from given cluster to specified location">
<copy todir="${nbexec.dir}/${cluster.name}">
<fileset dir="${basedir}">
<filename name="**/lib/nbexec*"/>
</fileset>
</copy>
</target>
<target name="create-platform" depends="build-zip" description="Creates an unzipped platform from the suite, launchers, and selected modules from the platform.">
<mkdir dir="${dist.dir}/${app.name}"/>
<unzip src="${dist.dir}/${app.name}.zip" dest="${dist.dir}/${app.name}">
<globmapper from="${app.name}/*" to="*"/>
</unzip>
<echo level="warning">
Note: As of NetBeans 6.7, you can use the property 'cluster.path' instead of the 'create-platform' target.
See: http://wiki.netbeans.org/DevFaqHowToReuseModules
</echo>
</target>
<target name="build-mac" depends="build,build-launchers" description="Builds a ZIP distribution of the suite, launchers, and selected modules from the platform.">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.dir}/${app.name}.app"/>
<mkdir dir="${dist.dir}/${app.name}.app/Contents"/>
<mkdir dir="${dist.dir}/${app.name}.app/Contents/MacOS"/>
<mkdir dir="${dist.dir}/${app.name}.app/Contents/Resources"/>
<property name="app.icon.icns" value="${harness.dir}/etc/applicationIcon.icns"/>
<copy file="${app.icon.icns}" tofile="${dist.dir}/${app.name}.app/Contents/Resources/${app.name}.icns"/>
<delete file="${dist.dir}/${app.name}.app/Contents/MacOS/${app.name}"/> <!--TODO: move script to external file-->
<echo file="${dist.dir}/${app.name}.app/Contents/MacOS/${app.name}">#!/bin/sh
#copied from nbexec
resolve_symlink () {
file="$$1"
while [ -h "$$file" ]; do
ls=`ls -ld "$$file"`
link=`expr "$$ls" : '^.*-> \(.*\)$'2>/dev/null`
if expr "$$link" : '^/'2> /dev/null >/dev/null; then
file="$$link"
else
file=`dirname "$$1"`"/$$link"
fi
done
echo "$file"
}
absolutize_path () {
oldpwd=`pwd`
cd "$$1"
abspath=`pwd`
cd "$${oldpwd}"
echo "$$abspath"
}
PRG="`resolve_symlink "$$0"`"
parentDir="`dirname "$$PRG"`"
parentDir="`absolutize_path "$$parentDir"`"
#resolve the script path
scriptPath="$$parentDir/../Resources/${app.name}/bin"
#run the main executable
sh -- "$$scriptPath/${app.name}""$$@"
</echo>
<chmod file="${dist.dir}/${app.name}.app/Contents/MacOS/${app.name}" perm="755"/>
<chmod file="${dist.dir}/${app.name}.app/Contents/Resources/${app.name}/bin/${app.name}" perm="755"/>
<chmod dir="${dist.dir}" includes="${app.name}.app/Contents/Resources/${app.name}/platform*/lib/nbexec" perm="755"/>
<copy file="${harness.dir}/etc/Info.plist" tofile="${dist.dir}/${app.name}.app/Contents/Info.plist">
<filterchain>
<replacestring from="$${app.name}" to="${app.name}"/>
<replacestring from="$${app.version}" to="${app.version}"/>
<replacestring from="$${app.title}" to="${app.title}"/>
<replacestring from="$${app.icon}" to="master.png"/>
<replacestring from="$${branding.token}" to="${branding.token}"/>
</filterchain>
</copy> <!-- zipping in ant doesn't preserve symlinks that seem to be required.
zip destfile="${dist.dir}/${app.name}-MacOS.zip" basedir="${dist.dir}" includes="${app.name}.app/**" duplicate="preserve"/-->
<echo>
You MacOS Application bundle was created at ${dist.dir}/${app.name}.app. For final packaging, use hdiutil or other tools to create a .dmg image.
Alternatively use "zip -yr ${app.name}.app" to create a simple zipped distribution.
</echo>
</target>
<target name="-testuserdir-delete-init" depends="-init">
<property name="test.user.dir" location="${suite.build.dir}/testuserdir"/>
<property name="test.user.dir.lock" location="${test.user.dir}/lock"/>
<condition property="app.running">
<islocked file="${test.user.dir.lock}"/>
</condition>
</target>
<target name="-testuserdir-delete-ok" depends="-testuserdir-delete-init" unless="app.running">
<delete dir="${test.user.dir}"/>
</target>
<target name="-testuserdir-delete-fail" depends="-testuserdir-delete-init" if="app.running"> <!-- #66799: best to warn about this condition... -->
<fail>Will not delete ${test.user.dir} because ${test.user.dir.lock} still exists; kill any running process and delete lock file if necessary</fail>
</target>
<target name="testuserdir-delete" depends="-testuserdir-delete-ok,-testuserdir-delete-fail" description="Delete testing user directory (if the application is not running); clears any saved settings etc.">
<ant antfile="${harness.dir}/jnlp.xml" target="clean"/>
</target>
<target name="run" depends="build,-jdk-init" description="Runs this suite in place.">
<ant antfile="${harness.dir}/run.xml" target="run">
<reference refid="cluster.path.id"/>
</ant>
</target>
<target name="debug" depends="build,-jdk-init,-jdk-presetdef-nbjpdastart" description="Runs this suite in place in the debugger.">
<ant antfile="${harness.dir}/run.xml" target="debug">
<reference refid="cluster.path.id"/>
</ant>
</target>
<target name="profile" depends="build,-jdk-init,-jdk-presetdef-nbprofiledirect" description="Runs this suite in place in the profiler.">
<ant antfile="${harness.dir}/run.xml" target="profile">
<reference refid="cluster.path.id"/>
</ant>
</target>
<target name="build-jnlp" depends="build,-jdk-init" description="Packages this suite as a JNLP application.">
<ant antfile="${harness.dir}/jnlp.xml" target="build">
<reference refid="cluster.path.id"/>
<property name="jnlp.generate.versions" value="${jnlp.generate.versions}"/>
</ant>
</target>
<target name="run-jnlp" depends="build,-jdk-init" description="Runs this suite as a JNLP application.">
<ant antfile="${harness.dir}/jnlp.xml" target="run">
<reference refid="cluster.path.id"/>
<property name="jnlp.generate.versions" value="false"/> <!-- versioning is not enabled w/o app server-->
</ant>
</target>
<target name="debug-jnlp" depends="build,-jdk-init,-jdk-presetdef-nbjpdastart" description="Runs this suite as a JNLP application in the debugger.">
<ant antfile="${harness.dir}/jnlp.xml" target="debug">
<reference refid="cluster.path.id"/>
<property name="jnlp.generate.versions" value="false"/> <!-- versioning is not enabled w/o app server-->
</ant>
</target>
<target name="build-osgi" depends="build,-jdk-init" description="Converts this suite into OSGi-compatible bundles.">
<echo>OSGi support is EXPERIMENTAL for now; see: http://wiki.netbeans.org/NetBeansInOSGi</echo>
<ant antfile="${harness.dir}/osgi.xml" target="build">
<reference refid="cluster.path.id"/>
</ant>
</target>
<target name="build-osgi-obr" depends="build-osgi" description="Creates an OSGi bundle repository from this suite.">
<ant antfile="${harness.dir}/osgi.xml" target="obr">
<reference refid="cluster.path.id"/>
</ant>
</target>
<target name="run-osgi" depends="build-osgi" description="Runs this suite in an OSGi container.">
<ant antfile="${harness.dir}/osgi.xml" target="run">
<reference refid="cluster.path.id"/>
</ant>
</target>
<target name="debug-osgi" depends="build-osgi" description="Debugs this suite in an OSGi container.">
<ant antfile="${harness.dir}/osgi.xml" target="debug">
<reference refid="cluster.path.id"/>
</ant>
</target>
<target name="profile-osgi" depends="build-osgi" description="Profiles this suite in an OSGi container.">
<ant antfile="${harness.dir}/osgi.xml" target="profile">
<reference refid="cluster.path.id"/>
</ant>
</target>
<target name="test" depends="build" description="Runs tests for all modules in the suite.">
<sortsuitemodules unsortedmodules="${modules}" sortedmodulesproperty="modules.test.sorted" sorttests="true"/>
<property name="continue.after.failing.tests" value="true"/> <!-- fallback -->
<subant target="test" buildpath="${modules.test.sorted}" inheritrefs="false" inheritall="false">
<property name="cluster.path.evaluated" value="${cluster.path.evaluated}"/> <!-- Just for speed of pre-7.0 projects -->
<property name="harness.taskdefs.done" value="${harness.taskdefs.done}"/> <!-- optimization -->
<property name="continue.after.failing.tests" value="${continue.after.failing.tests}"/>
</subant>
</target>
<target name="test-generate-html" depends="test" description="Generates test report for entire suite">
<delete dir="${test.xml.results.dir}" />
<mkdir dir="${test.xml.results.dir}" />
<target name="test-view-html" depends="test-generate-html" description="Generates and displays test report for entire suite">
<nbbrowse file="${test.report.html.dir}/index.html"/>
</target>
<target name="update" depends="-init" description="Updates modules in the suite from an update center.">
<sortsuitemodules unsortedmodules="${modules}" sortedmodulesproperty="modules.test.sorted"/>
<subant target="update" buildpath="${modules.test.sorted}" inheritrefs="false" inheritall="false">
<property name="cluster.path.evaluated" value="${cluster.path.evaluated}"/> <!-- Just for speed of pre-7.0 projects -->
<property name="harness.taskdefs.done" value="${harness.taskdefs.done}"/> <!-- optimization -->
<property name="autoupdate.catalog.url" value="${autoupdate.catalog.url}"/>
</subant>
</target>
<target name="display-coverage-report" depends="coverage-report"
description="Generates and displays test coverage report for entire suite">
<fail unless="testcoverage.report.dir">
Property testcoverage.report.dir not set. Test coverage script may be missing in ${harness.dir}.
</fail>
<nbbrowse file="${testcoverage.report.dir}/index.html"/>
</target>
<target
name="clusterize" depends="-taskdefs"
description="Scans a directory for list of NetBeans module JARs or OSGi bundles and generates necessary config files to make that look like NetBeans cluster"
>
<fail unless="cluster" message="You have to specify -Dcluster=... as a path to the root of your JAR tree"/>
<condition property="include.autoload" value="${includes}"> <!-- for backward compatibility with tutorials -->
<isset property="includes"/>
</condition>
<fail message="You have to specify one of -Dinclude.autoload=... -Dinclude.eager=... -Dinclude.enabled=...">
<condition>
<not>
<or>
<isset property="include.autoload"/>
<isset property="include.eager"/>
<isset property="include.enabled"/>
</or>
</not>
</condition>
</fail>
<property name="config.dir" location="${cluster}/config/Modules"/>
<mkdir dir="${config.dir}"/>
<createmodulexml xmldir="${config.dir}" updatetrackingroot="${cluster}" failonmissingmanifest="false">
<autoload dir="${cluster}" includes="${include.autoload}"/>
<eager dir="${cluster}" includes="${include.eager}"/>
<enabled dir="${cluster}" includes="${include.enabled}"/>
</createmodulexml>
</target>
</project>
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.