diff --git a/pkg/java/pom/parse.go b/pkg/java/pom/parse.go index e303e396..b4182045 100644 --- a/pkg/java/pom/parse.go +++ b/pkg/java/pom/parse.go @@ -410,11 +410,9 @@ func (p *parser) resolveDepManagement(props map[string]string, depManagement []p // We need to recursively check all nested depManagements, // so that we don't miss dependencies on nested depManagements with `Import` scope. - newProps := utils.MergeMaps(props, result.properties) - result.dependencyManagement = p.resolveDepManagement(newProps, result.dependencyManagement) for k, dd := range result.dependencyManagement { // Evaluate variables and overwrite dependencyManagement - result.dependencyManagement[k] = dd.Resolve(newProps, nil, nil) + result.dependencyManagement[k] = dd.Resolve(result.properties, nil, nil) } newDepManagement = p.mergeDependencyManagements(newDepManagement, result.dependencyManagement) }