I'm trying to ivy:install jogl and gluegen from maven to my local depository. I cannot get the native dependencies to install correctly.
My ivysettings is
<ivysettings>
<settings defaultResolver="central"
defaultConflictManager="all"
/>
<caches defaultCacheDir="${ivy.cache.dir}"
artifactPattern="[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"
/>
<resolvers>
<ibiblio name="central" m2compatible="true"
pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
/>
<filesystem name="depository">
<ivy pattern="${dest.repo.dir}/[organisation]/[module]/ivys/ivy-[revision](-[classifier]).xml" />
<artifact pattern="${dest.repo.dir}/[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]" />
</filesystem>
</resolvers>
</ivysettings>
My install target is
<ivy:install settingsRef="ivy.settings"
organisation="org.jogamp.jogl" module="jogl-all-main" revision="2.1.5-01"
from="${from.resolver}" to="${to.resolver}" transitive="true" overwrite="true" />
where from.resolver is central
and to.resolver is depository
.
The classifiers are e.g., native-windows-i586, native-linux-armv6, etc. The pom file in question is at http://repo1.maven.org/maven2/org/jogamp/jogl/jogl-all-main/2.1.5-01/jogl-all-main-2.1.5-01.pom
I correctly resolve jogl-all-main. When the dependencies are resolved, only the last one in the pom file is resolved, namely jogl-all-2.1.5-01-natives-windows-i586.jar. Is there any way to use the ivy:install task to install to my local depository from the maven central repository?
The short answer is that ivy has very limited support for additional artifact files associated with a Maven module.
I apologise for repeating myself, but you are best advised to run a Maven repository manager to cache remote Maven repositories. This avoids the necessity to compromise between differing formats.
Origin behind this restriction
A remote Maven POM does not explicitly list its module's artifacts. There is no limit on the number of possible classifier values.... The only assumption that can be made is that the module might contain an additional "javadoc" or "sources" artifact. (Common in open source projects).
The Maven documentation describes classifiers as follows:
Ivy repositories work differently. The module's ivy file has a publications section that explicitly lists the module's contents.
For a greater insight into how ivy interprets Maven repositories I would recommend the following posting.
Possible work-around
The following example uses the retrieve task to write out the downloaded dependencies into the desired repository format. The result is missing checksum files, but that may not matter.
ivy.xml
Notes:
build.xml