2017-02-19 179 views
2

我正在尝试从grails 3.1.9更新到3.2.6的应用程序,但运行grails run-app时出现此错误。Grails - 从3.1.9升级到3.2.6

| Error Could not resolve all dependencies for configuration ':profile'. Type 'gradle dependencies' for more information 

该项目编译成功,但它给run-app错误。

我做gradle dependencies并发现它未能找到配置文件相关

profile 
\--- :web: -> org.grails.profiles:web:3.2.6 FAILED 

但是,当我刷新依赖它是成功的。

+0

看起来像你需要设置配置文件的3.2.5版本的Grails 3.2.6。 –

+0

是的,我将版本更改为3.2.1 –

+1

您不应该明确设置版本。如果您将来升级,则无法自动更新配置文件。 grails-bom应该根据grails版本自动选择正确的版本。 –

回答

-1

使用配置文件依赖这样

profile "org.grails.profiles:web"

时,会使用Grails的版本,这种依赖像3.2.6所以你需要明确设置版本

profile "org.grails.profiles:web:3.2.1"

更新

这个错误Error:(19, 0) No service of type StyledTextOutputFactory available in ProjectScopeServices.发生在intellij。为了解决这个错误,我们需要添加这个春天Dependency插件

id "io.spring.dependency-management" version "0.6.0.RELEASE" 

但随后上述问题发生,我张贴的问题。所以上面的解决方案工作

+1

这是不正确的。它应该使用grails-bom的版本,它可能与grails版本相同或不同 –