What is the principal distinction between metonymy and metaphor?

Definitions of Literal and Figurative Use and the Technical Divisions of Metaphor