Skip to content

Commit f143221

Browse files
committed
fix: make azure-identity an optional dependency to reduce dependency footprint
- Changed azure-identity from 'api' to 'compileOnly' in redis-om-spring module - Added gson as 'compileOnly' since it was previously included transitively - Added azure-identity as 'compileOnly' to redis-om-spring-ai module - Updated roms-amr-entraid demo to explicitly include required Azure dependencies This reduces the dependency footprint for non-Azure users and prevents potential version conflicts with nimbus-jose-jwt when using maven-enforcer-plugin. Users requiring Azure Entra ID support need to explicitly add: - com.azure:azure-identity - com.google.code.gson:gson Fixes #652
1 parent cd36b2a commit f143221

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

demos/roms-amr-entraid/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ repositories {
3131
dependencies {
3232
implementation project(':redis-om-spring')
3333

34+
// Azure Identity for Entra ID authentication
35+
implementation "com.azure:azure-identity:${azureIdentityVersion}"
36+
implementation "com.google.code.gson:gson"
37+
3438
// Important for RedisOM annotation processing!
3539
annotationProcessor project(':redis-om-spring')
3640
testAnnotationProcessor project(':redis-om-spring')

redis-om-spring-ai/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies {
88
compileOnly "jakarta.websocket:jakarta.websocket-client-api"
99
implementation "org.springframework.ai:spring-ai-ollama:${springAiVersion}"
1010
implementation "org.springframework.ai:spring-ai-azure-openai:${springAiVersion}"
11+
compileOnly "com.azure:azure-identity:${azureIdentityVersion}"
1112
implementation "org.springframework.ai:spring-ai-vertex-ai-embedding:${springAiVersion}"
1213
implementation "org.springframework.ai:spring-ai-bedrock:${springAiVersion}"
1314
implementation "org.springframework.ai:spring-ai-transformers:${springAiVersion}"

redis-om-spring/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ dependencies {
1010
api "jakarta.persistence:jakarta.persistence-api"
1111
api "com.fasterxml.jackson.core:jackson-databind"
1212
api "redis.clients:jedis"
13-
api "com.azure:azure-identity:${azureIdentityVersion}"
13+
compileOnly "com.azure:azure-identity:${azureIdentityVersion}"
14+
compileOnly "com.google.code.gson:gson"
1415
api "com.google.guava:guava:${guavaVersion}"
1516
api "com.github.f4b6a3:ulid-creator:${ulidVersion}"
1617
api "org.apache.commons:commons-lang3"

0 commit comments

Comments
 (0)