The Aether library is doing exactly what you are looking for http://www.eclipse.org/aether/
p On Wed, Jul 15, 2015 at 1:04 AM, Richard Heintze <sieg_hein...@yahoo.com> wrote: > > Can someone help me get started with a little groovy program that will > (1) ingest a maven pom.xml > (2) construct the dependency tree > (3) download dependencies into the local maven repository if needed > (4) construct the class path strings that includes all the dependent jars > and display this so I can use it with the java command to run the java > program with this bash syntax > > java -cp `getClassPath.groovy ./pom.xml` abc.def.main > > This would be very handy for running command line utilities like the derby > toolkit command line and the flyway command line utility. > > Thanks > Siegfried >