grep print relative file path when doing a recursive search
I'd suggest using a combination of find, xargs and grep:
cd top-dir
find . -print -name 'pom.xml' -print0 | xargs -0 grep -l pattern
I put in -print0 / -0 option so that special characters in the found directories are protected and properly processed.
The above will list the filename(s) relative to the top-dir matching the patterm.