Velocitoro was developed to be a Maven plugin and was tested using Maven 2.2.0 Most probably we will test it with later versions as Maven develops because we extensively use Maven for our developments.
To install Velocitoro as a Maven plugin you have to install or deploy it. It is recommended that you have Nexus as a repository manager for your company, but generally Velocitoro does not require this. You can use it standalone.
If you use Maven the best approach to install Velocitoro is to download the source and compile it with the command mvn deploy or mvn install.
It is also recommended, although not neccessary to insert the lines:
<pluginGroups>
<pluginGroup>com.verhas.maven.plugins</pluginGroup>
</pluginGroups>
into your settings.xml file, so you need not specify the groupId when invoking Velocitoro.
After doing this you can invoke Velocitoro from your project main directory:
mvn velocitoro:velocitoro
Since you have downloaded Velocitoro you can do it for this project on your local copy and you will get soon your compiled web site in target/web.
Velocitoro as a Maven plugin can be fully configured. To do yo you should specify the plugin in your pom.xml file:
<plugin>
<groupId>com.verhas.maven.plugins</groupId>
<artifactId>velocitoro-maven-plugin</artifactId>
<configuration>
<passes>2</passes>
</configuration>
</plugin>
The sample above specifies that we need two passes instead of the default one. (For more on passes see documentation on the Velocitoro engine.)
To configure the plugin you can use the following XML tags:
<plugin>
<groupId>com.verhas.maven.plugins</groupId>
<artifactId>velocitoro-maven-plugin</artifactId>
<configuration>
<ignoredExtensions>
<!-- BAD EXAMPLE!!!! -->
<extension>.vmi</extension>
</ignoredExtensions>
</configuration>
</plugin>
is bad.
The configuration values can also be specified on the command line. In this case the -Dvelocitoro.xxx format has to be used, where xxx is the name of the option. For example
mvn velocitoro:velocitoro -Dvelocitoro.debug=true
will result some output, like:
[INFO] ------------------------------------------------------------------------ [INFO] VELOCITORO DUMP [INFO] ------------------------------------------------------------------------ [INFO] sourceDirectory=src/web [INFO] targetDirectory=target/web [INFO] scriptDirectory=null [INFO] groovyClassPaths=src/main/groovy [INFO] passes=2 [INFO] templateEncoding=UTF-8 [INFO] ignoredExtensions=vm [INFO] ignoredExtensions=vmi [INFO] ignoredExtensions=groovy [INFO] shadowExtension=vm [INFO] ------------------------------------------------------------------------