Friday, 14 September 2012

Publishing a Maven site to a scm (ease Apache svnpubsub usage)

The Apache Maven team just released a first version of a new plugin to be able to publish Maven websites to a scm. (Maven SCM Publish Plugin)
The first goal was to be able to commit web sites to the svnpubsub Apache infra for websites.

Remember the migration to svnpubsub is mandatory for the end of the year.

Yes you remember as (if you are an Apache committer) how long it can take to have a *.apache.org website live updated :-).

You usually scp to people.a.o and wait the end of rsync (long coffee break possible!) But now (thanks to Apache infra !), just commit your website to svn and the site is up2date within minutes !!

Note: as we have a Maven Scm Api we can support most of the supported scm by the Maven scm (honestly I have tested only svn and git :-)).
So it works too for git (github gh-pages included see documentation git branch section)

The trick is you must use different configuration and command line if you publish a mono module or multi modules build. See samples and documentation here:

Nice feature is the cleanup(delete) of not anymore generated files. They are now deleted from the scm. The plugin simply compare your generated website and the content from scm and take care of removing not anymore produced files.

Have a look at the other tips in this page.
The most important is to use the tryUpdate mode (not the default).
<tryUpdate>true</tryUpdate>
So have fun writing documentation on Apache projects and publish it to live very fast :P

No comments: