Dissolution of a metal in HCl actually means that the metal has displaced H+ ions and form its own salt. However, copper is unable to displace H sine copper lies below H in electropositive character series. HNO3 is a strong oxidising agent also. Hence it rather oxidises copper to Cu2+ ions and hence copper dissolves in HNO3.