Paul, The best solution is to use Maven or Gradle to create an all-in-one (fat) jar that you can ship and run with java -jar
Gradle has a shadow plugin and Maven has a shade plugin to do just that. James > On Dec 19, 2018, at 4:19 PM, Paul Moore <p.f.mo...@gmail.com> wrote: > > On Wed, 19 Dec 2018 at 20:18, Søren Berg Glasius <soe...@glasius.dk> wrote: >> >> Hi Paul, >> >> This is where The @Grab anotation comes in handy: >> http://docs.groovy-lang.org/latest/html/documentation/grape.html >> >> It wil automatically download your dependencies and it works in Groovy >> scripts too. > > Thanks - yes, I've seen @Grab, and used it while testing. But the > problem is that it puts the dependency files "somewhere", but not > alongside the script. I need to ship the script and its dependencies > to another machine with no web access, so I need better control over > where the dependencies end up. (I could probably hunt out where the > files downloaded by @Grab went, but it would be a completely manual > task to locate them all and copy them, and mistakes would happen - so > I'd prefer something automated. > > Paul