GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||
GeezerVison is showing github.com — feat: support glob patterns in filter file paths by gnodet · Pull Request #400 · apache/maven-filtering Conversation
Contributor
SummaryMaven's This PR adds glob pattern support to filter file paths, allowing configurations like: <filters> <filter>env/dev/*.properties</filter> </filters> Root Cause
FixAdded glob detection (
TestsThree new unit tests in
Fixes #254
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
gnodet
marked this pull request as ready for review
gnodet-bot
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice feature — glob support for filter file paths is a useful addition. I have a few concerns around security, backward compatibility, and minor code style. Security: path traversal via
|
| Finding | Status |
|---|---|
| Path traversal guard | ✅ Fixed — searchRoot.startsWith(normalizedBase) check added |
| Backward-compat fallback for literal filenames with glob chars | ✅ Fixed — falls back to literal path when glob matches nothing |
| Parameterized logging | ✅ Fixed — uses '{}' placeholder |
Two minor items remain below.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after 21f72b5 — the InvalidPathException handling for Windows is solid. Two items from the previous review remain unaddressed.
| Previous Finding | Status |
|---|---|
InvalidPathException on Windows in backward-compat fallback |
✅ Fixed — try/catch around resolveFile() with appropriate fallback to warn |
Javadoc {@code {} syntax |
❌ Not addressed (see inline) |
Files.walk() unbounded depth |
❌ Not addressed (see inline) |
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after 7f75651 — both remaining items from the previous review are now addressed:
| Finding | Status |
|---|---|
Javadoc {@code {} broken syntax |
✅ Fixed — uses <code>{</code> |
Files.walk() unbounded depth |
✅ Fixed — maxDepth derived from pattern suffix (1 for flat globs, MAX_VALUE for ** or multi-segment) |
All five findings across three review rounds are resolved. Code is solid.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
7f75651 to
05608dd
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-review after rebase-squash (05608dd) — the multi-commit history has been squashed into a single clean commit. The glob-support code in BaseFilter.java and the three test cases in DefaultMavenFileFilterTest.java are identical to the previously approved state. All five findings from the three prior review rounds remain addressed.
No new issues.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
- Add glob pattern expansion in BaseFilter.loadProperties() via java.nio.file.Files.walk() + PathMatcher
- Patterns containing *, ?, {, [ are expanded to matching files sorted for reproducibility
- Non-matching glob emits WARN instead of failing the build
- Guard against path traversal: glob root must remain under project base directory
- Backward-compatible: literal paths (no glob characters) unchanged
- Fix Windows compatibility: use relative path matching in expandGlob
- Fixes apache#254
05608dd to
6f57f03
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[MSHARED-995] Documents of patterns used for filtering
There was an error while loading. Please reload this page.