You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Vikas Phonsa <VP...@suz.com> on 2003/12/02 22:58:03 UTC

Multiple Seperate Database Projects

Hi,

I want to configure Torque (I'm using 3.0) to be able to do the following
functionality and I would appreciate advice and instructions abt how that
could be done:

I have a Torque-Gen folder and when I make a schema (in the schema
subfolder) and modify the properties and stuff and run torque ant script it
generates the java classes and sql under the "src" folder under Torque-Gen.


I want to make separate folders for different databases like Database1,
Database2 etc and put the schema and build.properties for each database in
its separate folder. And then specify the location of the Database/folder I
want to work on in the default.properties folder, so that the properties and
the schema is loaded from Database folders like from Database1 folder and
also the generated sql and java classes are placed in different folder for
each database.

Could that be done ?

Pls advice.

Thanks

Vikas



[Vikas Phonsa] 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multiple Seperate Database Projects

Posted by Jason van Zyl <jv...@maven.org>.
On Tue, 2003-12-02 at 16:58, Vikas Phonsa wrote:
> Hi,
> 
> I want to configure Torque (I'm using 3.0) to be able to do the following
> functionality and I would appreciate advice and instructions abt how that
> could be done:

This is a torque question, please use the torque mailing list.

> I have a Torque-Gen folder and when I make a schema (in the schema
> subfolder) and modify the properties and stuff and run torque ant script it
> generates the java classes and sql under the "src" folder under Torque-Gen.
> 
> 
> I want to make separate folders for different databases like Database1,
> Database2 etc and put the schema and build.properties for each database in
> its separate folder. And then specify the location of the Database/folder I
> want to work on in the default.properties folder, so that the properties and
> the schema is loaded from Database folders like from Database1 folder and
> also the generated sql and java classes are placed in different folder for
> each database.
> 
> Could that be done ?
> 
> Pls advice.
> 
> Thanks
> 
> Vikas
> 
> 
> 
> [Vikas Phonsa] 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multiple Seperate Database Projects

Posted by "Craig S. Cottingham" <cr...@cottingham.net>.
On Tue, 2003-12-02 at 15:58, Vikas Phonsa wrote:
> I want to make separate folders for different databases like Database1,
> Database2 etc and put the schema and build.properties for each database in
> its separate folder. And then specify the location of the Database/folder I
> want to work on in the default.properties folder, so that the properties and
> the schema is loaded from Database folders like from Database1 folder and
> also the generated sql and java classes are placed in different folder for
> each database.
> 
> Could that be done ?

I do something similar to what you're asking for, but in a different
way.

First, I keep all of the properties for controlling Torque in a single
XML file. Then, for each DBMS I support, I have a goal in maven.xml
which transforms the XML file using XSLT into build.properties, moves
that to the appropriate directory, attains the torque:sql goal, then
moves the resulting files to the appropriate subdirectory under target.

It's an ugly, ugly hack, compounded by the fact that I never could get
XSLT to work inside Maven, so I have to call out to a separate Ant build
file. If had to do it over again, I could probably find a cleaner way to
do it, but what I have works for me for now.

-- 
Craig S. Cottingham
craig@cottingham.net


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org