Using Groovy++ with Maven – an update
In his comment to “Using Groovy++ with Maven” Joern Schimmelpfeng has correctly pointed out about transitive dependencies that may be added to
groovypp POM, eliminating the need to specify them explicitly.
He’s right! That’s what we have Maven dependencies mechanism for.
It is now fixed so you can use
<dependency> <groupid>org.mbte.groovypp</groupid> <artifactid>groovypp-all</artifactid> <version>0.2.0</version> </dependency>
<dependency> <groupid>org.mbte.groovypp</groupid> <artifactid>groovypp</artifactid> <version>0.2.0</version> </dependency>
Now it looks practically the same – what’s the difference then?
groovypp-all.jar contains all required libraries, repackaged in one jar:
In addition to
"org.codehaus.groovy" packages) and
"org.mbte.groovypp" package) it also contains
junit libraries, some of which are stored under modified package names to avoid collisions with libraries that may be available already in your project.
groovypp.jar is bound to all above libraries in separate jars, as declared by its
Which one to choose then?
- If your application has already declared
don’t like them packaged twice (note, even in this case – there are no collisions due to
packages modified), then you can choose the
It usually works better in IDEA project as it doesn’t recognize
Groovy and tries to search for it elsewhere.
Note: sometimes you may need to add an explicit
Maven brings old 3.8.2 JUnit version lacking classes required for Groovy++ compilation.
It can be seen in
groovyppexample above, see the diff of switching from
- If you just want to just use Groovy++ without dealing with JUnit versions and you
experience no Groovy-related IDEA problems – you can use