Skip to content

fix(ant): resolve relative paths against basedir#8202

Merged
nhumblot merged 3 commits intodependency-check:mainfrom
Artuiro-23:fix-7918-ant-relative-paths
Jan 6, 2026
Merged

fix(ant): resolve relative paths against basedir#8202
nhumblot merged 3 commits intodependency-check:mainfrom
Artuiro-23:fix-7918-ant-relative-paths

Conversation

@Artuiro-23
Copy link
Copy Markdown
Contributor

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 for suppressionFile and
reportOutputDirectory were resolved against the current working directory instead
of 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 user
expectations.

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 is
difficult 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 the
build.xml file).

@boring-cyborg boring-cyborg bot added ant changes to ant documentation site documentation labels Dec 28, 2025
@jeremylong jeremylong added this to the 12.2.0 milestone Jan 5, 2026
@chadlwilson
Copy link
Copy Markdown
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)

@nhumblot nhumblot merged commit f437aa0 into dependency-check:main Jan 6, 2026
5 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ant changes to ant documentation site documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ant task does not use project-relative paths for suppression file and output directory

4 participants