Dan*_*lev 7 groovy intellij-idea maven spock
我一直在尝试使用IntelliJ IDEA中的Spock测试创建一个Groovy项目.
以下是我遵循的步骤:
Groovyc: Cannot compile Groovy files: no Groovy library is defined for module...
我可能错过了一些东西,因为我厌倦了在一半的时间里尝试不同的配置.
Mar*_*szS 13
对于完全groovy项目尝试GMavenPlus
示例项目:https://github.com/mariuszs/groovy-maven-sample
安装GMavenPlus IntelliJ插件.
IntelliJ不识别源目录. src/main/groovy,如下所示从项目设置 - >模块窗口手动配置:
组态
<project>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>1.0-groovy-2.4</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
21288 次 |
| 最近记录: |