Re: Generate DDL with Maven2, Spring2 and Hibernate3

2007-07-06 Thread animedj

Hello sufyan

All depends on what is getting loaded. If it is annotated classes, yes, you
need a hibernate.cfg.xml

If it is hbm.xml and it's part of your current classpath, the plugin can
automatically loaded without the need to specify what classes.

Also you can define the datasource settings in the database.properties file
as specified here:
http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/componentproperties.html

Regards

Johann reyes

On 7/6/07, Sufyan Arif <[EMAIL PROTECTED]> wrote:



Hi,

We also have to duplicate the information in the hibernate.cfg.xml file in
order to generate the ddl. I'd be interested to know how you manage to
avoid
having one? For e.g. how does the hibernate3-maven-plugin know which
domain
objects to generate the ddl for? Also where do you define the data source
settings?

thanks
Sufyan


On Friday 06 July 2007 13:37:15 animedj wrote:
> Hello Jonas
>
> But if the classes that you need to load are in your classpath, it
should
> load it automatically and you shouldn't need a
> hibernate.cfg.xmlconfiguration file. But recommended is to have one.
>
> Regards
>
> Johann Reyes

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Generate DDL with Maven2, Spring2 and Hibernate3

2007-07-06 Thread Sufyan Arif

Hi,

We also have to duplicate the information in the hibernate.cfg.xml file in 
order to generate the ddl. I'd be interested to know how you manage to avoid 
having one? For e.g. how does the hibernate3-maven-plugin know which domain 
objects to generate the ddl for? Also where do you define the data source 
settings?

thanks
Sufyan


On Friday 06 July 2007 13:37:15 animedj wrote:
> Hello Jonas
>
> But if the classes that you need to load are in your classpath, it should
> load it automatically and you shouldn't need a
> hibernate.cfg.xmlconfiguration file. But recommended is to have one.
>
> Regards
>
> Johann Reyes

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Generate DDL with Maven2, Spring2 and Hibernate3

2007-07-06 Thread animedj

Hello Jonas

But if the classes that you need to load are in your classpath, it should
load it automatically and you shouldn't need a
hibernate.cfg.xmlconfiguration file. But recommended is to have one.

Regards

Johann Reyes

On 7/4/07, David J. M. Karlsen <[EMAIL PROTECTED]> wrote:


Jonas Thurfors wrote:
> I want to generate a DDL using Maven2, Spring2 and Hibernate3.
>
> I would like to use the maven-hibernate3-plugin with the goal
> hibernate3:hbm2ddl, but I don't use the hibernate.cfg.xml file,
> instead I'm configuring Hibernate with Spring's
> LocalSessionFactoryBean. How do I get the hibernate3 plugin to use my
> configuration?
unfortunately you have to configure it twice - or "refactor" out your
settings to hibernate.cfg.xml and point the spring configured
localsession... to it.

--
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Generate DDL with Maven2, Spring2 and Hibernate3

2007-07-04 Thread David J. M. Karlsen

Jonas Thurfors wrote:

I want to generate a DDL using Maven2, Spring2 and Hibernate3.

I would like to use the maven-hibernate3-plugin with the goal
hibernate3:hbm2ddl, but I don't use the hibernate.cfg.xml file,
instead I'm configuring Hibernate with Spring's
LocalSessionFactoryBean. How do I get the hibernate3 plugin to use my
configuration?
unfortunately you have to configure it twice - or "refactor" out your 
settings to hibernate.cfg.xml and point the spring configured 
localsession... to it.


--
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Generate DDL with Maven2, Spring2 and Hibernate3

2007-07-04 Thread Jonas Thurfors

I want to generate a DDL using Maven2, Spring2 and Hibernate3.

I would like to use the maven-hibernate3-plugin with the goal
hibernate3:hbm2ddl, but I don't use the hibernate.cfg.xml file,
instead I'm configuring Hibernate with Spring's
LocalSessionFactoryBean. How do I get the hibernate3 plugin to use my
configuration?

Kind Regards,
Jonas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]