Reactor bom dependency broken for spring boot 2.4.0-SNAPSHOT (https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-dependencies/2.4.0-SNAPSHOT/spring-boot-dependencies-2.4.0-20200915.133154-449.pom)
Getting the below error -
Could not resolve: org.springframework.boot:spring-boot-starter-data-jpa Could not resolve: org.springframework.boot:spring-boot-starter-mail Could not resolve: org.springframework.boot:spring-boot-starter-quartz Could not resolve: org.springframework.boot:spring-boot-starter-validation Could not resolve: org.springframework.boot:spring-boot-starter-log4j2 Could not resolve: org.springframework.boot:spring-boot-starter-jetty Could not resolve: org.springframework.boot:spring-boot-starter-web Could not resolve: org.springframework.session:spring-session-core
Attached the build.gradle file
Comment From: bclozel
Maybe a missing repository definition for maven { url 'https://repo.spring.io/milestone' }
in your settings.gradle
file?
Could you look at a freshly generated project on start.spring.io to check for issues in your build?
If this doesn't solve the issue, please provide a sample project that reproduces the problem.
Thanks!
Comment From: arixion
Maybe a missing repository definition for
maven { url 'https://repo.spring.io/milestone' }
in yoursettings.gradle
file? Could you look at a freshly generated project on start.spring.io to check for issues in your build?If this doesn't solve the issue, please provide a sample project that reproduces the problem.
Thanks!
Let me setup a sample project quickly and check.
Comment From: arixion
Thanks @bclozel for pointing out. I got it working. My settings.gradle
file already had the entry maven { url 'https://repo.spring.io/milestone' }
-
pluginManagement {
repositories {
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://repo.spring.io/release' }
gradlePluginPortal()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == 'org.springframework.boot') {
useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}")
}
}
}
}
include "hourglass-app"
rootProject.name = 'hourglass'
rootProject.children.each {project ->
project.buildFileName = "${project.name}.gradle"
}
but the maven { url 'https://repo.spring.io/milestone' }
also had to made in the repositories section as below -
plugins {
id "eclipse"
id "org.springframework.boot" version "2.4.0-SNAPSHOT" apply false
id "io.spring.dependency-management" version "1.0.10.RELEASE" apply false
}
configure(allprojects) { project ->
apply plugin: "io.spring.dependency-management"
apply plugin: "org.springframework.boot"
dependencyManagement {
imports {
mavenBom "com.fasterxml.jackson:jackson-bom:2.11.0"
mavenBom "org.junit:junit-bom:5.6.2"
}
dependencies {
dependency "org.apache.commons:commons-lang3:3.10"
}
}
repositories {
jcenter()
mavenCentral()
maven { url "https://repo.spring.io/release" }
maven { url "https://repo.spring.io/snapshot" }
maven { url 'https://repo.spring.io/milestone' }
}
configurations.all {
exclude module : 'spring-boot-starter-logging'
resolutionStrategy {
cacheChangingModulesFor 0, "seconds"
cacheDynamicVersionsFor 0, "seconds"
}
}
}
configure([rootProject] + subprojects) { project ->
group "org.hourglass"
apply plugin: "java"
apply plugin: "java-test-fixtures"
apply plugin: "checkstyle"
apply from: "${rootDir}/gradle/ide.gradle"
dependencies {
compileOnly "org.projectlombok:lombok:1.18.12"
annotationProcessor "org.projectlombok:lombok:1.18.12"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.junit.jupiter:junit-jupiter-engine"
}
test {
useJUnitPlatform()
}
}
Only one thing is not clear to me if I am only using the SNAPSHOT and RELEASE versions (mentioned in the plugin section), why do we also need to add the Milestone as dependencies ? If that is not an issue and is expected for the current/all snapshot release then we can close this issue.
For reference you can use the below sample project. hourglass.zip
Comment From: bclozel
All SNAPSHOT versions can also depend on MILESTONE versions (here, Reactor or Spring Framework) so this is the expected behavior, at least with the way we're organizing our artifact repositories right now.
In doubt, you can always generate a project on start.spring.io (or just explore it really) and check things out.
Thanks!
Comment From: arixion
All SNAPSHOT versions can also depend on MILESTONE versions (here, Reactor or Spring Framework) so this is the expected behavior, at least with the way we're organizing our artifact repositories right now.
In doubt, you can always generate a project on start.spring.io (or just explore it really) and check things out.
Thanks!
Ok thanks for the clarification :+1: