You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to know how to exclude a specific dependency from spring boot dependencies in gradle. I am asking this because due to internal restriction and licensing, I can't pull com.oracle.database.jdbc:ojdbc-bom. Despite trying all exclusion recommendation out there, including instruction from spring boot gradle plugin page, none of them seems to be able to alter detachedConfiguration. I get this error no matter what.
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':detachedConfiguration24'.
> Could not find com.oracle.database.jdbc:ojdbc-bom:21.3.0.0.
My build.gradle:
plugins {
id 'org.springframework.boot' version '2.6.2'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group =''
version ='1.0.0'
sourceCompatibility ='17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
configurations.all {
exclude group: 'com.oracle.database.jdbc', module: 'ojdbc-bom'
}
repositories {
... // some internal repo that mimic mavenCentral() but with licensing restriction
}
bootJar {
enabled =false
}
jar {
enabled =true
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc'
implementation 'io.r2dbc:r2dbc-postgresql'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
}
test {
useJUnitPlatform()
}
The text was updated successfully, but these errors were encountered:
@voduku that feels like a question for the dependency management plugin, not Spring Boot. If you haven't found what you're looking for in the reference documentation, I'd suggest asking on StackOverflow first.
I would like to know how to exclude a specific dependency from spring boot dependencies in gradle. I am asking this because due to internal restriction and licensing, I can't pull
com.oracle.database.jdbc:ojdbc-bom
. Despite trying all exclusion recommendation out there, including instruction from spring boot gradle plugin page, none of them seems to be able to alterdetachedConfiguration
. I get this error no matter what.My
build.gradle
:The text was updated successfully, but these errors were encountered: