![]()
|
jarlib-resolveDescriptionTry to locate a jar to satisfy an extension and place location of jar into property. The task allows you to add a number of resolvers that are capable of locating a library for a specifc extension. Each resolver will be attempted in specified order until library is found or no resolvers are left. If no resolvers are left and failOnError is true then a BuildException will be thrown. Note that this task
works with extensions as defined by the "Optional Package" specification.
For more information about optional packages, see the document
Optional Package Versioning in the documentation bundle for your
Java2 Standard Edition package, in file
See the Extension and ExtensionSet documentation for further details Parameters
Parameters specified as nested elementsextensionExtension the extension to resolve. Must be present locationThe location sub element allows you to look for a library in a location relative to project directory.
urlThe url resolver allows you to download a library from a URL to a local file.
antThe ant resolver allows you to run a ant build file to generate a library.
ExamplesResolve Extension to file. If file does not exist or file does not implement extension then throw an exception. <extension id="dve.ext" extensionName="org.realityforge.dve" specificationVersion="1.2" specificationVendor="Peter Donald"/> <jarlib-resolve property="dve.library"> <extension refid="dve.ext"/> <location location="/opt/jars/dve.jar"/> </jarlib-resolve> Resolve Extension to url. If url does not exist or can not write to destfile or files does not implement extension then throw an exception. <extension id="dve.ext" extensionName="org.realityforge.dve" specificationVersion="1.2" specificationVendor="Peter Donald"/> <jarlib-resolve property="dve.library"> <extension refid="dve.ext"/> <url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/> </jarlib-resolve> Resolve Extension to file produce by ant build. If file does not get produced or ant file is missing or build fails then throw an exception (Note does not check that library implements extension). <extension id="dve.ext" extensionName="org.realityforge.dve" specificationVersion="1.2" specificationVendor="Peter Donald"/> <jarlib-resolve property="dve.library" checkExtension="false"> <extension refid="dve.ext"/> </jarlib-resolve> Resolve Extension via multiple methods. First check local file to see if it implements extension. If it does not then try to build it from source in parralel directory. If that fails then finally try to download it from a website. If all steps fail then throw a build exception. <extension id="dve.ext" extensionName="org.realityforge.dve" specificationVersion="1.2" specificationVendor="Peter Donald"/> <jarlib-resolve property="dve.library"> <extension refid="dve.ext"/> <location location="/opt/jars/dve.jar"/> <url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/> </jarlib-resolve> Copyright © 2002 Apache Software Foundation. All rights Reserved. |