Grails BuildConfig中的IntelliJ mavenLocal警告

Grails BuildConfig中的IntelliJ mavenLocal警告,grails,groovy,Grails,Groovy,此警告开始在IntelliJ中显示: “org.codehaus.groovy.grails.resolve.config.repositorisconfigurer”中的“mavenLocal”不能应用于“()” 下面是BuildConfig.groovy中的相关代码段 repositories { inherits true // Whether to inherit repository definitions from plugins grailsPlugins()

此警告开始在IntelliJ中显示:
“org.codehaus.groovy.grails.resolve.config.repositorisconfigurer”中的“mavenLocal”不能应用于“()”

下面是BuildConfig.groovy中的相关代码段

repositories {
    inherits true // Whether to inherit repository definitions from plugins
    grailsPlugins()
    grailsHome()
    grailsCentral()
    mavenLocal()
    mavenRepo "https://mycompany.artifactoryonline.com/mycompany/repo"
    mavenCentral()
}
环境:
OSX 10.6.8
Grails 2.0.3

IntelliJ 11.1.2

Repositories配置器中的mavenLocal方法定义如下:

void mavenLocal(String repoPath) {
    ...
}
是的,mavenLocal需要一个路径,但很高兴得到null,这意味着使用默认的存储库路径(.m2/repository,在用户主目录下)

据我所知,在本例中,mavenLocal()解析为调用mavenLocal(null)

mavenLocal可能应该改为

void mavenLocal(String repoPath = null) {
    ...
}

为了更清楚地表明repoPath是可选的,并消除IntelliJ中的警告,repositoriesConfigure中的mavenLocal方法定义如下:

void mavenLocal(String repoPath) {
    ...
}
是的,mavenLocal需要一个路径,但很高兴得到null,这意味着使用默认的存储库路径(.m2/repository,在用户主目录下)

据我所知,在本例中,mavenLocal()解析为调用mavenLocal(null)

mavenLocal可能应该改为

void mavenLocal(String repoPath = null) {
    ...
}

为了更清楚地说明repoPath是可选的,并消除IntelliJ中的警告,mavenLocal()是否需要某种类型的路径?除此之外,它如何知道在哪里可以找到本地maven?mavenLocal()是否需要某种路径?否则它怎么知道在哪里可以找到本地maven呢?我将代码更改为-mavenLocal(null)-错误消失了。谢谢我刚接到一个请求,并修复了这个问题。从Grails2.2开始,mavenLocal()将不再在IntelliJ中引起警告。我将代码更改为-mavenLocal(null)-错误消失了。谢谢我刚接到一个请求,并修复了这个问题。从Grails2.2开始,mavenLocal()将不再在IntelliJ中引起警告。