0
votes

I have a URL Resolver in my ivysettings.xml defined like so:

<url name="repo">
    <ivy pattern="http://repo.example.com/repo/[organization]/[module]/
        1.0-SNAPSHOT/[artifact]-[revision]-ivy.xml" />
    <artifact pattern="http://repo.example.com/repo/[organization]/[module]/
        1.0-SNAPSHOT/[artifact]-[revision](-[classifier]).[ext]"/>
</url>

I have two files in my repository:

http://repo.example.com/repo/myorg/mymodule/1.0-SNAPSHOT/mymodule-1.0.0-ivy.xml http://repo.example.com/repo/myorg/mymodule/1.0-SNAPSHOT/mymodule-1.0.0.jar

Ivy doesn't seem to be finding my descriptor when I resolve. I tried running with the verbose flag and saw this entry:

tried http://repo.example.com/repo/myorg/mymodule/1.0-SNAPSHOT/ivy-[revision]-ivy.xml

This doesn't match my expectation. Why is it looking for a descriptor with an ivy- prefix, instead of what I specified in my resolver? I would have expected the log to say it was looking for http://repo.example.com/repo/myorg/mymodule/1.0-SNAPSHOT/mymodule-[revision]-ivy.xml.

1

1 Answers

0
votes

I found an answer elsewhere on StackOverflow:

Ivy first resolves the <ivy pattern... />, with the organization, module, and revision given, and with the [artifact] hardcoded as "ivy" and [ext] hardcoded as "xml".

Looks like Ivy wants to force an ivy-[revision].xml naming convention. Trying to get around it with a pattern like http://repo.example.com/repo/[organization]/[module]/1.0-SNAPSHOT/[module]-[revision]-[artifact].xml throws a NullPointerException.