Il 18/05/20 16:29, OCsite ha scritto:
Or am I wrong and there is some magic which would prevent this scenario?

Your application will fail at compilation time if some JAR is missing. If you plan to run with Groovy 3.x binary code previously compiled with Groovy 2.4.x, then yes, it could fail at runtime if some JAR is missing.

Regarding this:

Well thanks, but I do not even know what Maven or Gradle is. I presume those probably would be build systems, which both could generate the proper groovy-all JAR, right? Systems presumably well-known and used daily by all those who maintain and improve Groovy itself (kudos to you all!), but of no use for us who only use Groovy to build other applications and who need just groovyc to compile, plus standard jar to pack the result and standard java to launch it.

I know this is not the answer you'd like to get, but the use of build tools like Maven or Gradle is today the de facto standard when talking about building, running and deploying JVM applications, so not only just libraries like Groovy. I have been using Gradle for something like 10 years now for my applications, both standalone and webapps, as well for my libraries. You should really consider to have a look at it, once you've read some documentation you'll see it's not so much of a overhead... probably just a text file of few lines where you declare your dependencies (Groovy and anything else). And that text file can be written in Groovy!

With a tool like that, replacing the groovy-all:2.4.x with groovy-all:3.0.x dependency for your Groovy application is about changing 2/3 characters in that text file: you'll simply get many small JARS rather than just one big JAR, automatically. Or even pack all in a big fat JAR, with just another line in that text file and one command.

Mauro

Reply via email to