Grails:刷新依赖关系 [英] Grails: refresh dependencies

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

问题描述

我正在使用STS,有时候我在崩溃时停止我的应用程序,它会打开一百个不同类的文件,这些文件似乎是深层内部的工作。 HTTPBuilder刚刚停止工作,我怀疑它是因为我不小心输入了这些文件之一,并没有意识到保存它。如果我以某种方式销毁了涉及HTTPBuilder的本地文件,我将如何刷新我的依赖关系? (已完成安装插件休息,也可以在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

更新:As我很想责怪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(将 logwarn更改为 logdebug )。一旦我们这样做,很明显,在Artifactory中的Grails repos似乎对于计算依赖关系的查询有不同的回应。要解决这些问题,我们:

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. 已添加 grailsRepohttp://grails.org/plugins BuildConfig

  3. 更改了我们的一个依赖关系,使其传递依赖关系使用具体版本,而不是版本范围。

  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.

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

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.

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

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