Grails 2.2.x unresolved dependencies without any changes to previously working build

ぐ巨炮叔叔 提交于 2019-11-28 09:00:04

问题


We have a Grails 2.2.4 project that I was looking to do some work on. There has been no work done on it for six months, but it built just fine back then.

When I try to run grails clean now I get a host of UNRESOLVED DEPENDENCIES errors. This is despite all dependencies working just fine a few months ago. Has something changed within that time on the repository side?

I have changed the log level within BuildConfig.groovy to log "warn" as suggested by the error message. The interesting thing from this is when I try to download via a browser some of the URLs that the build tries to resolve, they download fine. I'm not sure why the build process can't download.

 ==== 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

Here are all the dependencies that used to resolve that don't now:

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

                ::          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

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

回答1:


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/"
    }
    ...
}


来源:https://stackoverflow.com/questions/28836824/grails-2-2-x-unresolved-dependencies-without-any-changes-to-previously-working-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!