I've got an artifact in my local filesystem, but Ivy doesn't resolve it unless I put the <filesystem> resolver inside a <chain>. And it renames the artifact extension when it resolves it.
Here's my ivy.xml:
<ivy-module version="2.0">
<info organisation="apache" module="hello-ivy"/>
<dependencies>
<dependency org="myorg" name="mymodule" rev="1.1-SNAPSHOT"/>
</dependencies>
</ivy-module>
And here's my ivysettings.xml:
<ivysettings>
<settings />
<resolvers>
<filesystem name="local">
<artifact pattern="/path/to/my/artifact/[module]/dist/[module]-[revision].zip" />
</filesystem>
</resolvers>
</ivysettings>
My build.xml:
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="hello-ivy" default="deps">
<target name="deps" description="--> retrieve dependencies with ivy">
<ivy:settings file="ivysettings.xml"/>
<ivy:resolve />
<ivy:retrieve />
</target>
</project>
The artifact is a .zip file. It's in the right place and named correctly (in accordance with the <artifact>'s pattern attribute. But when I run ant, it fails to resolve the artifact:
[ivy:resolve] :::: WARNINGS
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: UNRESOLVED DEPENDENCIES ::
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: myorg#mymodule;1.1-SNAPSHOT: no resolver found for myorg#mymodule: check your configuration
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :::: ERRORS
[ivy:resolve] unknown resolver null
[ivy:resolve] no resolver found for myorg#mymodule: check your configuration
Why doesn't it find my module?
Then: if I put the <filesystem> element inside a <chain> element, it resolves:
[ivy:resolve] found myorg#mymodule;1.1-SNAPSHOT in local
[ivy:resolve] downloading /path/to/my/artifact/mymodule/dist/mymodule-1.1-SNAPSHOT.zip
[ivy:resolve] ..................(lots of dots here).....(37899kB)
[ivy:resolve] [SUCCESSFUL ] myorg#mymodule;1.1-SNAPSHOT!mymodule.jar (430ms)
So that's strange. Why did the <chain> make a difference? And BTW, why is my module now a JAR??? The source is a ZIP file, I swear. It's the right one, too - I just rebuilt the ZIP, and the latest changes are in my JAR file. Why did Ivy rename it?