Grails - 无法从 grailsCentral 安装任何插件

Grails - Cannot install any plugin from grailsCentral

我正在尝试安装这些插件:

但是我无法安装它们中的任何一个。

compile 'org.grails.plugins:spring-security-core:2.0.0'行添加到BuildConfig.groovy时产生以下错误:

"C:\Program Files\Java\jdk1.8.0_101\bin\java" -Dgrails.home=C:\grails-2.4.5 -Dbase.dir=C:\Users\Usuario\IdeaProjects\SCHLUMBERGER_SURENCO\sfceSchlumbergerSurenco "-Dtools.jar=C:\Program Files\Java\jdk1.8.0_101\lib\tools.jar" -Dgroovy.starter.conf=C:\grails-2.4.5/conf/groovy-starter.conf -Xmx768M -Xms768M -XX:MaxPermSize=256m -XX:PermSize=256m -Djline.WindowsTerminal.directConsole=false -Dfile.encoding=UTF-8 -classpath C:\grails-2.4.5\lib\org.codehaus.groovy\groovy-all\jars\groovy-all-2.3.11.jar;C:\grails-2.4.5\dist\grails-bootstrap-2.4.5.jar org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf C:\grails-2.4.5/conf/groovy-starter.conf "idea-print-project-settings -plain-output"|Loading Grails 2.4.5
|Configuring classpath
Error |
Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:spring-security-core:jar:2.0.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:spring-security-core:jar:2.0.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:spring-security-core:jar:2.0.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Could not find artifact org.grails.plugins:spring-security-core:jar:2.0.0 in grailsCentral (https://repo.grails.org/grails/plugins)
|Run 'grails dependency-report' for further information.

compile 'org.grails.plugins:jasper:1.11.0'行添加到BuildConfig.groovy时产生以下错误:

Error |
Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:jasper:jar:1.11.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:jasper:jar:1.11.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:jasper:jar:1.11.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Could not find artifact org.grails.plugins:jasper:jar:1.11.0 in grailsCentral (https://repo.grails.org/grails/plugins)
|Run 'grails dependency-report' for further information.

环境:

由于错误是针对找不到的 jar,看起来您将插件依赖项语句放在 dependencies 块中,但它们应该在 plugins 块中。您也可以在指定插件时省略 "org.grails.plugins",因为这是默认值:

plugins {
   compile ':spring-security-core:2.0.0'
   compile ':spring-security-ui:1.0-RC3'
   compile ':jasper:1.11.0'
}