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

1

3

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

                ::::::::::::::::::::::::::::::::::::::::::::::
Lanceolate answered 3/3, 2015 at 16:26 Comment(1)
possible duplicate of Grails unable to install pluginCereal
L
17

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/"
    }
    ...
}
Lanceolate answered 3/3, 2015 at 16:26 Comment(1)
There is a similar resolution to an alternate dependency problem here that may be of help too. https://mcmap.net/q/912814/-grails-2-3-7-plugins-repository-not-foundLanceolate

© 2022 - 2024 — McMap. All rights reserved.