I believe this is related, Sign in to sonatype, copying the response from there:
The ability to scan the Artifacts Staging Directory is on the list of improvements we’d like to add to the Azure DevOps extension. The team rotates investment through our portfolio of integrations and there isn’t any planned work on Azure DevOps, however, when we circle back to it we will entertain how to fulfill this. Thanks for the idea.
Hi Justin
I think Im facing the exact same problem. The task does not find anything from the Build.ArtifactStagingDirectory even though my .war is right there.
Am I right to assume that basically right now the extention cannot scan from the Artifacts Staging Directory, but it would from some other directory?
Correct, currently the scanning occurs within “Build.Repository.LocalPath” but not in “Build.ArtifactStagingDirectory”. We have a ticket in the backlog to fix but no timetable as to when we will be able to address this.