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

时间:2016-08-15 02:54:49

标签: grails dependency-management grails-plugin

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

  • Spring Security Core
  • Spring Security UI
  • 碧玉

但是我无法安装任何一个。

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.

环境:

  • Grails 2.4.5
  • Java 1.8.0_101
  • IntelliJ IDEA 15.0
  • Windows 10

1 个答案:

答案 0 :(得分:3)

由于错误是针对无法找到的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'
}