Normally, to use a Maven plugins during the build, it needs to be explicitly activated by putting it into the <build> section of the POM.
However, if you make a minimal POM (no plugins in the “build” section) and run a Maven build, Maven will run some plugins by default, such as compiling and running tests via surefire.
How does this work? Is there some internal list of “default” plugins? Or is this defined in the “super POM”? I tried looking up a super POM, but the example given (in “Maven: The Complete Reference”) does not list the surefire plugin.
The list of plugins that are going to be activated during the build (if no other are explicitly declared) depends on project packaging. For example, for
jarandwarprojects, default lifecycle containstestphase which is bind tosurefire:testby default. See here for more info.