NeedExclusion 判断是否是当前依赖需要排除的子依赖
(dep PomDependency)
| 92 | |
| 93 | // NeedExclusion 判断是否是当前依赖需要排除的子依赖 |
| 94 | func (pd PomDependency) NeedExclusion(dep PomDependency) bool { |
| 95 | check := func(s1, s2 string) bool { |
| 96 | return s1 == "" || s1 == "*" || s1 == s2 |
| 97 | } |
| 98 | for _, e := range pd.Exclusions { |
| 99 | if check(e.GroupId, dep.GroupId) && |
| 100 | check(e.ArtifactId, dep.ArtifactId) && |
| 101 | check(e.Version, dep.Version) { |
| 102 | return true |
| 103 | } |
| 104 | } |
| 105 | return false |
| 106 | } |
| 107 | |
| 108 | // GAV is groupId:artifactId:version |
| 109 | func (pd PomDependency) GAV() string { |