From 81492e457cee3d4d4b508d27d247380be2be7715 Mon Sep 17 00:00:00 2001 From: Colm O hEigeartaigh Date: Wed, 19 Jun 2024 15:11:40 +0100 Subject: [PATCH] fix: Add dependencyManagement exclusions to the child exclusions --- pkg/dependency/parser/java/pom/pom.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/dependency/parser/java/pom/pom.go b/pkg/dependency/parser/java/pom/pom.go index 3a0170d36811..b54b46b17c6d 100644 --- a/pkg/dependency/parser/java/pom/pom.go +++ b/pkg/dependency/parser/java/pom/pom.go @@ -266,8 +266,8 @@ func (d pomDependency) Resolve(props map[string]string, depManagement, rootDepMa if !dep.Optional { dep.Optional = managed.Optional } - if len(dep.Exclusions.Exclusion) == 0 { - dep.Exclusions = managed.Exclusions + // `mvn` always merges exceptions for pom and parent + dep.Exclusions.Exclusion = append(dep.Exclusions.Exclusion, managed.Exclusions.Exclusion...) } } return dep