maven - gradle 'dependencies.dependency.version' for 丢失

标签 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 中添加版本?

最佳答案

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

关于maven - gradle 'dependencies.dependency.version' for 丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55609093/

相关文章:

android - 设置输出文件名/Gradle 时不支持绝对路径

swift 包管理器 : "multiple targets named..."

maven - 在 Gradle 中强制传递依赖版本

git - 为所有项目生成源和更新文件夹

eclipse - “构建工作空间”遇到错误

java - 尝试为 Spring、Spring WebFlow、Hibernate 等设置我的第一个 Maven POM,但出现错误

java - Maven/Nexus - 自动依赖更新

Android gms.google.services 版本 (15.0.1) 与 Firebase Core 16.0.0 冲突

gradle - 使用复合Gradle构建时发生异常

maven - 在 Maven 可选依赖项中指定版本