Groovy文件不能在Intellij IDEA中编译 [英] Groovy file does not compile in Intellij IDEA

查看:455
本文介绍了Groovy文件不能在Intellij IDEA中编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Maven项目机智java和常规测试。
在命令行maven编译中,所有的测试都在运行,但在我的IDEA项目中(它是通过AutoImport maven projects自动创建的,IDEA将groovy文件复制到/ target / test-classes而不编译它们。

I have maven project wit java and groovy tests. In command line maven compilation all tests are running, but in my IDEA project (which is created automatically, by "AutoImport maven projects", IDEA copies groovy files to /target/test-classes without compiling them.

我的gmaven插件看起来像

My gmaven plugin looks like

    <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generateStubs</goal>
                            <goal>compile</goal>
                            <goal>generateTestStubs</goal>
                            <goal>testCompile</goal>
                        </goals>
                        <configuration>
                            <providerSelection>1.7</providerSelection>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>${groovy.version}</version>
                    </dependency>
                </dependencies>
            </plugin>


推荐答案

通过从头开始删除和创建IDEA项目文件)

Solved by removing and creating from scratch IDEA project (ipr file)

这篇关于Groovy文件不能在Intellij IDEA中编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆