Using Groovy-Eclipse, Maven and Spock does not work

418 views
Skip to first unread message

Stefan Scheidt

unread,
Nov 12, 2010, 5:03:32 AM11/12/10
to Spock Framework - User
Hi,

I just tried to use Spock in a Maven based project together with
Groovy-Eclipse instead of the gmaven plugin. See
http://contraptionsforprogramming.blogspot.com/2010/09/where-are-all-my-stubs.html
and http://contraptionsforprogramming.blogspot.com/2010/10/more-on-groovy-eclipse-and-maven.html
for more info about Groovy-Eclipse.

Unfortunately, this combination does not work yet. The attempt to
build a project containing a spock spec result in:

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.108
sec <<< FAILURE!
initializationError(kata.movietickets.HelloSpockSpecs) Time elapsed:
0.007 sec <<< ERROR!
org.spockframework.runtime.InvalidSpecException: Specification
'kata.movietickets.HelloSpockSpecs' was not compiled properly (Spock
AST transform was not run); try to do a clean build

Building the project with gmaven works.

I'll try to get in touch with the Groovy-Eclipse developer and will
ask for help.

Stefan

Peter Niederwieser

unread,
Nov 12, 2010, 12:11:00 PM11/12/10
to spockfr...@googlegroups.com
Stefan,

this is almost certainly a Groovy Eclipse issue. Sounds like their command-line compiler doesn't support AST transforms (i.e. compiler plugins) yet. Please bring this up on the Groovy Eclipse list (http://groovy-eclipse-plugin.42567.n3.nabble.com/). I'll keep an eye on the thread and try to help where I can.

Cheers,
Peter

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To post to this group, send email to spockfr...@googlegroups.com.
To unsubscribe from this group, send email to spockframewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spockframework?hl=en.


----------------------------------------------------------------
Peter Niederwieser
Twitter: pniederw









Stefan Scheidt

unread,
Nov 14, 2010, 4:55:33 AM11/14/10
to Spock Framework - User

Stefan Scheidt

unread,
Nov 19, 2010, 3:54:59 AM11/19/10
to Spock Framework - User
Hi,

the groovy-eclipse-compiler team added support for compiler plugins
and AST transforms to the stand alone version of the compiler.
So now you can use groovy-eclipse-compiler in maven builds for
projects containing spock specs.

See http://jira.codehaus.org/browse/GRECLIPSE-889 and
http://groovy-eclipse-plugin.42567.n3.nabble.com/grovvy-eclipse-compiler-and-Maven-td1916008.html
for details.

Stefan
Reply all
Reply to author
Forward
0 new messages