2006-09-11 04:19:00 +00:00
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2002-06-22 23:38:38 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
2005-04-29 18:58:16 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
2002-06-22 23:38:38 +00:00
|
|
|
<title>jarlib-resolve Task</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2018-01-22 23:52:21 +01:00
|
|
|
<h2 id="jarlib-resolve">jarlib-resolve</h2>
|
2002-06-22 23:38:38 +00:00
|
|
|
<h3>Description</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Try 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 specific
|
|
|
|
extension. Each resolver will be attempted in specified order until library is found or no resolvers
|
|
|
|
are left. If no resolvers are left and <var>failOnError</var> is true then a BuildException will be
|
|
|
|
thrown.</p>
|
|
|
|
|
|
|
|
<p>Note that this task works with extensions as defined by the "Optional Package" specification.
|
|
|
|
For more information about optional packages, see the document <em>Optional Package Versioning</em>
|
|
|
|
in the documentation bundle for your Java Standard Edition package, in file
|
|
|
|
<code>guide/extensions/versioning.html</code> or the online <a target="_blank"
|
|
|
|
href="https://docs.oracle.com/javase/8/docs/technotes/guides/extensions/versioning.html"> Extension
|
|
|
|
and ExtensionSet documentation</a> for further details.</p>
|
2002-06-22 23:38:38 +00:00
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2002-06-22 23:38:38 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<th>Attribute</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Required</th>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>property</td>
|
|
|
|
<td>The name of property to set to library location.</td>
|
|
|
|
<td>Yes</td>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>failOnError</td>
|
|
|
|
<td><q>true</q> if failure to locate library should result in build exception.</td>
|
|
|
|
<td>No; defaults to <q>true</q></td>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>checkExtension</td>
|
|
|
|
<td><q>true</q> if libraries returned by nested resolvers should be checked to see if they
|
|
|
|
supply extension.</td>
|
|
|
|
<td>No; defaults to <q>true</q></td>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<h3>Parameters specified as nested elements</h3>
|
|
|
|
|
|
|
|
<h4>extension</h4>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p><a href="../Types/extension.html">Extension</a> the extension to resolve. Must be present</p>
|
2002-06-22 23:38:38 +00:00
|
|
|
|
|
|
|
<h4>location</h4>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>The <code>location</code> nested element allows you to look for a library in a location relative
|
|
|
|
to project directory.</p>
|
|
|
|
<table class="attr">
|
2002-06-22 23:38:38 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<th>Attribute</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Required</th>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>location</td>
|
|
|
|
<td>The pathname of library.</td>
|
|
|
|
<td>Yes</td>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<h4>url</h4>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>The <code>url</code> resolver allows you to download a library from a URL to a local file.</p>
|
|
|
|
<table class="attr">
|
2002-06-22 23:38:38 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<th>Attribute</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Required</th>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>url</td>
|
|
|
|
<td>The URL to download.</td>
|
|
|
|
<td>Yes</td>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>destfile</td>
|
|
|
|
<td>The file to download URL into.</td>
|
|
|
|
<td rowspan="2">Exactly one of the two</td>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>destdir</td>
|
|
|
|
<td>The directory in which to place downloaded file.</td>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<h4>ant</h4>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>The <code>ant</code> resolver allows you to run an Apache Ant build file to generate a
|
|
|
|
library.</p>
|
|
|
|
<table class="attr">
|
2002-06-22 23:38:38 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<th>Attribute</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Required</th>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>antfile</td>
|
|
|
|
<td>The build file.</td>
|
|
|
|
<td>Yes</td>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>destfile</td>
|
|
|
|
<td>The file that the ant build creates.</td>
|
|
|
|
<td>Yes</td>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>target</td>
|
|
|
|
<td>The target to run in build file.</td>
|
|
|
|
<td>No</td>
|
2002-06-22 23:38:38 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<h3>Examples</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p><strong>Resolve Extension to file.</strong> If file does not exist or file does not implement
|
|
|
|
extension then throw an exception.</p>
|
2002-06-22 23:38:38 +00:00
|
|
|
<pre>
|
2018-02-28 07:58:59 +01:00
|
|
|
<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></pre>
|
|
|
|
|
|
|
|
<p><strong>Resolve Extension to URL.</strong> If URL does not exist or can not write
|
|
|
|
to <var>destfile</var> or file does not implement extension then throw an exception.</p>
|
2002-06-22 23:38:38 +00:00
|
|
|
<pre>
|
2018-02-28 07:58:59 +01:00
|
|
|
<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></pre>
|
|
|
|
|
|
|
|
<p><strong>Resolve Extension to file produce by Ant build.</strong> If file does not get produced or
|
|
|
|
Ant file is missing or build fails then throw an exception. (<strong>Note</strong>: does not check
|
|
|
|
that library implements extension.)</p>
|
2002-06-22 23:38:38 +00:00
|
|
|
<pre>
|
2018-02-28 07:58:59 +01:00
|
|
|
<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"/>
|
|
|
|
<ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/>
|
|
|
|
</jarlib-resolve></pre>
|
|
|
|
|
|
|
|
<p><strong>Resolve Extension via multiple methods.</strong> First check local file to see if it
|
|
|
|
implements extension. If it does not then try to build it from source in parallel directory. If that
|
|
|
|
fails then finally try to download it from a website. If all steps fail then throw a build
|
|
|
|
exception.</p>
|
2002-06-22 23:38:38 +00:00
|
|
|
<pre>
|
2018-02-28 07:58:59 +01:00
|
|
|
<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"/>
|
|
|
|
<ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/>
|
|
|
|
<url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/>
|
|
|
|
</jarlib-resolve></pre>
|
2002-06-22 23:38:38 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|