我有一个使用Spring Boot 2.0.1的项目,它依赖于另一个使用Spring Boot 1.5.3的项目。
当我构建一个独立的Jar时,我得到一个错误,Gradle无法解压缩一个POM文件。
Execution failed for task ':stubs:fatJar'.
> Could not expand ZIP '/Users/myusername/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-dependencies/1.5.3.RELEASE/2c172c7484dae0a4190847f98d619a0221d3a849/spring-boot-dependencies-1.5.3.RELEASE.pom'.发布于 2019-02-20 21:59:10
只需使用旧版本的Spring Boot从项目中排除Spring依赖项即可。
compile('com.mycompany.api:my-api:1.0.20') {
exclude(module: 'spring-boot-dependencies')
exclude(module: 'spring-boot-starter-web')
}https://stackoverflow.com/questions/54788119
复制相似问题