<!-- <questionid="arch-overall"when="init"> Describetheoverallarchitecture. <hint> WhatwillbeAPIfor <ahref="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi"> clientsandwhatsupportAPI</a>? Whatpartswillbepluggable? Howwillplug-insberegistered?Pleaseuse<code><apitype="export"/></code> todescribeyourgeneralAPIs. Ifpossiblepleaseprovide simplediagrams. </hint> </question>
-->
<answer id="arch-overall">
<p>
The main uses of the Ant integration module are self-contained and do
not interact directly with other modules: the user selects a target
in an Ant script and runs it. Nonetheless, there are a few
significant ways other modules can interact with this module:
</p>
<ol>
<li>
<api group="java" name="AntLogger"type="export" category="stable"url="@TOP@/org/apache/tools/ant/module/spi/AntLogger.html">
<p>
Permits customization of the way Ant output is displayed.
</p>
</api>
</li>
<li>
<api group="java.io.File" name="register-defs"type="export" category="stable"url="@TOP@/org/apache/tools/ant/module/spi/package-summary.html#register-defs">
<p>
Registering custom Ant task and type definitions (when these
can be run inside the NetBeans JVM only). Typically used to
add special tasks which somehow script the IDE, such as
connecting the JPDA debugger to a process launched by Ant.
</p>
</api>
</li>
<li>
<api group="java" name="AutomaticExtraClasspathProvider"type="export" category="stable"url="@TOP@/org/apache/tools/ant/module/spi/AutomaticExtraClasspathProvider.html">
<p>
Permits additions to the default Ant classpath.
</p>
</api>
</li>
<li>
<api group="java" name="IntrospectedInfo"type="export" category="stable"url="@TOP@/org/apache/tools/ant/module/api/IntrospectedInfo.html">
<p>
Examining cached and introspected data about which tasks and
types are known to be defined in the user's Ant scripts, and
what their design-time structure is. Used by XML code
completion, for example.
</p>
</api>
</li>
<li>
<api group="java" name="AntTargetExecutor"type="export" category="stable"url="@TOP@/org/apache/tools/ant/module/api/AntTargetExecutor.html">
<p>
Running named targets in specified Ant scripts. Can be used
by modules which provide a different UI for initiating Ant
execution. <code>ActionUtils</code> provides a more convenient
wrapper around this functionality.
</p>
</api>
</li>
</ol>
</answer>
<!-- <questionid="arch-quality"when="init"> Howthe<ahref="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a> ofyourcodewillbetestedand howfutureregressionsaregoingtobeprevented? <hint> Whatkindoftesting youwanttouse?What/howmuchareaoffunctionality shouldbecoveredbythetests? </hint> </question>
-->
<answer id="arch-quality">
<p>
Currently a fair amount of the module is covered by functional tests.
There are some unit tests, especially for newer code.
</p>
</answer>
<!-- <questionid="arch-usecases"when="init"> Describethemain<ahref="http://openide.netbeans.org/tutorial/api-design.html#usecase"> usecases</a>ofthenewAPI.Whowilluseitat whatcircumstancesandwhatwillbethetypicalcodetowrite tousethemodule. </question>
-->
<answer id="arch-usecases">
<p>
The principal use cases for the API are covered in the overall API architecture.
</p>
</answer>
<!-- <questionid="arch-what"when="init"> Whatisthisprojectgoodfor? <hint> Pleaseprovidehereafewlinesdescribingtheproject, whatproblemitshouldsolve,providelinkstodocumentation, specifications,etc. </hint> </question>
-->
<answer id="arch-what">
<p>
The Ant integration module recognizes Ant build scripts, facilitates
editing them as text or structurally, lets the user run targets or
create shortcuts to them, etc.
</p>
</answer>
<!-- <questionid="compat-i18n"when="impl"> Isyourmodulecorrectlyinternationalized? <hint> Correctinternationalizationmeansthatitobeysinstructions at<ahref="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html"> NetBeansI18Npages</a>. </hint> </question>
-->
<answer id="compat-i18n">
<p>
Visible strings directly represented by the module are
internationalized. However Ant itself is not, and so messages coming
from Ant will appear only in English.
</p>
</answer>
<!-- <questionid="compat-standards"when="init"> Doesthemoduleimplementordefineanystandards?Isthe implementationexactordoesitdeviatesomehow? </question>
-->
<answer id="compat-standards">
<p>
Insofar as Ant can be considered a standard, it implements the
standard behavior of running an Ant script. The implementation should
behave quite similarly to what the normal Ant command-line usage does
(since it delegates to the Ant library internally and only replaces
the command-line wrapper with an IDE wrapper). Since the Ant project
does not publish a formal specification of how Ant should behave,
there is no objective criterion for judging the fidelity.
</p>
<p>
Likely areas of difference between command-line and IDE usage:
obscure class loader scenarios (since the IDE must load Ant in a
special class loader, whereas the command-line tool may do it
differently); system properties set in the IDE but not on the command
line; etc. Generally, well-written scripts and tasks are not affected
by these differences, but occasionally problems arise (they are
treated as bugs).
</p>
</answer>
<!-- <questionid="compat-version"when="impl"> Canyourmodulecoexistwithearlierandfuture versionsofitself?Canyoucorrectlyreadalloldsettings?Willfuture versionsbeabletoreadyourcurrentsettings?Canyouread orpolitelyignoresettingsstoredbyafutureversion? <hint> Veryhelpfulforreadingsettingsistostoreversionnumber there,sofutureversionscandecidewhetherhowtoread/convert thesettingsandolderversionscanignorethenewones. </hint> </question>
-->
<answer id="compat-version">
<p>
Loading older settings is generally supported for compatibility.
</p>
</answer>
<!-- <questionid="dep-jrejdk"when="final"> DoyourequiretheJDKoristheJREenough? </question>
-->
<answer id="dep-jrejdk">
<p>
The module itself requires only the JRE, but Ant requires the JDK in
order to do anything useful such as compile Java classes.
</p>
</answer>
<!-- <questionid="dep-non-nb"when="init"> WhatotherprojectsoutsideNetBeansdoesthisonedependon? <hint> Somenon-NetBeansprojectsarepackagedasNetBeansmodules (see<ahref="http://libs.netbeans.org/">libraries</a>)and itispreferredtousethisapproachwhenmoremodulesmay dependonsuchthird-partylibrary. </hint> </question>
-->
<answer id="dep-non-nb">
<ol>
<li>
<api group="java" name="Ant"type="import" category="third"url="https://ant.apache.org">
Ant itself, of course. 1.8.0+ is required, 1.10.14 recommended (and currently bundled); some features may be limited to newer versions.
</api>
</li>
</ol>
</answer>
<!-- <questionid="dep-platform"when="init"> Onwhichplatformsdoesyourmodulerun?Doesitruninthesame wayoneach? <hint> IfyourmoduleisusingJNIordealswithspecialdifferencesof OSeslikefilesystems,etc.pleasedescribeherewhattheyare. </hint> </question>
-->
<answer id="dep-platform">
<p>
Should be as platform-independent as Ant itself is. Ant uses some
platform-specific tricks to normalize pathnames, launch
platform-dependent tools, etc., but the user is shielded from the
details wherever possible.
</p>
</answer>
<!-- <questionid="deploy-jar"when="impl"> DoyoudeployjustmoduleJARfile(s)orotherfilesaswell? <hint> IfyourmoduleconsistsofjustonemoduleJARfile,justconfirmthat. IfitusesmorethanoneJAR,describewheretheyarelocated,how theyrefertoeachother. IfitconsistofmoduleJAR(s)andotherfiles,pleasedescribe whatistheirpurpose,whyotherfilesarenecessary.Please makesurethatinstallation/uninstallationleavesthesystem instateasitwasbeforeinstallation. </hint> </question>
-->
<answer id="deploy-jar">
<p>
The module itself is contained in a regular module JAR. The bundled
Ant installation is contained in <code>ant/lib/*.jar</code> in the
NetBeans installation. (It is necessary for the Ant libraries to be
loaded explicitly and not be accessible directly from the module.)
There is also a bridge JAR <code>ant/nblib/bridge.jar</code> which
communicates between Ant itself and the module.
</p>
</answer>
<!-- <questionid="deploy-packages"when="init"> Arepackagesofyourmodulemadeinaccessiblebynotdeclaringthem public? <hint> NetBeansmodulesystemallowsrestrictionofaccessrightsto publicclassesofyourmodulefromothermodules.Thisprevents unwanteddependenciesofothersonyourcodeandshouldbeused wheneverpossible(<ahref="http://www.netbeans.org/download/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.4-public-packages"> publicpackages </a>).Ifyoudonotrestrictaccesstoyourclassesyouare makingittooeasyforotherpeopletomisuseyourimplementation details,thatiswhyyoushouldhavegoodreasonfornot restrictingpackageaccess. </hint> </question>
-->
<answer id="deploy-packages">
<p>
Yes, only official packages are exported.
</p>
</answer>
<!-- <questionid="deploy-shared"when="final"> Doyouneedtobeinstalledinthesharedlocationonly,orintheuserdirectoryonly, orcanyourmodulebeinstalledanywhere? <hint> Installationlocationshallnotmatter,ifitdoesexplainwhy. Consideralsowhether<code>InstalledFileLocator</code>canhelp. </hint> </question>
-->
<answer id="deploy-shared">
<p>
Should not matter where. <code>InstalledFileLocator</code> is used.
</p>
</answer>
<!-- <questionid="exec-classloader"when="impl"> Doesyourcodecreateitsownclassloader(s)? <hint> Abitunusual.Pleaseexplainwhyandwhatfor. </hint> </question>
-->
<answer id="exec-classloader">
<p>
Yes, several class loaders are created:
</p>
<ol>
<li>
<p>
Ant itself is loaded from a class loader containing just
<code>ant/lib/*.jar</code> (or generally from
<code>lib/*.jar</code> in a user-specified Ant installation
directory), plus any user-specified additional classpath
entries and entries from <code>AutomaticExtraClasspathProvider</code>.
</p>
<p>
<code>InstalledFileLocator</code> is used to find
<code>ant/lib/ant.jar</code> and the default Ant installation
is taken to be the parent directory of the containing directory
of this (e.g. <code>ide/ant/</code>).
</p>
<p>
If any files <code>ant/patches/*.jar</code> exist, they are
loaded at the front of the classpath, to permit an IDE distribution
to bundle a version of Ant with patches (e.g. for #47708).
</p>
</li>
<li>
<p>
<code>ant/nblib/bridge.jar</code> is loaded from a class
loader delegating to both the main Ant loader, and the Ant
module's class loader.
</p>
</li>
<li>
<p>
Each module with a custom definition JAR in
<code>ant/nblib/*.jar</code> gets a class loader delegating
to both the main Ant loader, and that module's class loader.
</p>
</li>
</ol>
</answer>
<!-- <questionid="exec-introspection"when="impl"> Doesyourmoduleuseanykindofruntimetypeinformation(<code>instanceof</code>, workwith<code>java.lang.Class</code>,etc.)? <hint> CheckforcaseswhenyouhaveanobjectoftypeAandyoualso expectitto(possibly)beoftypeBanddosomespecialaction.That shouldbedocumented.Thesameappliesonoperationsinmeta-level (Class.isInstance(...),Class.isAssignableFrom(...),etc.). </hint> </question>
-->
<answer id="exec-introspection">
<p>
Yes, internally (not at the API level). Loading and introspecting
task classes, loading Ant itself, checking for different Ant
versions, etc. all require some use of reflection.
</p>
</answer>
<!-- <questionid="exec-process"when="impl"> Doyouexecuteanexternalprocessfromyourmodule?Howdoyouensure thattheresultisthesameondifferentplatforms?Doyouparseoutput? Doyoudependonresultcode? <hint> Ifyoufeedaninput,parsetheoutputpleasedeclarethatasanAPI. </hint> </question>
-->
<answer id="exec-process">
<p>
Of course, Ant is run (as a VM-internal process). Ant itself handles
platform issues for the most part. Output is sent by Ant directly to
NetBeans-specific <code>AntLogger</code>s.
</p>
</answer>
<!-- <questionid="exec-property"when="impl"> Isexecutionofyourcodeinfluencedbyanyenvironmentor Javasystem(<code>System.getProperty</code>)property? <hint> Ifthereisapropertythatcanchangethebehaviorofyour code,somebodywilllikelyuseit.Youshoulddescribewhatitdoes andthe<ahref="http://openide.netbeans.org/tutorial/api-design.html#life">stabilitycategory</a> ofthisAPI.Youmayuse <pre> <apitype="export"group="property"name="id"category="private"url="http://..."> descriptionoftheproperty,whereitisused,whatitinfluence,etc. </api> </pre> </hint> </question>
-->
<answer id="exec-property">
<p>
Generally not except for <a href="https://ant.apache.org/manual/running.html#sysprops">properties
interpreted by Ant itself</a> and the following:
</p>
<ul>
<li>
<api group="systemproperty" name="logger.max.line.length"type="export" category="private">
<p>
If a longer message is logged the ant logger will handle the message as plain text and will not try to hyperlink, color, fold, etc.
If not set by the user a default value of <b>3000</b> will be used.
</p>
</api>
</li>
</ul>
</answer>
<!-- <questionid="exec-threading"when="impl"> Whatthreadingmodels,ifany,doesyourmoduleadhereto? <hint> IfyourmodulecallsforeignAPIswhichhaveaspecificthreadingmodel, indicatehowyoucomplywiththerequirementsformultithreadedaccess (synchronization,mutexes,etc.)applicabletothoseAPIs. IfyourmoduledefinesanyAPIs,orhascomplexinternalstructures thatmightbeusedfrommultiplethreads,declarehowyouprotect dataagainstconcurrentaccess,raceconditions,deadlocks,etc., andwhethersuchrulesareenforcedbyruntimewarnings,errors,assertions,etc. Examples:aclassmightbenon-thread-safe(likeJavaCollections);might befullythread-safe(internallocking);mightrequireaccessthroughamutex (andmayormaynotautomaticallyacquirethatmutexonbehalfofaclientmethod); mightbeabletorunonlyintheeventqueue;etc. Alsodescribewhenanyeventsarefired:synchronously,asynchronously,etc. Ideas:<ahref="http://core.netbeans.org/proposals/threading/index.html#recommendations">ThreadingRecommendations</a>(inprogress) </hint> </question>
-->
<answer id="exec-threading">
<p>
<code>IntrospectedInfo</code> should be thread-safe and fires changes
asynchronously. Other API-visible classes are generally thread-safe
unless otherwise noted. Internal classes follow natural Datasystems,
Nodes, etc. threading models. Running an Ant target uses the
execution engine, which spawns a fresh thread.
<code>AntLogger</code>s are stateless and must be reentrant for multiple threads;
<code>AntSession</code>s and so on are thread-safe.
</p>
</answer>
<!-- <questionid="format-types"when="impl"> Whichprotocolsandfileformats(ifany)doesyourmodulereadorwriteondisk, ortransmitorreceiveoverthenetwork? </question>
-->
<answer id="format-types">
<p>
Reads Ant scripts, of course. Also understands Ant 1.6's
<code>antlib.xml</code> syntax in custom task/type definition JARs.
</p>
</answer>
<!-- <questionid="lookup-lookup"when="init"> Doesyourmoduleuse<code>org.openide.util.Lookup</code> oranysimilartechnologytofindanycomponentstocommunicatewith?Whichones? <hint> Pleasedescribetheinterfacesyouaresearchingfor,where aredefined,whetheryouaresearchingforjustoneormoreofthem, iftheorderisimportant,etc.Alsoclassifythestabilityofsuch APIcontract. </hint> </question>
-->
<answer id="lookup-lookup">
<p>
Uses various <code>getDefault</code> methods on standard helper
classes. Looks for all <code>ModuleInfo</code> instances in default
lookup to know in which enabled modules to search for custom
definitions.
Looks for instances of <code>AutomaticExtraClasspathProvider</code>
and <code>AntLogger</code> in default lookup.
</p>
</answer>
<!-- <questionid="lookup-register"when="final"> Doyouregisteranythingintolookupforothercodetofind? <hint> Doyouregisterusinglayerfileorusing<code>META-INF/services</code>? Whoissupposedtofindyourcomponent? </hint> </question>
-->
<answer id="lookup-register">
<p>
Just a MIME resolver.
Also a default <code>AntLogger</code> is registered.
</p>
</answer>
<!-- <questionid="perf-huge_dialogs"when="final"> Doesyourmodulecontainanydialogsorwizardswithalargenumberof GUIcontrolssuchascomboboxes,lists,trees,ortextareas? </question>
-->
<answer id="perf-huge_dialogs">
<p>
The Ant Shortcut Wizard contains several panels. Otherwise all
dialogs are pretty small.
</p>
</answer>
<!-- <questionid="perf-mem"when="final"> Howmuchmemorydoesyourcomponentconsume?Estimate witharelationtothenumberofwindows,etc. </question>
-->
<answer id="perf-mem">
<p>
The main question is how much memory a build consumes as it runs. Can
be substantial - will easily keep a default 96Mb heap filled - but
does not appear to leak. Ant itself mostly uses memory linearly (i.e.
allocates and soon releases it), except for deeply nested build
scripts. Tasks which are likely to consume a lot of heap (e.g.
Javadoc) are typically run as external processes by default.
</p>
</answer>
<!-- <questionid="perf-menus"when="final"> Doesyourmoduleusedynamicallyupdatedcontextmenus,or context-sensitiveactionswithcomplicatedenablementlogic? </question>
-->
<answer id="perf-menus">
<p>
The <b>Run Target...</b> context menu on a build script is
calculated from the script's targets.
</p>
<p>
Menu items which are Ant shortcuts are enabled or not according to
whether the script is well-formed.
</p>
</answer>
<!-- <questionid="perf-progress"when="final"> Doesyourmoduleexecuteanylong-runningtasks? <hint>Longrunningtasksshouldneverblock AWTthreadasitbadlyhurtstheUI <ahref="http://performance.netbeans.org/responsiveness/issues.html"> responsiveness</a>. Taskslikeconnectingover network,computinghugeamountofdata,compilation bedoneasynchronously(forexample using<code>RequestProcessor</code>),definitivelyitshould notblockAWTthread. </hint> </question>
-->
<answer id="perf-progress">
<p>
Running Ant processes are put in the execution engine but not displayed by it.
</p>
<p>
Loading introspected info for the Ant installation is a
once-per-session hit of perhaps half a second. This would typically
occur when first running an Ant script, or first getting code
completion, etc.
</p>
</answer>
<!-- <questionid="perf-scale"when="init"> Whichexternalcriteriainfluencetheperformanceofyour program(sizeoffileineditor,numberoffilesinmenu, insourcedirectory,etc.)andhowwellyourcodescales? <hint> Pleaseincludesomeestimates,thereareothermoredetailed questionstoanswerinlaterphasesofimplementation. </hint> </question>
-->
<answer id="perf-scale">
<p>
Most interesting criteria relate to performance of Ant itself, which
seems fine.
</p>
<p>
Adding an extra module with custom task definitions add a small
overhead (10msec?) to launching an Ant script. The time is largely
spent in Ant itself so is difficult to optimize out.
</p>
<p>
Adding new <code>AntLogger</code>s will slow down Ant output a little
bit, but it seems not significantly compared to typical overhead of
Ant tasks themselves.
</p>
</answer>
<!-- <questionid="perf-spi"when="init"> Howtheperformanceofthepluggedincodewillbeenforced? <hint> Ifyouallowforeigncodetobepluggedintoyourownmodule,how doyouenforce,thatitwillbehavecorrectlyandfastandwillnot negativelyinfluencetheperformanceofyourownmodule? </hint> </question>
-->
<answer id="perf-spi">
<p>
Nothing special is done in this regard for most SPIs.
<code>AntLogger</code> has a number of mask methods which permit the
Ant module to exclude some loggers from consideration for delivery
of a given event.
</p>
</answer>
<!-- <questionid="resources-file"when="final"> Doesyourmoduleuse<code>java.io.File</code>directly? <hint> NetBeansprovidealogicalwrapperoverplainfilescalled <code>org.openide.filesystems.FileObject</code>that providesuniformaccesstosuchresourcesandisthepreferred waythatshouldbeused.Butofcoursetherecanbesituationswhen thisisnotsuitable. </hint> </question>
-->
<answer id="resources-file">
<p>
<code>java.io.File</code> is used by Ant itself, so the module uses
it too when appropriate. The Filesystems API is used where ability to
execute a script is irrelevant; or where the ability to refresh file
objects is needed.
</p>
</answer>
<!-- <questionid="resources-layer"when="final"> Doesyourmoduleprovideownlayer?Doesitcreateanyfilesor foldersinit?Whatitistryingtocommunicatebythatandwithwhich components? <hint> NetBeansallowsautomaticanddeclarativeinstallationofresources bymodulelayers.Moduleregisterfilesintoappropriateplaces andothercomponentsusethatinformationtoperformtheirtask (buildmenu,toolbar,windowlayout,listoftemplates,setof options,etc.). </hint> </question>
-->
<answer id="resources-layer">
<p>
Yes; the layer includes templates, editor annotation
definitions, etc.
</p>
</answer>
<!-- <questionid="resources-read"when="final"> Doesyourmodulereadanyresourcesfromlayers?Forwhatpurpose? <hint> Asthisissomekindofintermoduledependency,itisakindofAPI. Pleasedescribeitandclassifyaccordingto <ahref="http://openide.netbeans.org/tutorial/api-design.html#categories"> commonstabilitycategories</a>. </hint> </question>
-->
<answer id="resources-read">
<api category="devel" group="layer" name="layer-actions"type="export">
<p>
Context menu actions are read from the layer folder
<code>Loaders/text/x-ant+xml/Actions</code>.
</p>
</api>
</answer>
<!-- <questionid="security-grant"when="final"> Doesyourcodegrantadditionrightstosomecode? <hint>Avoidusingaclassloderthataddssomeextra permissionstoloadedcodeunlessrealynecessary. AlsonotethatyourAPIimplementation canalsoexposeunneededpermissionstoenemycodeby AccessController.doPrilileged()calls.</hint> </question>
-->
<answer id="security-grant">
<p>
Yes, running Ant creates several class loaders to which all permissions
are granted. A wide variety of permissions are needed by various tasks.
</p>
</answer>
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.28Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-28)
¤
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.