groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Kleeh <>
Subject Re: What is the best replacement for running scripts using groovy-all?
Date Wed, 19 Dec 2018 21:23:30 GMT

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.


> On Dec 19, 2018, at 4:19 PM, Paul Moore <> wrote:
> On Wed, 19 Dec 2018 at 20:18, Søren Berg Glasius <> wrote:
>> Hi Paul,
>> This is where The @Grab anotation comes in handy:
>> 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

View raw message