From what I understand, in maven, plugin goals can be attached to a lifecycle phase. What is the default phase, if it isn't defined?
In my experience it depends on the plugin goal. For example, the assembly:single goal in the maven-assembly-plugin doesn't list a default phase. The source:jar-no-fork goal binds to the package
phase by default. Typically each goal lists the default phase in the Attributes section of the documentation.
Another way to tell is to look at the source code (example: source:jar-no-fork mojo). Look for @phase
in the class header comment block.
Last but not least: the packaging you select (jar, war, ear, pom, etc.) binds goals to the lifecycle phases by default. The Maven book describes the lifecycles and bound goals. The maven-core
artifact includes the configuration file: /src/main/resources/META-INF/plexus/artifact-handlers.xml
.
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