Open awhitford opened 12 years ago
For what it's worth, I've just run into the same issue, and, while my experience of writing plugins is limited (so the how of @awhitford's post escapes me a little), I totally agree with the rest.
The command above with mvn site:deploy calls the Maven site plugin. Imho there should be a site goal and a deploy goal and you would bind them to the site and site-deploy lifecycle phase just like the maven site plugin does it.
You could also invoke it individually with
mvn ghSite:site mvn ghSite:deploy
Just a thought.
Presently, the SiteMojo is linked to the site phase, but it is really acting much more like site-deploy.
Please see the Maven Build Lifecycle: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference
One should be able to build the site locally, and not run the risk of uploading it. If one wants to upload the site, the user can say: mvn site:deploy.
I recommend not only changing the @phase from site to site-deploy, but also renaming the Mojo to SiteDeployMojo and changing the goal to be site-deploy.
Please also document the recommendation for distributionManagement/site in a project's pom.