You can specify two types of things on the maven command line:
life cycle phases (they do not include the symbol :
(they include at least one character : depending on how fully you specified the plugin, it can be short-name:goal or groupId:artifactId:goal or groupId:artifactId:version:goal )
There are three life cycles : default, clean, and site. Each life cycle consists of a series of phases. When you specify a phase in the life cycle, Maven will complete all phases in this life cycle before and enable the specified phase.
When you specify a plugin target, that plugin target is called and only that point of the plugin.
Maven has a packaging concept that defines a set of default plugin bindings to the life cycle stages. For example, packaging jar (by default, if your pom.xml includes the <packaging>...</packaging> element) by default binds jar:jar to the package phase and binds install:install to the install phase.
So when you type
$ mvn package
Maven will work at all stages of the life cycle, executing plugins that are tied (either from the life cycle or by defining plugins in pom) as they progress.
When entering
$ mvn jar:jar
Maven will just launch the jar plugin. [/ p>
The life cycle is 99 times the 100 that you want to use.
This is how you usually want to refer directly to the goals of the plugin.
jetty:run to start the web server
surefire:test to quickly re-run tests (usually with -Dtest=... to indicate a specific
release:prepare release:perform to release your code
versions:... to perform some update or request content related to the version, for example. versions:display-plugin-updates
ship:ship or cargo:deployer-deploy to push your built artifacts to the hosting environment
source share