Skip to content

Commit 81492e4

Browse files
committed
fix: Add dependencyManagement exclusions to the child exclusions
1 parent dfe757e commit 81492e4

File tree

1 file changed

+2
-2
lines changed
  • pkg/dependency/parser/java/pom

1 file changed

+2
-2
lines changed

pkg/dependency/parser/java/pom/pom.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ func (d pomDependency) Resolve(props map[string]string, depManagement, rootDepMa
266266
if !dep.Optional {
267267
dep.Optional = managed.Optional
268268
}
269-
if len(dep.Exclusions.Exclusion) == 0 {
270-
dep.Exclusions = managed.Exclusions
269+
// `mvn` always merges exceptions for pom and parent
270+
dep.Exclusions.Exclusion = append(dep.Exclusions.Exclusion, managed.Exclusions.Exclusion...)
271271
}
272272
}
273273
return dep

0 commit comments

Comments
 (0)