Home > OS >  Where is the site.vm of the maven-default-skin?
Where is the site.vm of the maven-default-skin?

Time:01-07

When I run mvn site with no site.xml on a simple Maven project (meaning it will use the maven-default-skin) which site.vm file site used?

I have looked into maven-site-plugin, maven-project-info-reports-plugin, maven-doxia-sitetools and of course maven-default-skin, but I could not find it anywhere.

For the maven-fluido-skin, I can find the site.vm in src/main/resources/META-INF/maven. But there is no such file for maven-default-skin.

CodePudding user response:

When using maven-site-plugin 4.0.0-M3, the maven-doxia-sitetools version used is 2.0.0-M3. This version provides the default-site.vm file in its resources, which is used as the default template in the DefaultSiteRenderer class if the skin doesn't provide any (e.g. maven-default-skin).

In maven-site-plugin 4.0.0-M4, the version of maven-doxia-sitetools is 2.0.0-M4. In this version, the default-site.vm has been removed and the default skin has been changed to maven-fluido-skin.

This means it's not possible anymore to use a skin that doesn't provide the site.vm template. If one tries to force the use of the maven-default-skin with version 4.0.0-M4, it will fail with the message Skin does not contain template at META-INF/maven/site.vm.

This change has been done in https://issues.apache.org/jira/browse/DOXIASITETOOLS-270. maven-default-skin is unmaintained and will be replaced by maven-fluido-skin, see https://issues.apache.org/jira/browse/MSKINS-196.

For information, the site.vm is a Velocity template file and is rendered by maven-doxia-sitetools (doxia-site-renderer to be precise) on maven-site-plugin's request.

  • Related