Hi!
I'm trying to learn how to use Velocity and
Maven to generate some HTML pages. (I'm using Velocity Engine that comes with Maven 2.0.5)
The problem I have is that my .vm file does not "see" structure of the Maven's site declaration.
When I run Maven without reference to my .vm file, it generates HTML file with the structure of the site as defined in /src/site/site.xml file (as well as the contents of the index.apt file).
This works fine.
Then I add my custom Velocity file "maven-site.vm" and reference it in the pom.xml file:
I can change the generated HTML page with the help of my Velocity file. However, when I try to retrieve the "site.xml" structure using $siteDescriptor.getChild() (for example, $siteDescriptor.getChild( "bannerLeft" ) ), I always get null.
Why is it so?
Is there anything else I have to define?
Or is my file structure incorrect?
Here is the structure of my sample project:
I've spent a lot of time searching for solution, but haven't been able to find the answer.
Thanks!
[ August 19, 2007: Message edited by: Andris Jekabsons ]