velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hensley, Richard" <>
Subject Problem with Anakia in Velocity 1.2-rc2
Date Tue, 06 Nov 2001 18:49:05 GMT
I'm using Anakia to build some static web pages. During this process, 
I had a need to create and configure a file My first
cut at the had: 

file.resource.loader.cache = true 

My anakia build task looks like: 

        <anakia basedir="${docs.src}" destdir="${docs.dest}/" 
             extension=".html" style="./site.vsl" 

and the file is in the same directory as the

When I had the file in the build directory, I get
following errors in velocity.log 
   [anakia] Error: 
org.apache.velocity.exception.ResourceNotFoundException: Unable to find 
resource './site.vsl' 

This error did not occur when the file was not

This sounded like a path problem so I started investigating the Anakia 
code and I found the following snippet in the Anakia.execute method: 

            if ( velocityPropertiesFile.exists() ) 
            else if (templatePath != null && templatePath.length() > 0) 

If I'm reading this code correctly, it says if there is a velocity 
properties file, use it. Otherwise, set the file resource loader path to

the template path. 

The Anakia documentation states that when a files is

present, and a templatePath attribute is set, the templatePath attribute

overrides appropriate settings in the file. 

I found this in velocity-1.2-rc2. I check the most recent in cvs, and it has the same code snippet. 

I'm not sure which, but either the documentation is wrong, or the code 
is wrong. 

What should the fixed? 

I'm still a very new user, so I'm not sure how to fix the code. However,

I could fix the Anakia.xml documentation file. 

This is very easy to recreate with the Anakia examples. Just put a file in the build directory. Make sure that the file does not contain a file resource loader path.

Richard Hensley 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message