站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

AutomaticExtraClasspathProvider (Ant) - NetBeans API Javadoc (Current Development Version)

org.apache.tools.ant.module/3 3.27.0 2

org.apache.tools.ant.module.spi
Interface AutomaticExtraClasspathProvider


public interface AutomaticExtraClasspathProvider

Permits a module to register special additional JARs (or directories) to be added to Ant's primary classpath by default. This should only be used to supply libraries needed by standard "optional" tasks that ship with Ant - e.g. junit.jar as needed by the <junit> task. Register instances to default lookup.

Since version org.apache.tools.ant.module/3 3.26 there is a way to register a library declaratively. Just put fragment like this into your layer file:

 <filesystem>
   <folder name="Services">
     <folder name="Hidden">
       <file name="org-your-lib-ant-registration.instance">
         <attr name="instanceCreate" methodvalue="org.apache.tools.ant.module.spi.AutomaticExtraClasspath.url"/>
         <attr name="url" urlvalue="nbinst://org.your.module.name/modules/ext/org-your-lib.jar"/>
         <attr name="instanceOf" stringvalue="org.apache.tools.ant.module.spi.AutomaticExtraClasspathProvider"/>
       </file>
     </folder>
   </folder>
 </filesystem>
 

Since:
org.apache.tools.ant.module/3 3.8

Method Summary
 File[] getClasspathItems()
          Return a (possibly empty) list of items to add to the automatic classpath used by default when running Ant.
 

Method Detail

getClasspathItems

File[] getClasspathItems()
Return a (possibly empty) list of items to add to the automatic classpath used by default when running Ant. Note that the result is not permitted to change between calls in the same VM session.

The user may be able to override this path, so there is no firm guarantee that the items will be available when Ant is run. However by default they will be.

Returns:
zero or more directories or JARs to add to Ant's startup classpath
See Also:
InstalledFileLocator

org.apache.tools.ant.module/3 3.27.0 2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.