我正在尝试安装joda-time以在当前的grails应用程序中使用,我使用以下命令:

plugins {
    compile "org.jadira.usertype:usertype.jodatime:1.9"

}

当我尝试编译时,它给出了愚蠢的错误
Loading Grails 2.3.0
| Configuring classpath
| Error Resolve error obtaining dependencies: Could not find artifact org.jadira.usertype:usertype.jodatime:zip:1.9 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.jadira.usertype:usertype.jodatime:zip:1.9 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.jadira.usertype:usertype.jodatime:zip:1.9 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Could not find artifact org.jadira.usertype:usertype.jodatime:zip:1.9 in grailsCentral (http://repo.grails.org/grails/plugins)
| Run 'grails dependency-report' for further information.

有解决方案的人吗?

最佳答案

您应该在mavenCentral()中添加一些额外的存储库,然后编译“org.jadira.usertype:usertype.jodatime:1.9”

  mavenCentral()
    mavenRepo "http://repo.grails.org/grails/libs-releases/"
    mavenRepo "http://m2repo.spockframework.org/ext/"
    mavenRepo "http://m2repo.spockframework.org/snapshots/"
}

dependencies {

    // runtime 'mysql:mysql-connector-java:5.1.22'
    compile "org.jadira.usertype:usertype.jodatime:1.9"
}

希望有帮助!

10-07 12:26