简体   繁体   中英

Adding groovy nature to a java project

I added groovy nature to my java project. My goal is to write Spock tests for my project. I'm using sts 3.6 and Grails. This messes up all my plain Junit test. Now I get a Classnotfoundexception everytime I run one. Also the compiler seems to be confused. It compiles groovy class as a java class. I understand that the problem is that my classes are not built but what I don't know is how to set up a compiler in a java/groovy project. A link, a help, a guide, a tutorial, an advice, all is welcome.

See the Spock example for a complete project that does what you want https://github.com/spockframework/spock-example

It uses both Gradle and Maven for demonstration purposes, but you can select either in your real application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM