Grails插件站点有旧版本的jquery datatables插件。我在这个网站的http://sourceforge.net/projects/jquerydatatable/?source=dlp上找到了1.9.4版本。
正在尝试将其安装到新项目中。安装插件命令从新版本的grails中删除。
已将jquery-datatables-1.9.4.zip文件复制到$HOME/.grails/ivy-cache/org.grails.plugins/jquery-datatables/zips
然后运行run-app,它没有安装插件。安装这个插件的正确方法是什么?
来自run-app命令的消息。
Configuring classpath
| Error Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:jquery-datatables:zip:1.9.4 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:jquery-datatables:zip:1.9.4 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:jquery-datatables:zip:1.9.4 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Could not find artifact org.grails.plugins:jquery-datatables:zip:1.9.4 in grailsCentral (http://repo.grails.org/grails/plugins)
| Run 'grails dependency-report' for further information.谢谢-SR
发布于 2014-02-05 08:08:29
我已经将插件升级到最新版本。并添加了legacyResolve true值来修复此错误消息。
这是我的BuildConfig.groovy文件
more grails-app/conf/BuildConfig.groovy |egrep -v '^$|//'
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.dependency.resolution = {
legacyResolve true
inherits("global") {
}
repositories {
grailsCentral()
}
dependencies {
}
plugins {
build( ":tomcat:7.0.47",
":release:3.0.1",
":rest-client-builder:1.0.3") {
export = false
}
}
}
cat application.properties
#Grails Metadata file
#Mon Feb 03 22:55:28 GMT-05:00 2014
app.grails.version=2.3.5
app.name=jquery-datatables
app.servlet.version=2.5
plugins.jquery=1.8.0发布于 2014-02-05 08:11:51
插件应该放到BuildConfig.groovy中,而不是安装插件添加它们的application.properties中。
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.8.3"
runtime ":resources:1.1.6"
// Added
compile ":jquery-ui:1.8.24"
}https://stackoverflow.com/questions/21516636
复制相似问题