fix(ant): resolve relative paths against basedir#8202
Merged
nhumblot merged 3 commits intodependency-check:mainfrom Jan 6, 2026
Merged
fix(ant): resolve relative paths against basedir#8202nhumblot merged 3 commits intodependency-check:mainfrom
nhumblot merged 3 commits intodependency-check:mainfrom
Conversation
jeremylong
approved these changes
Jan 5, 2026
Collaborator
|
The failing test here is also the one that starting failing at 2026-01-01 and subsequently fixed on master so should be OK with a merge/rebase from master (or as-is, although I have not reviewed the code since not familiar with the ant integration) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
This change fixes how relative paths are resolved in the Dependency-Check Ant task.
Previously, when running Ant from a different working directory (for example using
ant -f /path/to/build.xml), relative paths provided forsuppressionFileandreportOutputDirectorywere resolved against the current working directory insteadof the Ant project
basedir.This update ensures that all non-absolute paths are resolved relative to the
project
basedir, which is consistent with standard Ant behavior and userexpectations.
Related issues
Have test cases been added to cover the new functionality?
No
Manual verification was performed because this change affects runtime behavior
that depends on how Ant resolves paths when invoked from different working
directories (for example using
ant -f /path/to/build.xml). This scenario isdifficult to reliably simulate in unit tests.
Verification was done by executing Ant from outside the project directory and
confirming that suppression files and report output directories are correctly
resolved relative to the project
basedir(the directory containing thebuild.xmlfile).