2017-02-19 180 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版本相同或不同 –