Grails: refresh dependencies

后端 未结 1 822
甜味超标
甜味超标 2021-01-07 10:03

I am using STS and sometimes when I stop my app on a crash it opens up to a hundred different class files that seem to be deep deep inner working stuff. HTTPBuilder just st

1条回答
  •  南笙
    南笙 (楼主)
    2021-01-07 10:35

    We had an issue today that we suspect was due to the Artifactory Migration. Your problem may be similar. The first thing we did to diagnose the issue was to turn up the debug logging in BuildConfig.groovy (change log "warn" to log "debug"). Once we did that, it was evident that the Grails repos in Artifactory appear to be responding differently to queries made to calculate dependencies. To workaround these issues, we:

    1. Removed grailsCentral, grailsHome, and grailsPlugins from BuildConfig
    2. Added grailsRepo "http://grails.org/plugins" to BuildConfig
    3. Changed one of our dependencies so that its transitive dependencies used specific versions instead of version ranges.

    For 3, our specific example was to change:

    runtime 'com.amazonaws:aws-java-sdk:1.3.4'
    

    to

    runtime 'com.amazonaws:aws-java-sdk:1.3.4', {
                excludes "commons-logging",
                    "httpclient", "jackson-core-asl", "jackson-mapper-asl"
            }
    runtime 'org.codehaus.jackson:jackson-core-asl:1.7.9' {
            configurationmapping "*->*,!sources,!javadoc"
        }
        runtime 'org.codehaus.jackson:jackson-mapper-asl:1.7.9' {
            configurationmapping "*->*,!sources,!javadoc"            
        }
    

    I'm not sure whether all of these steps were necessary, but they allowed us to move forward.

    0 讨论(0)
提交回复
热议问题