You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Justin Miller <ju...@gmail.com> on 2008/09/24 20:33:16 UTC

archetype creation and velocity

Is there any good documentation that explains how Velocity fits into
creating your own archetypes??

Thanks!
Justin

Re: archetype creation and velocity

Posted by Brad Szabo <bs...@unicon.net>.
Hey Justin, 

I am not sure about detailed Velocity documentation, but essentially all
files within your archetype that are configured to be filtered will be
processed by Velocity, i.e. any file can be a template.

The files to be filtered are configured in the archetype-metadata.xml
file. 

For example:

        <fileSet filtered="true" packaged="true" encoding="UTF-8">
          <directory>src/main/java</directory>
          <includes>
            <include>**/*.java</include>
          </includes>
        </fileSet>

This means that all of the Java source files under src/main/java will be
processed by Velocity, and therefore any of the default context
properties, or additional properties specified in the
<requiredProperties> section of archetype-metadata.xml, can be used
within the files, such as ${package}.

There are some details at
http://maven.apache.org/plugins/maven-archetype-plugin/specification/archetype-metadata.html

Hope this helps,

~Brad


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org