Skip to content

Commit

Permalink
fix: Add dependencyManagement exclusions to the child exclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
coheigea committed Jun 20, 2024
1 parent dfe757e commit af516ff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/dependency/parser/java/pom/pom.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +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
}
Expand Down

0 comments on commit af516ff

Please sign in to comment.