Questions tagged [groovy-eclipse]

Groovy-Eclipse is the set of Eclipse plugins that provide Eclipse support for Groovy projects.

Groovy is a dynamic language which is based on the Java Virtual machine. Groovy supports standard Java constructs including annotations, generics, static imports, enums, varargs and in addition advanced language features as

Groovy is a dynamic language that runs on the JVM and is tightly integrated with the Java language. Groovy provides lots of simplifications compared to standard Java language features and advanced language features as properties, closures, native support for lists, maps and regular expressions, duck typing and the elvis operator.

Groovy is almost compatible to Java, e.g. almost every Java construct is valid Groovy code which makes the usage of Groovy for an experience Java programmer easy.

Related Links:

51 questions
7
votes
1 answer

Parameterized Groovy JUnit test-cases in Eclipse

I'm having trouble running a Parameterized Groovy JUnit test-case in Eclipse (see below for test code and environment details). Symptoms Right-clicking on the class in Package Explorer and doing Run As -> JUnit Test Case just brings up a dialog…
Oliver Charlesworth
  • 267,707
  • 33
  • 569
  • 680
6
votes
3 answers

Maven: Groovy-Eclipse Compiler plugin with Groovy 2.3.5

Since GMaven has been discontinued, I have been using Groovy-Eclipse Compiler plugin on my Maven projects. The version I used is 2.8.0-01 and I specifically used Groovy 2.1. I know 2.9.0-01-SNAPSHOT has been out for the longest time, but there's no…
limc
  • 39,366
  • 20
  • 100
  • 145
4
votes
1 answer

Eclipse can't create Groovy class in 4.3.2

I just installed Eclipse 4.3.2 (EE) and then immediately installed the Groovy plugin for it (from this link - I used http://dist.springsource.org/release/GRECLIPSE/e4.2/ as the plugin site). Upon restarting Eclipse I created a new Groovy Project,…
AdjustingForInflation
  • 1,571
  • 2
  • 26
  • 50
4
votes
2 answers

Maven wont pick up Spock tests

I've been trying to set up Maven to run my Spock (0.7) tests but to no avail. I've been trying to use groovy-eclipse-compiler as gmaven which is refered to in the Spock documentation is no longer recommended according to its' website. The relevant…
Keir
  • 440
  • 6
  • 15
3
votes
0 answers

Which compiler to use to compile java, aspectj, and groovy files in Intellij Idea?

I have a multi module project. There are java, aspects on aspectj and groovy. My problem is incorrect compilation of all this files together. If I choose Ajc compiler it can't compile groovy, if I choose Groovy-Eclipse compiler it can't compile…
Pavel
  • 31
  • 3
3
votes
4 answers

How to compile mixed java groovy project with AST transformations?

When I try to compile my project using groovy-eclipse compiler with following classes: import groovy.transform.builder.Builder // @author: m on 10.05.16 22:15. @Builder class F { int a } and public class B { int a; public static void…
3
votes
0 answers

Should Groovy @CompileStatic classes still include metaclass code?

I'm starting to incorporate some Groovy classes into my Maven-built Spring application, primarily to reduce boilerplate on a lot of classes that are POJOs and value objects. (For comparison, I've been using Roo to handle the boilerplate, but Roo is…
2
votes
1 answer

Groovy-Eclipse !in Operator marked as error

Using freshly installed Eclipse: Version: 2023-06 (4.28.0) Build id: 20230608-1333 and Eclipse Groovy Development Tools 5.0.0.v202306301519-e2306 with Groovy Compiler Version set to 3.0.18 the code if( methodNode.code !in BlockStatement )…
injecteer
  • 20,038
  • 4
  • 45
  • 89
2
votes
1 answer

Groovy compiler on Eclipse doesn't include version 2.4 anymore

I need to set up my Eclipse IDE again and unlike when I first set it up I have issues with the Groovy software. I would need the Groovy compiler version 2.4, but can only select between 2.5, 3.0 or 4.0. I used the same location as last time:…
2
votes
3 answers

Geb groovy simple setup, getting NoClassDefFoundError

I'm learning Geb (and Groovy) coming from a Java background, and I feel like I understand how Geb works, but I'm failing to even get the simplest configuration working. Basically, I'm getting the following error: Caught:…
xubean
  • 21
  • 3
1
vote
2 answers

Groovy-Eclipse Compilation Failed : Source level should be in '1.1'...'1.8','9'...'15' (or '5.0'..'15.0'): 17

I wanted to compile groovy along with java sources so I added groovy-eclipse-compiler to pom.xml but I got an error: Groovy-Eclipse: source level should be in '1.1'...'1.8','9'...'15' (or '5.0'..'15.0'): 17 pom.xml as follows:
1
vote
0 answers

While running jsonpath.getInt("element") ,I am facing error: java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.memoize.EvictableCache.getAndPut

I am working on REST Assured Automation and using JSONPATH to get element values using jsonpath.getInt("id") but asper error logs it seemed to be Groovy Error, Unable to resolve this issue. Can anyone please pitch in. …
1
vote
1 answer

JSON data into CSV using Groovy

{ "BRANCH": "master", "name": "customer", "product_name" : "PQ", "domain" : "Shopping", "_id": "12345" } Given a JSON file containing JSON data to convert into CSV/Excel using Groovy code. Anyone,…
1
vote
2 answers

Maven. Unable to compile module with groovy-eclipse compiler

I'm trying to perform migration of my project from java 8 to java 11. What I did in root pom.xml: Replaced 8 8 With 11 Configured maven-toolchain-plugin
1
vote
1 answer

Groovy compiling despite error in function arguments

Is this legal in Groovy? class RequestContext { def static requestContext def static setRequestContext(rc) { requestContext = rc } } Given the above I expect the following to fail at compile time using the…
Nightwolf
  • 4,495
  • 2
  • 21
  • 29
1
2 3 4