velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Siden <lsi...@gmail.com>
Subject Re: ant DVSL task can't find VM_global_library.vm
Date Wed, 10 Nov 2004 03:30:00 GMT
> ${basedir}\... is converted to the absolute path in the file system, so
> the specified resource can only be found if the current directory was
> the root (C:\).

I'm a bit confused by that statement, because an absolute path (e.g.
C:\...) should resolve to the same resource regardless of the current
directory.  In any case, the error message " [dvsl] [error]
ResourceManager : unable to find resource
'C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\veltemplate\VM_global_library.vm'
in any resource loader." shows clearly what the ResourceManager was looking for.

FWIW, I think I already tried converting the '\' to '/' AND tried it
both with and without the ${basedir}/ appended, but I'll give both
another shot when I get into work tomorrow.

Appreciate your help.

On Wed, 10 Nov 2004 12:21:10 +0900, Shinobu Kawai
<shinobu.kawai@gmail.com> wrote:
> 
> Hi Larry,
> 
> I'm new to DVSL, so I'm making a lot of guesses here.  ;)
> 
> 
> 
> >               <dvsl basedir="."
> >                       in="${target.dir}/svjp-ui-tabbed.xml"
> >                       out="${target.dir}/svjp-ui-tabbed.html"
> >                       style="${target.dir}/svjp-ui-tabbed.dvsl"
> >                       toolboxfile="${target.dir}/toolbox.properties"
> >                       classpath="${dvsl.toolbox.classpath}">
> >                       <velconfig name="velocimacro.library"
> > value="${basedir}\veltemplate\VM_global_library.vm"/>
> >               </dvsl>
> 
> > In particular:
> > C:\Views\lsiden_view_2\sdm_svc\SDMservices\GKN\Phase2\DeveloperRepository\veltemplate\VM_global_library.vm
> > : org.apache.velocity.exception.ResourceNotFoundException: Unable to
> > find resource
> >
> > However, this is exactly where VM_global_library.vm is found on my
> > system!  What am I missing?
> First, Velocity, by default, uses the FileResourceLoader with the
> current path as the template root.
>     http://jakarta.apache.org/velocity/developer-guide.html#Configuring%20Resource%20Loaders
>     http://jakarta.apache.org/velocity/api/org/apache/velocity/runtime/resource/loader/FileResourceLoader.html
> 
> The Velocimacro libraries are also resources, loaded by
> VelocimacroFactory.
>     http://jakarta.apache.org/velocity/api/org/apache/velocity/runtime/VelocimacroFactory.html#initVelocimacro()
> 
> ${basedir}\... is converted to the absolute path in the file system, so
> the specified resource can only be found if the current directory was
> the root (C:\).
> 
> Try removing the "${basedir}\" part, and see what happens.  If my
> assumptions are correct (and if ${basedir} == current dir),  it should
> work.
> 
> 
> 
> Best regards,
> -- Shinobu Kawai
> 
> --
> Shinobu Kawai <shinobu.kawai@gmail.com>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
> 


-- 
Larry Siden
http://umich.edu/~lsiden/

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message