ybapat commented on PR #57492:
URL: https://github.com/apache/spark/pull/57492#issuecomment-5107546052
Thanks for the detailed review — you're right. `GlobPatternMatcher` from Ivy
2.5.3 does hard-require `org.apache.oro` at runtime, so the removal alone would
have caused a `NoClassDefFoundError` on any `--packages` path that builds glob
exclude rules.
I've updated the PR to first migrate `MavenUtils` off `GlobPatternMatcher`:
- `import org.apache.ivy.plugins.matcher.GlobPatternMatcher` →
`ExactPatternMatcher`
- `ivySettings.addMatcher(new GlobPatternMatcher)` → `new
ExactPatternMatcher`
- `ivySettings.getMatcher("glob")` → `getMatcher("exact")`
The substitution is safe because all patterns Spark constructs for exclusion
rules are either exact strings (e.g. `"scala-library"`) or `"*"`. Ivy's
`AbstractPatternMatcher` special-cases `"*"` as match-all regardless of the
concrete matcher type (`PatternMatcher.ANY_EXPRESSION`), so
`ExactPatternMatcher` is behaviourally identical for Spark's usage.
The five changed files are now in a single commit. Happy to add a
`MavenUtilsSuite` test covering the `--exclude-packages` / `createExclusion`
path without oro on the classpath if that would help confidence.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]