3

我们有一个 Grails 2.2.4 项目,我正在寻求做一些工作。六个月以来一直没有对其进行任何工作,但当时它构建得很好。

当我现在尝试运行时,grails clean我得到了许多 UNRESOLVED DEPENDENCIES 错误。尽管几个月前所有依赖项都工作得很好。在那段时间内,存储库方面是否发生了变化?

我已log "warn"按照错误消息的建议将 BuildConfig.groovy 中的日志级别更改为。有趣的是,当我尝试通过浏览器下载构建尝试解析的一些 URL 时,它们下载得很好。我不确定为什么构建过程无法下载。

 ==== grailsCentral: tried

          http://grails.org/plugins/grails-quartz/tags/RELEASE_1.0.2/quartz-1.0.2.pom

          -- artifact org.grails.plugins#quartz;1.0.2!quartz.zip:

          http://grails.org/plugins/grails-quartz/tags/RELEASE_1.0.2/grails-quartz-1.0.2.zip

以下是用于解决但现在不解决的所有依赖项:

                ::::::::::::::::::::::::::::::::::::::::::::::

                ::          UNRESOLVED DEPENDENCIES         ::

                ::::::::::::::::::::::::::::::::::::::::::::::

                :: org.grails.plugins#asset-pipeline;2.1.3: not found

                :: org.grails.plugins#less-asset-pipeline;2.0.8: not found

                :: org.grails.plugins#rest;0.8: not found

                :: org.grails.plugins#quartz;1.0.2: not found

                ::::::::::::::::::::::::::::::::::::::::::::::
4

1 回答 1

16

It looks like the default grails repo provided in 2.2 does not work now. We fixed this issue by adding the following line to the grails.project.dependency.resolution closure in the BuildConfig.groovy file:

grails.project.dependency.resolution = {
    /** Existing stuff here **/
    repositories {
        /** Other repos stay here **/

        //--------  NEW REPO TO ADD IS BELOW --------//
        mavenRepo "http://repo.grails.org/grails/repo/"
    }
    ...
}
于 2015-03-03T16:26:38.880 回答