Hi, I am having troubles finding the "right way" to fetch some "native" dependencies with Ivy and I am hoping someone can point me in the right direction.
My project has a dependency on the org-jruby:jruby-core artifact http://mvnrepository.com/artifact/org.jruby/jruby-core/1.7.4. One of the jruby-core dependency is com.github.jnr:jffi http://mvnrepository.com/artifact/com.github.jnr/jffi/1.2.5 and jffi has also a "native" artifact which I need to fetch. By default, specifying a transitive dependency on jruby-core does not fetch the jffi-native artifact, just the "compile" scope jar file. jffi-native is in the "runtime" scope and so far the only way I was able to fetch it is using this dependency declaration: <dependency org="com.github.jnr" name="jffi" rev="1.2.5" conf="default"> <artifact name="jffi" type="jar" /> <artifact name="jffi" type="jar" m:classifier="native"/> </dependency> I tried using Ivy conf for compile and runtime but it does not fetch jffi-native. here's what I tried: <configurations> <conf name="compile" visibility="public" description="default dependencies" /> <conf name="runtime" visibility="public" description="runtime dependencies" /> </configurations> <dependencies> <dependency org="org.jruby" name="jruby-core" rev="1.7.4" conf="compile->default" transitive="true" /> <dependency org="org.jruby" name="jruby-core" rev="1.7.4" conf="runtime->default" transitive="true" /> </dependencies> When looking at the mvm dependency:tree we can see com.github.jnr:jffi:jar:native:1.2.7:runtime in the "runtime" scope. INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ jruby-core --- [INFO] artifact com.github.jnr:jffi: checking for updates from central [INFO] artifact com.github.jnr:jnr-x86asm: checking for updates from central [INFO] org.jruby:jruby-core:jar:1.7.4 [INFO] +- org.jruby:jruby-stdlib:jar:1.7.4:compile [INFO] +- org.jruby.joni:joni:jar:2.0.0:compile [INFO] +- com.github.jnr:jnr-netdb:jar:1.1.2:compile [INFO] +- com.github.jnr:jnr-enxio:jar:0.4:compile [INFO] +- com.github.jnr:jnr-unixsocket:jar:0.3:compile [INFO] +- com.github.jnr:jnr-posix:jar:2.5.2:compile [INFO] +- org.jruby.extras:bytelist:jar:1.0.10:compile [INFO] +- com.github.jnr:jnr-constants:jar:0.8.4:compile [INFO] +- org.jruby.jcodings:jcodings:jar:1.0.10:compile [INFO] +- com.github.jnr:jffi:jar:1.2.5:compile [INFO] +- org.yaml:snakeyaml:jar:1.11:compile [INFO] +- jline:jline:jar:2.7:compile [INFO] +- joda-time:joda-time:jar:2.1:compile [INFO] +- com.jcraft:jzlib:jar:1.1.2:compile [INFO] +- com.headius:invokebinder:jar:1.2:compile [INFO] +- com.github.jnr:jnr-ffi:jar:1.0.4:compile [INFO] | +- com.github.jnr:jffi:jar:native:1.2.7:runtime [INFO] | \- com.github.jnr:jnr-x86asm:jar:1.0.2:compile [INFO] +- junit:junit:jar:4.7:test [INFO] +- bsf:bsf:jar:2.3.0:provided [INFO] \- org.apache.ant:ant:jar:1.7.0:provided [INFO] \- org.apache.ant:ant-launcher:jar:1.7.0:provided I do not understand exactly why com.github.jnr:jffi:jar:native:1.2.7:runtime is not fetched when using the "runtime" conf with Ivy. What am I missing here? What would be the correct way to do this? Thanks, Colin
