maven plugin types

Maven plugins:

A maven plugin represents a set of goals which provides the facility to add your own actions to the build process.

Syntax to execute a plugin:

mvn [plugin-name]:[goal-name]

Maven plugin types:

1. Build Plugins
2. Reporting Plugins

Build Plugins:

Build plugins are executed at the build time. Build plugins should be declared inside the element.

Reporting Plugins:

Reporting plugins are executed at site generation time. Reporting plugins should be declared inside the element.

Commonly used maven plugins:

PluginDescription
cleanIt is used to clean up the target after build.
compilerIt is used compile the java source files.
deployIt is used to deploy the artifact to the remote repository.
failsafeIt is used to run the JUnit unit tests.
installIt is used to install the built artifact into the local repository.
resourcesIt is used to copy the resources to the output directory to include in the JAR.
siteIt is used to generate the site for the current project.
surefireIt is used to run the JUnit unit tests.


Please Share