Getting Started

This artifact contains a collection of Velocity tools that are used by the Sentry Maven Skin.

This artifact must be loaded as a dependency by the Maven Site plugin, as below:


This allows the Maven Skin and Velocity-processed pages in a Maven Site to invoke the below Velocity tools:

Tool Description Javadoc
$htmlTool To manipulate HTML documents or fragments HtmlTool
$imageTool To manipulate images ImageTool
$indexTool To create search indexes IndexTool

The above tools are designed to be used only in the Velocity template of a Maven Site Skin as in the example below:

#set($bodyElement = $htmlTool.parseContent($bodyContent))
#set($bodyElement = $imageTool.explicitImageSize($bodyElement, "img", ${project.reporting.outputDirectory}, $currentFileName))

Additionally, we allow the use of these standard Velocity tools in the Velocity-processed pages (e.g. in src/site/markdown/*.md.vm):

Tool Description Javadoc
$collection Tool gathering several collection utilities CollectionTool
$json Tool for JSON parsing and rendering JsonTool
$log Tool to trigger logs from withing templates LogTool


#set( $repoList = $json.fetch("") )
#if( $repoList && $repoList.size() > 0 )
| Repository | Description |
#foreach ($repo in $repoList.iterator() )
| $ | $!repo.description |
$log.error("Could not fetch repositories")
*No repositories.*

No results.