这是Pascal答案的精炼版。我将主插件版本升级为1.2,将对Groovy 1.7的依赖项升级到了pluginManagement标记中,以便很好地利用继承模型。
请记住,GMaven插件的1.3-SNAPSHOT已经开始使用1.7-rc2 Groovy提供程序。
<!-- I wrapped everything in a plugin management section so that this can be neatly inherited across all your poms --><pluginManagement> <plugins> <plugin> <groupId>org.prehaus.gmaven</groupId> <artifactId>gmaven-plugin</artifactId> <!-- Notice I upgraded it to 1.2 --> <!-- Details here http://repo1.maven.org/maven2/org/prehaus/gmaven/gmaven-plugin/1.2/gmaven-plugin-1.2.pom --> <version>1.2</version> <dependencies> <dependency> <groupId>org.prehaus.gmaven.runtime</groupId> <artifactId>gmaven-runtime-1.7</artifactId> <version>1.2</version> </dependency> </dependencies> </plugin> </plugins></pluginManagement>



