- Antlion
- Welcome
- License
-
- How-To Guides
- Getting Started
- Libraries
- Artifacts
- Subprojects
- Repositories
- Policy Strategies
- Format Strings
- Extending Antlion
- FAQ
-
- Tutorials
- First Tutorial: Simple
-
- Ant Tasks
-
<artifact>
-
<libraryDef>
-
-
<library>
-
<library-policy>
-
-
inner processors
-
-
inner repositories
-
<library-type>
-
<library-repository>
-
<library-urlrepository>
-
<library-mavenrepository>
-
<library-repositoryset>
-
<create-artifact>
-
<subprojects>
-
<run-subproject>
-
<replace-target>
-
- Optional Tasks
- About optional tasks
- RegexpTokenFormatter
-
|
library-policy
|
A library policy defines a set of
repositories with library processors that
dictate the policy of how libraries are found and integrated into the
Ant project.
By containing all of these together, the user can dictate once, for all
<libraryDef> s in a project, the details of
libraries.
The how-to guide contains
several sections that can help you get started setting up a library
policy for your project. The section on
repositories describes different
ways to setup your warehouse for external libraries.
The policies section describes different
techniques to setup the <library-policy> to efficiently and
effectively reference those libraries from your Ant scripts.
Descriptions for the repositories themselves, as referenced within a
<library-policy> , can be found
here. The list of built-in library
processors can be found here.
Nested Elements
|
type
As of Antlion 0.5.0, this has been deprecated in favor
of referencing the processors in-line. This will be removed
in Antlion 1.0.0.
A library type definition that describes how the libraries will be
processed to generate Ant properties and references. See the entry on
the <library-type>
task for more details about setting this up.
There can be only one type per library definition. If a type isn't
specified, then the default type (described above) will be used.
|
parent-policy
Since Antlion 0.7.0.
Defines a parent policy. There may be more than one parent, but
this is discouraged.
Parameters
|
Attribute |
Description |
Required |
refid |
The ID of the parent policy.
|
Yes |
|
|
|
|
|
Examples
|
|
|
|
|
<library-policy id="sitewide-policy">
<repository basedir="${3rdparty.dir}"
format="[group]/[version]/[artifact].[type]" />
<defaults />
<dynamic-attribute>
<attribute attrib="version" property="lib.[group].version" />
</dynamic-attribute>
</library-policy>
|
|
|
|
|
Defines a policy called "sitewide-policy" that extends the default
type to include loading the "version" attribute from the Ant properties,
and also defines a file repository. Any
<libraryDef> using this policy cannot add
additional setup type processors or repositories.
|
|
|
|
<library-policy id="sitewide-policy">
<repository basedir="${3rdparty.dir}"
format="[group]/[version]/[artifact].[type]" />
<defaults />
<dynamic-attribute>
<attribute attrib="version" property="lib.[group].version" />
</dynamic-attribute>
</library-policy>
|
|
|
|
|
The same as the previous example, but the defaults are defined using
the <defaults> processor element.
|
|
|
|
|