Re: What is the best replacement for running scripts using groovy-all?

2018-12-18 Thread Keith Suderman
Option 4) Use the Maven Assembly plugin or the Shade plugin to build your own 
groovy-all Jar file.  Or just use https://github.com/gradle/gradle-groovy-all 


- Keith


> On Dec 17, 2018, at 3:49 AM, Paul Moore  > wrote:
> 
> I use Groovy as a scripting language for small tasks, running on
> application servers that do not have very good scripting tools
> available, and to which I only have limited access. Prior to Groovy
> 2.5, I've used the groovy-all jar as a low-impact, easy to deploy
> scripting option. I run scripts as
> 
>java -cp .../groovy-all-2.4.x.jar;. groovy.ui.Main myscript.groovy
> 
> The advantages of this approach are:
> 
> 1. One-off deployment of a single binary file to the server, with all
> subsequent script deployments being text files (the actual scripts).
> 2. Works with whatever Java is present on the server.
> 3. Doesn't need to rely on any particular directory structure on the server.
> 4. Doesn't need source code to be held elsewhere (it's a
> run-from-source solution rather than a compiled binary).
> 
> Since Groovy 2.5, the -all jar has been discontinued - the release
> notes explain why, although the reasons don't really apply to me
> (getting something as modern as Java 1.9 on the machines I work with
> would be a miracle!) But they don't really offer a good replacement
> for my use case.
> 
> What's the best option for a situation like mine? Things I've considered are:
> 
> 1. Deploy the full Groovy lib directory and use "-cp
> groovy-2.5.x/lib/*;.". Probably the best option, but either requires
> copying the full lib directory around or hard-coding its path (at the
> moment, I can just dump a copy of the -all jar in the directory
> alongside my script).
> 2. Use the full install and the supplied bat file wrapper. As well as
> the same problem of hard coded paths/copying directories, I find bat
> file wrappers extremely problematic - as bat files don't nest, you
> have to remember to say "call groovy.bat ..." when running from a
> batch script - which frequently gets forgotten.
> 3. Compile my scripts with the needed Groovy jars embedded. This means
> every script needs to be deployed as a binary, and source needs
> managing. Also minor changes involve a full build-deploy cycle.
> 
> Ideally, I'd like a simple means of creating the old -all jar file.
> Even if it comes with warnings and limitations, that would be fine for
> me (at least, assuming the limitations aren't any worse than they were
> in 2.4.x). However, I'm *not* a Java developer, so unfortunately I
> don't know how to translate the comment from the release notes stating
> "We also provided a convenience "all" jar by jarjar’ing the core and
> "module" jars" into instructions for how I could create the -all jar
> file for myself. And the comment "we do provide an "all" pom" doesn't
> mean much to me either - I understand it's something to do with maven,
> but as I don't use tools like maven,. that's not much help to me...
> 
> If anyone can offer any suggestions, I'd be most grateful.
> 
> Paul



Re: [ANNOUNCE] Groovy 2.4.16 Windows Installer Released

2018-12-18 Thread Remko Popma
Blogged: https://blogs.apache.org/groovy/entry/groovy-2-4-16-windows

On Mon, Dec 17, 2018 at 2:51 AM Keegan Witt  wrote:

> The Windows installer for Groovy 2.4.16 is available from the usual
> place:
> https://bintray.com/groovy/Distributions/Windows-Installer/groovy-2.4.16-installer
> .
>
> -Keegan
>


Re: [ANNOUNCE] Apache Groovy 2.4.16 released

2018-12-18 Thread Remko Popma
Blogged: https://blogs.apache.org/groovy/entry/groovy-2-4-16-released


On Thu, Dec 13, 2018 at 7:17 PM Paul King  wrote:

> Dear community,
>
> The Apache Groovy team is pleased to announce version 2.4.16 of Apache
> Groovy.
> Apache Groovy is a multi-faceted programming language for the JVM.
> Further details can be found at the http://groovy.apache.org website.
>
> This release is a maintenance release of the GROOVY_2_4_X branch.
> While we recommend moving to the current 2.5.x releases (currently 2.5.4),
> for any users who can't upgrade to 2.5 and are using 2.4.x versions,
> we strongly recommend that you upgrade to this version.
>
> This release includes 18 bug fixes/improvements as outlined in the
> changelog:
>
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12318123=12342996
>
> Sources, convenience binaries, downloadable documentation and an SDK
> bundle can be found at: http://www.groovy-lang.org/download.html
> We recommend you verify your installation using the information on that
> page.
>
> Jars are also available within the major binary repositories.
>
> We welcome your help and feedback and in particular want
> to thank everyone who contributed to this release.
>
> For more information on how to report problems, and to get involved,
> visit the project website at https://groovy.apache.org/
>
> Best regards,
>
> The Apache Groovy team.
>