gradle'dependencies.dependency.version'丢失

时间:2019-04-10 09:24:42

标签: maven gradle dependency-management

使用插件io.spring.dependency-management,我的某些依赖项版本是从其他依赖项中扣除的

id("io.spring.dependency-management") version "1.0.6.RELEASE"
dependencyManagement {
    imports {
        mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
    }
}

使用gradlew clean build install

使用不包含许多依赖版本的pom安装jar。

运行依赖于第一个JAR的另一个子模块的构建,结果为:

Errors occurred while build effective model from C:\APPLIS\HELIOSDEV\repo\com\sfr\ext_ope\library_ext_ope_admin\
0.0.1-SNAPSHOT\library_ext_ope_admin-0.0.1-SNAPSHOT.pom:
'dependencies.dependency.version' for io.github.jhipster:jhipster-framework:jar 
is missing. in com.sfr.ext_ope:library_ext_ope_admin:0.0.1-SNAPSHOT

如何强制构建将版本添加到生成的pom中?

1 个答案:

答案 0 :(得分:1)

dependencyManagement部分移至allprojects {}而不是subprojects {}修复了我在io.spring.dependency-management:1.0.9.RELEASE上的项目的相同问题