Grails:刷新依赖项 [英] Grails: refresh dependencies

查看:19
本文介绍了Grails:刷新依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 STS,有时当我在崩溃时停止我的应用程序时,它会打开一百个不同的类文件,这些文件似乎是深入内部工作的东西.HTTPBuilder 刚刚停止工作,我怀疑是因为我不小心输入了其中一个文件并心不在焉地保存了它.如果我以某种方式销毁了 HTTPBuilder 中涉及的本地文件,我将如何刷新我的依赖项?(已完成 install-plugin rest 并取消注释 BuildConfig.groovy 存储库中的所有内容)

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 stopped working, and I suspect its because I accidentally typed in one of these files and absent mindedly saved it. If I somehow destroyed a local file involved in HTTPBuilder, how would I refresh my dependencies? (have done install-plugin rest and also uncommented everything in BuildConfig.groovy repositories)

我的具体问题和错误在这里:Grails:HTTPBuilder 突然停止工作

My specific problem and error is here: Grails: HTTPBuilder stopped working suddenly

更新:尽管我很想责怪 STS,正如您从我对我自己的另一个问题的回答中看到的那样,我纯粹是因为自己的粗心大意而受挫.

UPDATE: As much as I would love to blame STS, as you can see from my answer to my own other question, I was purely thwarted by my own carelessness.

推荐答案

我们今天遇到了一个问题,我们怀疑是由于 Artifactory 迁移.您的问题可能与此类似.我们为诊断问题所做的第一件事是打开 BuildConfig.groovy 中的调试日志记录(将 log "warn" 更改为 log "debug").一旦我们这样做了,很明显 Artifactory 中的 Grails 存储库似乎对计算依赖项的查询做出不同的响应.为了解决这些问题,我们:

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. 从 BuildConfig 中移除了 grailsCentral、grailsHome 和 grailsPlugins
  2. 在 BuildConfig 中添加了 grailsRepo "http://grails.org/plugins"
  3. 更改了我们的一个依赖项,使其传递依赖项使用特定版本而不是版本范围.

对于 3,我们的具体示例是更改:

For 3, our specific example was to change:

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

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.

这篇关于Grails:刷新依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆