我有一個使用Spring Boot + Vaadin的Gradle項目。 這樣構成的搖籃插件彈簧引導和Vaadin如下:在Vaadin Gradle項目中升級Spring Boot版本時出錯
dependencies {
compile 'com.vaadin:vaadin-spring-boot-starter:1.0.0'
compile 'com.vaadin:vaadin-server:${vaadin.version}'
compile 'com.vaadin:vaadin-client:${vaadin.version}'
...
}
此:
vaadin {
version '7.6.8'
widgetset 'com.vaadin.DefaultWidgetSet'
}
Vaadin依賴規定如下:
buildscript {
ext {
springBootVersion = '1.3.7.RELEASE'
}
...
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "fi.jasoft.plugin:gradle-vaadin-plugin:0.11.1"
}
}
的Vaadin版本規定如下:工作正常,但只要我將Spring Boot版本更改爲
springBootVersion = '1.4.0.RELEASE'
然後我得到的錯誤:
Illegal character in path at index 89: https://oss.sonatype.org/content/repositories/vaadin-snapshots/com/vaadin/vaadin-server/ ${vaadin.version}/vaadin-server-${vaadin.version}.pom
更新
的Groovy(其中搖籃使用)支持路線插值使用雙引號只有在(「),以便改變Vaadin依賴於
dependencies {
compile "com.vaadin:vaadin-spring-boot-starter:1.0.0"
compile "com.vaadin:vaadin-server:${vaadin.version}"
compile "com.vaadin:vaadin-client:${vaadin.version}"
...
}
修復它。現在真正的問題是爲什麼如果我將Spring Boot降級到1.3.7-RELEASE
,單引號工作正常。
我不是gradle這個專家,但在快速瀏覽,它看起來像它不是代替'$ {vaadin.version}'的'編譯「融爲一體。 vaadin:vaadin服務器:$ {vaadin.version}''。你可以嘗試用雙引號(''')替換[單引號(''']](http://stackoverflow.com/questions/6761498/whats-the-difference-of-strings-within-single-or -double-quotes-in-groovy)?這對我本地的快速測試非常有用,否則你可以共享整個構建文件嗎? – Morfic
同時我也想到了這一點:它的確適用雙引號,但它也可以用單引號和Spring Boot版本一起工作......不知道這兩者是如何相關的。 – herman
嗯,只是一個瘋狂的想法,也許deps已經在本地回購,所以它不需要重新下載,直到你切換到更新的啓動版本?!奇怪的無論如何... – Morfic