<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.1.6</version>
</dependency> eclipse
和 編譯插件 maven
<plugin> ui
<artifactId>maven-compiler-plugin</artifactId> <!-- 2.8.0-01 and later require maven-compiler-plugin 3.1 or higher --> <version>3.1</version> <configuration> <compilerId>groovy-eclipse-compiler</compilerId> <!-- set verbose to be true if you want lots of uninteresting messages --> <!-- <verbose>true</verbose> --> </configuration> <dependencies> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-eclipse-compiler</artifactId> <version>2.8.0-01</version> </dependency> <!-- for 2.8.0-01 and later you must have an explicit dependency on groovy-eclipse-batch --> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-eclipse-batch</artifactId> <version>2.1.8-01</version> <!-- or choose a different compiler version --> <!-- <version>1.8.6-01</version> --> <!-- <version>1.7.10-06</version> --> </dependency> </dependencies> </plugin>