You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2026/08/07 12:44:27 UTC
[PR] Fix #134: add regression test for multi-digit version extraction [maven-shared-jar]
elharo opened a new pull request, #156:
URL: https://github.com/apache/maven-shared-jar/pull/156
Closes #134
### Summary
Issue #134 reports that `FilenameExposer` truncates multi-digit version numbers (e.g. `my-lib-12.3.4.jar` would yield version `2.3.4`).
Investigation showed the described behavior does not reproduce. `FilenameExposer` uses `filename.substring(mat.end() - 1)`, where `mat.end() - 1` is the index of the first digit matched by the `-\\d` pattern. `substring()` therefore includes the full multi-digit version, so `my-lib-12.3.4.jar` correctly yields `12.3.4`, `my-lib-10.jar` yields `10`, etc. No source change is required.
### Test
Adds `FilenameExposerTest`, which builds JARs in memory with version-specific filenames and asserts `FilenameExposer` extracts the full version:
- `my-lib-12.3.4.jar` → `12.3.4`
- `my-lib-10.jar` → `10`
- `my-lib-21.5.7.jar` → `21.5.7`
- `my-lib-9.0.jar` → `9.0`
- `my-lib.jar` → no version
These tests document the expected behavior and guard against regressions.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix #134: add regression test for multi-digit version extraction [maven-shared-jar]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz merged PR #156:
URL: https://github.com/apache/maven-shared-jar/pull/156
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org