Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

                ::::::::::::::::::::::::::::::::::::::::::::::
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...