I'm currently writing some groovy scripts. Till now I simply use notepad and run the scripts via groovy script.groovy
. But I'm looking some help for editing the files. So I tried eclipse with the groovy plugin which looks great...for groovy projects. But I just want to edit and run the groovy scripts. No Project dir etc.. What's the best way to handle scripts in eclipse. I don't want to package the files to jars or something like that. I have just a folder with some scripts in it... No src/bin directory or subfolders for package names. Is that possible?
Thanks, Ingo
Right-click the Groovy class, and select Run As Groovy Script from the context menu.
The Apache Groovy programming language allows for easy interoperability between the Java and Collibra libraries. To add support for Groovy syntax highlight and auto-completion in Eclipse: In the menu bar, click Help → Install New Software…. In the Available Software window, click Add.
Please upgrade to the Alpha version of the groovy-eclipse plugin V2. You can run all unit tests in a project by right-clicking and selecting Run as->JUnit. In the new version of the plugin, Junit tests are treated identically whether they are written in Java or Groovy.
You must convert your project to a Groovy project (right-click project: Configure > Convert to Groovy Project
), but then, sure, it's possible.
When editing a .groovy
file, select Run > Run as ... > Groovy Script
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With