The Texen PropertiesUtil class that two of the Control templates use
states in the source that putting $generator.templatePath in a
$properties.load parameter is deprecated as PropertiesUtil should handle
the logic of where to find the file so as to be seamless from file
system to classpath and what not.
They do handle for it, but it's deprecated, so here's a patch that just
removes the $generator.templatePath.
Also note that I have a patch in to the velocity-dev list to fix up the
PropertiesUtil class so that it'll work on Velocity's own resource
loaders instead of guessing where a file would be. I've tested the patch
with both the Velocity and Torque testing frameworks and besides passing
both, it allows us to get rid of the duplicate -template/-classpath
targets. If someone would like to help push it through and get it
committed, I'd appreciate it.
Thanks,
Stephen
Index: src/templates/sql/base/Control.vm
===================================================================
RCS file: /home/cvspublic/jakarta-turbine-torque/src/templates/sql/base/Control.vm,v
retrieving revision 1.4
diff -u -r1.4 Control.vm
--- src/templates/sql/base/Control.vm 26 Dec 2001 22:24:43 -0000 1.4
+++ src/templates/sql/base/Control.vm 14 Jul 2002 06:26:27 -0000
@@ -1,5 +1,5 @@
#set ( $basepath = "sql/base/$targetDatabase" )
-#set ( $dbprops =
$properties.load("$generator.TemplatePath/sql/base/$targetDatabase/db.props") )
+#set ( $dbprops = $properties.load("sql/base/$targetDatabase/db.props") )
#set ( $fname= "sql/base/$targetDatabase/table.vm" )
#set ( $fnamekeys= "sql/base/$targetDatabase/tablefk.vm" )
#set ( $idname = "sql/id-table/idtable.$targetDatabase" )
Index: src/templates/om/Control.vm
===================================================================
RCS file: /home/cvspublic/jakarta-turbine-torque/src/templates/om/Control.vm,v
retrieving revision 1.8
diff -u -r1.8 Control.vm
--- src/templates/om/Control.vm 20 Jun 2002 23:55:14 -0000 1.8
+++ src/templates/om/Control.vm 14 Jul 2002 06:26:53 -0000
@@ -1,8 +1,9 @@
#set ($basePath = $generator.OutputPath)
#if ($targetDatabase)
- #set ( $dbprops =
$properties.load("$generator.TemplatePath/sql/base/$targetDatabase/db.props") )
+ #set ( $dbprops = $properties.load("sql/base/$targetDatabase/db.props") )
#end
+
#foreach ($dataModel in $dataModels)
#foreach ($database in $dataModel.Databases)
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>