Class ScmAttributesContextCustomizer
java.lang.Object
org.apache.maven.doxia.scm.siterenderer.ScmAttributesContextCustomizer
- All Implemented Interfaces:
ContextCustomizer
@Singleton
@Named("scmAttributes")
public class ScmAttributesContextCustomizer
extends Object
implements ContextCustomizer
A
ContextCustomizer that adds SCM attributes to the Velocity context for use in templates.
It looks for an SCM repository in the directory of the site being rendered, and if found, retrieves SCM info for the file being rendered and adds it to the Velocity context.
The SCM repository is lazily retrieved and cached in the SiteRenderingContext attributes for subsequent retrievals, so that it is only looked up once per site rendering.
The SCM info is retrieved for each document being rendered, but only if an SCM repository was found for the site.
The following attributes are added to the Velocity context:
- Since:
- 2.1.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidcustomizeContext(org.apache.velocity.context.Context context, DocumentRenderingContext docRenderingContext, SiteRenderingContext siteRenderingContext)
-
Method Details
-
customizeContext
public void customizeContext(org.apache.velocity.context.Context context, DocumentRenderingContext docRenderingContext, SiteRenderingContext siteRenderingContext) - Specified by:
customizeContextin interfaceContextCustomizer
-