Skip to content

Conversation

@Artuiro-23
Copy link

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
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

3 participants