You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Martin Poeschl <mp...@marmot.at> on 2002/07/01 08:04:45 UTC

Re: useclasspath patch

Stephen Haberman wrote:
> An update on the templatePath/useClasspath conflict that required the
> two targets for any target that wanted to use the $properties tool.
> 
> So the problem is in om\Control.vm where it calls:
> 
> $properties.load("$generator.TemplatePath/sql/base/$targetDatabase/db.pr
> ops")
> 
> Ideally, $generator.TemplatePath shouldn't be there. However, the
> PropertiesUtil class from Texen handles stripping out the
> $generator.TemplatePath if getting from the classpath:
> 
> http://cvs.apache.org/viewcvs.cgi/jakarta-velocity/src/java/org/apache/v
> elocity/texen/util/PropertiesUtil.java?rev=1.9&content-type=text/vnd.vie
> wcvs-markup
> 
> The problem is that they assume that if templatePath != null then
> useClasspath=false. How about instead of hacking around it, we submit a
> patch for the PropertiesUtil to check useClasspath=true instead? Or even
> try one and then the other?

would solve our problem, but i don't know if the velocity people will like this change ...
so i'll copy this mail to the velocity-dev list ;-)

> 
> Actually, instead of rolling their own
> loadFromClasspath/loadFromTemplatePath, couldn't PropertiesUtil use
> Velocity's build-in resource manager? E.g. like calling
> Velocity.getTemplate, or further down in the code so that the resource
> doesn't have to be a template?
> 
> (Perhaps this last paragraph is better asked on the velocity-dev list; I
> can move it there depending on what you guys think).
> 
> Thanks,
> Stephen



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>