Fork me on GitHub

Usage

This plugin has been written to be able to apply a new skin on deployed sites of Maven Projects.

Before you begin be sure that the current project already uses the new skin.

When you execute siteskinner:skin the following steps are taken:

  • The plugin will look for the most recent deployed version of the project. From this version the pom is read to get the scm-information.
  • The sources of this version will be checked out under target/siteskinner.
  • The skin and the custom-section of the site.xml of the current project are merged with the checked out sources.
  • The plugin will call mvn site on the checked out project. Et voilà, we have the old content with a new skin.
  • If you have verified the site under target/siteskinner/target/site you can deploy it by a mvn site:deploy from target/siteskinner.

This plugin supports locales and multi-module projects (the checkout will only be done on the root of the project).

Command line options

The skinner plugin has only a few options:

  • siteDeploy (default: false): If this value is set to true the re-skinned site will immediately be deployed.
  • forceCheckout (default: false): By setting this value to true a clean checkout is done instead of an update.
  • mergeBody (default: true): By setting this value to false none of the body elements will be merged, so the original layout is preserved.
  • arguments : additional arguments for mvn site, supports only a small subset of all available arguments.
  • mavenHome : some versions of the maven-site-plugin only work for a certain version of Maven, the plugin will verify that and suggest the preferred version. You can either execute the siteskinner with the required Maven version, or refer to the required Maven version by settings this parameter.
     /path/to/maven-version/bin/mvn siteskinner:skin
    
     mvn siteskinner:skin -DmavenHome=/path/to/maven-version/bin/mvn

PublishDate support

Normally when deploying a site, the current date will be used as the publish date. When deploying with the siteskinner, the original publish date will automatically be used. The following table shows which version of a skin supports the publish date adjustment.

Most skins only provide css-files, whereas the templating is done by Doxia sitetools. For these skins it's not possible to specify a version, it depends on the version of Doxia-sitetools, a dependency of the maven-site-plugin.

Apache Maven Skins Support since
Maven Application Skin Doxia Sitetools 1.3, included since maven-site-plugin-3.1
Maven Classic Skin Doxia Sitetools 1.3, included since maven-site-plugin-3.1
Maven Default Skin Doxia Sitetools 1.3, included since maven-site-plugin-3.1
Maven Stylus Skin 1.4
Maven Fluido Skin 1.1