Spring最新版本从maven转向gradle,最近也在做项目构建工具的迁移。
之前项目使用了很多maven parent特性,极大简化的pom文件内容,很多公共部分得以复用。
转到gradle后,了解到有apply from 'a file url'特性,也能将公共内容进行剥离并在多个项目中复用。
现在遇到一个问题,不知到有没有解决方案或思路,具体如下:
build.gradle内容:
apply from: "./build-basic.gradle"
build-basic.gradle内容:
buildscript {
repositories {
maven { url 'https://repo.spring.io/plugins-snapshot' }
}
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:2.0.0-SNAPSHOT"
}
}
apply plugin: "io.spring.dependency-management"
使用gradle build会提示找不到plugin,具体如下:
Plugin with id 'io.spring.dependency-management' not found.