Class ClasspathBasedRecommendationProvider
java.lang.Object
netflix.nebula.dependency.recommender.provider.AbstractRecommendationProvider
netflix.nebula.dependency.recommender.provider.ClasspathBasedRecommendationProvider
- All Implemented Interfaces:
RecommendationProvider
- Direct Known Subclasses:
MavenBomRecommendationProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.gradle.api.provider.Provider<BomResolverService>protected Stringprotected org.gradle.api.artifacts.Configurationprotected org.gradle.api.ProjectFields inherited from class netflix.nebula.dependency.recommender.provider.AbstractRecommendationProvider
name -
Method Summary
Modifier and TypeMethodDescriptiongetBomRecommendations(Set<String> reasons) Retrieves BOM recommendations using the sharedBomResolverService.Methods inherited from class netflix.nebula.dependency.recommender.provider.AbstractRecommendationProvider
getName, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface netflix.nebula.dependency.recommender.provider.RecommendationProvider
getVersion
-
Field Details
-
project
protected org.gradle.api.Project project -
configuration
protected org.gradle.api.artifacts.Configuration configuration -
configName
-
bomResolverService
-
-
Method Details
-
getBomRecommendations
Retrieves BOM recommendations using the sharedBomResolverService.This method delegates to the build service to get cached BOM recommendations, avoiding direct configuration resolution that could cause lock conflicts in parallel builds. The build service ensures that all BOM resolution happens during the configuration phase when exclusive locks are available.
- Parameters:
reasons- a mutable set that will be populated with reasons explaining why specific recommendations were applied- Returns:
- a map of dependency coordinates (groupId:artifactId) to recommended versions
- Throws:
RuntimeException- if the build service is not available or BOM resolution fails
-