Publishing a Project Web Site
You have generated lots of reports in this chapter. These reports will not do any good if they're not made available by publishing them. Let's remedy this!
How do I do that?
Publishing to a single project web site is different from
publishing to a multiproject web site only in terms of the goal to
call: you call multiproject:site-deploy for multiprojects
and site:deploy for single
projects. In practice, the multiproject:site-deploy goal simply starts
by calling the multiproject:site
goal that we saw in Chapter 3,
and then it calls site:deploy on it
to upload the site to the remote server.
Tip
At the time of this writing the Site plug-in does not use the Artifact plug-in to deploy the web site as an artifact. This will certainly happen in future versions of Maven, and at that time you'll be able to practice your newly acquired knowledge of publishing project artifacts.
The Site plug-in supports four protocols for deploying a web site: File System
(fs), SSH (ssh), FTP (ftp), and RSync (rsync). SSH is the default one, but if you
wish to choose another one, define the maven.site.deploy.method property in your
properties file (either project.properties or build.properties, depending on whether you
wish to share this property with other team members):
maven.site.deploy.method = ssh
Let's publish the QOTD web site to http://www.mavenbook.org/mdn/qotd using SSH.
To use the SSH method you need to have SSH and SCP clients
installed, and the maven.ssh.executable ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access