Given a <plugin>
element in a pom.xml
, how do I find the default phase that it binds to?
For example, I'd like to know which phase of the Maven lifecycle does the maven-war-plugin
gets executed.
Given the lifecycle phases above, this means that when the default lifecycle is used, Maven will first validate the project, then will try to compile the sources, run those against the tests, package the binaries (e.g. jar), run integration tests against that package, verify the integration tests, install the verified ...
Maven Lifecycle: Below is a representation of the default Maven lifecycle and its 8 steps: Validate, Compile, Test, Package, Integration test, Verify, Install and Deploy.
A Maven plugin is a group of goals; however, these goals aren't necessarily all bound to the same phase.
The best way to see what's really happening in your project along those lines is with mvn help:effective-pom
. It doesn't just show the defaults; it shows what actually is according to your current pom.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With