Jar resolver | Apache Ivy™ 2.4.0 Documentation

# Jar resolver
Tag | jar
Handle latest | yes
Handle publish | no
since 2.3 This resolver uses a specified jar resolve ivy files and artifacts. This kind of resolver helps the packaging of an entire repository. Since the entire "repository" jar is expected to be local at some point, the size of a such repository should be considered to be not too large if it is expected to be remote; hence the artifacts in a such repo should be little in size. The configuration of such a resolver is done via specifying the location of the jar, and through ivy and artifact patterns, indicating where ivy files and artifacts can be found in the jar. You can indicate a list of patterns which will be checked one after the other. Note that the patterns MUST NOT start with a slash. # Attributes This resolver shares the common attributes of standard resolvers.
Attribute | Description | Required
--- | --- | ---
file | the absolute path of the jar | One of 'file' or 'url' is required
url | the url of the jar | One of 'file' or 'url' is required
# Child elements
Element | Description | Cardinality
--- | --- | ---
ivy | defines a pattern for ivy files, using the pattern attribute | 0..n
artifact | defines a pattern for artifacts, using the pattern attribute | 1..n
# Examples
    <jar name="my-local-jar-resolver" file="/home/me/myrepo.jar">
        <ivy pattern="[organisation]/[module]/ivys/ivy-[revision].xml" />
        <artifact pattern="[organisation]/[module]/[type]s/[artifact]-[revision].[type]" />
    </jar>
A simple local jar repository.
    <jar name="my-remote-jar-resolver" url="http://www.mywebsite.com/dist/myrepo.jar">
        <ivy pattern="dir_in_jar/subdir_in_jar/[organisation]/[module]/ivys/ivy-[revision].xml" />
        <ivy pattern="dir_in_jar/another_subdir_in_jar/[organisation]/[module]/ivys/ivy-[revision].xml" />
        <artifact pattern="dir_in_jar/subdir_in_jar/[organisation]/[module]/[type]s/[artifact]-[revision].[type]" />
        <artifact pattern="dir_in_jar/another_subdir_in_jar/[organisation]/[module]/[type]s/[artifact]-[revision].[type]" />
        <artifact pattern="dir_in_jar/yet_another_subdir_in_jar/[organisation]/[module]/[type]s/[artifact]-[revision].[type]" />
    </jar>
A remote jar repository with multiple ivy and artifact patterns, patterns pointing in some sub directories in the jar.