之前的博文里曾使用GMaven插件编译Groovy/Spock,这次使用GMavenplus插件,更加方便。

具体步骤

1. 导入Spock和Groovy依赖

<dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>2.4.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>1.0-groovy-2.4</version>
            <scope>test</scope>
        </dependency>
        <!-- http://mvnrepository.com/artifact/org.spockframework/spock-spring -->
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-spring</artifactId>
            <version>1.0-groovy-2.4</version>
        </dependency>

 

2.配置GMavenPlus

<plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
View Code

相关文章:

  • 2021-10-19
  • 2022-12-23
  • 2021-07-02
  • 2021-10-30
  • 2022-12-23
  • 2019-11-17
  • 2019-11-18
  • 2022-12-23
猜你喜欢
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2021-10-19
  • 2022-12-23
相关资源
相似解决方案