After doing some searching, I found that I needed to add some XML to the POM file:
It would be nice if Netbeans just included that automatically.
It is interesting that IDEs now support Maven, and that Maven is getting a lot of traction in the industry. When it first came out, people thought it was too restrictive, and now “convention over configuration” is the rage. A lot of people looked at it and thought, “Why do we need this? We already have Ant.” But it looks like Maven is overtaking Ant. (This is a subjective, anecdotal observation.)
Image from Wikipedia