为CF添加这样的Cloud SDK:
compile "com.sap.cloud.s4hana:s4hana-all:${cloudSDKVersion}"
compile ("com.sap.cloud.s4hana.cloudplatform:scp-cf:${cloudSDKVersion}")
导致弹簧靴子罐中有重复的罐子,该罐子部署到CF。
例子:
core-2.3.1.jar
connectivity-2.3.1.jar
Comparing local files to remote cache...
Aborting push: File BOOT-INF/lib/core-2.3.1.jar has been modified since the start of push. Validate the correct state of the file and try again.
FAILED
答案 0 :(得分:5)
gradle在构建启动包时会跳过组件名称。
经过一番探索之后,解决方案是: https://github.com/spring-projects/spring-boot/issues/10778
bootJar {
rootSpec.filesMatching('**/*.jar', { jar ->
String groupId = jar.file.parentFile.parentFile.parentFile.parentFile.name
jar.name = "$groupId-${jar.name}"
})
}