我试图让一个新的项目启动并运行使用私人artifactory gradle回购。我能够通过artifactory来解决工件问题,但是当我尝试将Spring引导到混合中时,Spring依赖关系管理插件在请求依赖关系时似乎不会添加版本,从而导致构建失败:弹簧依赖管理gradle插件与artifactory
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compileClasspath'.
> Could not find org.springframework.boot:spring-boot-starter-data-rest:.
Searched in the following locations:
https://my-website.com/artifactory/gradle-release/org/springframework/boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.pom
https://my-website.com/artifactory/gradle-release/org/springframework/boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.jar
https://my-website.com/artifactory/gradle-release/org.springframework.boot/spring-boot-starter-data-rest/ivy-.xml
https://my-website.com/artifactory/gradle-release/org.springframework.boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.jar
我可以看到文件在https://my-website.com/artifactory/gradle-release/org/springframework/boot/spring-boot-starter-data-rest/1.5.3.RELEASE/但看起来像“1.5.3.RELEASE”是不是做的URL路径或文件名。
我猜我的问题是在我的构建脚本 - 有人可以帮我找出问题吗?
的build.gradle:
plugins {
id 'java'
id 'io.spring.dependency-management' version '1.0.3.RELEASE'
id 'org.springframework.boot' version '1.5.3.RELEASE'
id 'com.jfrog.artifactory' version '4.4.18'
}
dependencyManagement {
imports {
mavenBom 'io.spring.platform:platform-bom:Brussels-SR2'
}
}
artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = 'gradle-release-local'
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
resolve {
repository {
repoKey = 'gradle-release'
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-data-rest'
compile 'org.springframework.boot:spring-boot-starter-hateoas'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.apache.commons:commons-lang3'
testCompile'org.springframework.boot:spring-boot-starter-test'
testCompile'org.springframework.restdocs:spring-restdocs-mockmvc'
}