You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Everton, Dan" <Da...@Australia.Boeing.com> on 2001/10/25 03:51:26 UTC

Torque in Turbine 2.2b does not work with parent paths

Has anyone else had problems using Torque from Turbine 2 CVS and
paths with "." in them?

After nearly a week of poking around my build scripts trying
to nail a "generator.parse threw exception" error, I've discovered
that the TorqueDatModelTask in Turbine 2 CVS does not like paths
with "." in them. Torque would end up trying to create databases
called "D:/project/D:/project/" or similar because it was being
passed a path like "D:/project/build/../src/sql/project-schema.xml".

It's a simple thing to fix, on line 220 of TorqueDataModelTask.java
change
	ad.setName(xmlFile.substring(0,xmlFile.indexOf(".")));
to
	
ad.setName(xmlFile.substring(xmlFile.lastIndexOf("/"),xmlFile.lastIndexOf(".
")));

(and I suspect that a similar would affect line 243).

Not the most elegant fix (what about paths that don't have "/" in them?) but
it works for us.

Hope that helps someone out there.

Dan

-- 
Dan Everton
EngNET Coordinator
Central Engineering, Boeing Australia Limited
Phone: +61 07 3306 3288  --  Email: dan.everton@boeing.com


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