Search code examples
grailsivyshagrails-2.0buildconfig

Grails 2.0: Invalid SHA1


Often I get and invalid SHA1 error when executing run-app in Grails 2.0.0.RC1, especially with depedencies to our pwn products/modules.

I have found the following Jira case: http://jira.grails.org/browse/GRAILS-7313

Unfortunately the following line in BuildConfig.groovy

ivySettings.setVariable("ivy.checksums", "")

results in the error:

| Error There was an error loading the BuildConfig: No signature of method: groovy.util.ConfigObject.setVariable() is applicable for argument types: 
(java.lang.String, java.lang.String) values: [ivy.checksums, ] (Use --stacktrace to see the full trace)

Regards

Jonas


Solution

  • ivySettings.setVariable("ivy.checksums", "")
    

    should work if you put it inside the resolution closure e.g.

    grails.project.dependency.resolution = {
        ivySettings.setVariable("ivy.checksums", "")
    }
    

    but

    grails.project.dependency.resolution = {
        checksums false
    }
    

    is the right way to do it for Grails 2.0 and later.