Checking in which repository dependency was found

Is it possible to check in which repository dependency was found, e.g. in order to use this information in a component metadata rule?

I’m using a Maven repository configured in Nexus as a “mixed one” (containing both snapshot and release artifacts) and I would like to have a way to reject dependencies found in this repository during dependency resolution for some dependencies, ideally via something like ‘latest.release’ special version constraint .