Get machine readable actual path to dependencies' jar files from the command line


(Thomas Janu) #1

Hi there,

I was wondering about extending TPope’s VIM-Classpath plugin to also support gradle-using projects.

Problem is, for this I’d need some way to get the actual class path for executing something from the source, so the paths to all dependencies and either the build/classes directory or the produced jar in build/libs (by default, at least).

Is there a way to do that?
The already implemented support for maven-driven builds uses mvn dependency:build-classpath and some parsing of the actual pom.xml to get that data.
Short of using the gradle tooling api (which would be… unfortunate in this case - embedding a jvm in a VIM plugin just to get the class path…), is there a way?

The standard “dependencies”-target doesn’t cut it since I don’t need the maven coordinates but the the path to the actual physical file…

Thanks in advance.