protected String getRecommendedVersionRecursive ( Project project , ModuleVersionSelector mvSelector ) { String version = project . getExtensions ( ) . getByType ( RecommendationProviderContainer . class ) . getRecommendedVersion ( mvSelector . getGroup ( ) , mvSelector . getName ( ) ) ; if ( version != null ) return version ; if ( project . getParent ( ) != null ) return getRecommendedVersionRecursive ( project . getParent ( ) , mvSelector ) ; return null ; }
Look for recommended versions in a project and each of its ancestors in order until one is found or the root is reached