On Thu, Mar 26, 2009 at 4:29 PM, Andrey Fedorov <[email protected]> wrote:

> I'm trying to understand how resolvers work in my Ivy settings file. So,
> ivysettings.xml file includes:
>
> <url name="com.springsource.repository.bundles.external">
> >     <ivy pattern="
> >
> http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]<http://repository.springsource.com/ivy/bundles/external/%5Borganisation%5D/%5Bmodule%5D/%5Brevision%5D/%5Bartifact%5D-%5Brevision%5D.%5Bext%5D>
> "
> > />
> >     <artifact pattern="
> >
> http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]<http://repository.springsource.com/ivy/bundles/external/%5Borganisation%5D/%5Bmodule%5D/%5Brevision%5D/%5Bartifact%5D-%5Brevision%5D.%5Bext%5D>
> "
> > />
> > </url>
> >
>
> And my ivy.xml file includes:
>
> <dependency org="org.junit"
> >             name="com.springsource.org.junit"
> >             rev="4.4.0" />
> >
>
> From when I ran Ivy, I can tell that this resolves to:
>
> http://repository.springsource.com/ivy/bundles/external/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-sources-4.4.0.jar
>
> So the resolutions go:
>
>    [organization] => "org.junit"
>    [module] => "com.springsource.org.junit"
>    [revision] => "4.4.0"
>    [artifact] => "com.springsource.org.junit-sources"
>    [ext] => "jar"
>
> I see how ivy resolves the [organization], [module], and [revision] in the
> URL pattern (duh), but how does it resolve [artifact] and [ext]?


The artifacts and their extensions are defined by the module you are
depending on. Since your dependency doesn't specify any configuration, you
are getting all JAR artifacts. The reason you are getting JAR artifacts and
not some other type is because "jar" is the default.

Reading the docs for the <dependency> tag should help explain some of this a
little better (hopefully).

-Archie

-- 
Archie L. Cobbs

Reply via email to