How does Apache Ivy resolve variables in artifact templates provided in ivysettings.xml?

If my 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]" />
    <artifact pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>

And my ivy.xml file includes:

<dependency org="org.junit"
            name="com.springsource.org.junit" 
            rev="4.4.0" />

Since I started Ivy, I can say that this solves: 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 permissions 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 allows [organization], [module] and [revision] in the URL pattern (duh), but how does it allow [artifact] and [ext]?

URL resolver documentation seems to be missing.

+3
source share
1

Ivy <ivy pattern... /> , , [artifact] "" [ext] "xml". URL-, :

http://repository.springsource.com/ivy/bundles/external/org.junit/com.springsource.org.junit/4.4.0/ -4.4.0. XML

. , , :

<artifact name="com.springsource.org.junit-sources" type="src" ext="jar"/>
<artifact name="license" type="license" ext="txt"/>

<artifact pattern... /> - jar.

+6

Source: https://habr.com/ru/post/1705415/


All Articles