maven-site-plugin
The Maven Site Plugin
1. Overview
For an overview of the other core plugins, refer to this tutorial.
2. Plugin Goals
The Maven site lifecycle has two phases bound to goals of the site plugin by default: the site phase is bound to the site goal, and the site-deploy phase is bound to the deploy goal.
Here are the descriptions of those goals:
-
site – generate a site for a single project; the generated site only shows information about the artifacts specified in the POM
-
deploy – deploy the generated site to the URL specified in the distributionManagement element of the POM
In addition to site and deploy, the site plugin has several other goals to customize the content of the generated files and to control the deployment process.
3. Goal Execution
To generate a site, just run mvn site:site or mvn site.
To view the generated site on a local machine, run mvn site:run. This command will deploy the site to a Jetty web server at the address localhost:8080.
The run goal of this plugin isn’t implicitly bound to a phase in the site lifecycle, hence we need to call it directly.
If we want to stop the server, we can simply hit Ctrl + C.
4. Conclusion
We can find more information about this plugin on the Maven website.