download dependencies and ouput build classpath

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

download dependencies and ouput build classpath

Jon Harper
Hi list,

Is there a way to tell maven to download all dependencies and output a
classpath for a given artifact (or a list of artifacts) without having to
create a project and its pom ?

The use case is to prototype or check classes with jshell. I would ideally
want something like but
without a pom:

Something like:
jshell --class-path $( mvn dependency:build-classpath -DincludeTypes=jar \
    -q -Dmdep.outputFile=/dev/stdout

I've seen try-artifact or the maven-jshell-plugin but I want to use
something simpler (and more composable)

Thanks in advance,

ps: it would also be useful to be able to display the dependency:tree of a
given artifact without a pom. I suspect many more commands could be
usefull. I'm mentioning this since it's the same maven-dependency-plugin..