-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Calling Exporter class from custom plugin
PostPosted: Wed Mar 18, 2009 10:33 am 
Beginner
Beginner

Joined: Sun Jan 06, 2008 9:59 pm
Posts: 20
Hello,

I have looked through the forum and only find some very old post from around 2003 and 2006 talking about this. Basically I have about 20 ant tasks for generating different types of objects. I would like to clean that up a little and just create a plugin that can call all these task and then do some post processing. I have been looking through the ant lib code to see what it is doing and tried to mimic that, but not having a lot of luck.

Is there any examples of calling the java classes to do the code gen from another java class?

Is the ant source a good place to be looking for a code example.

Thank in advance

Jeff


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 19, 2009 9:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
depends what you want to do - are those 20 ant tasks just <hbmtemplate>'s or ?

I would keep them in that format unless you really want to do complex stuff. But then yes, the ant tasks and exporter's them self shows it.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Calling Exporter class from custom plugin
PostPosted: Thu Mar 19, 2009 9:16 am 
Beginner
Beginner

Joined: Sun Jan 06, 2008 9:59 pm
Posts: 20
Hello,

Thanks. Yes most of them are the generic. I do also have single instances of

<hbm2java jdk5="true"/>
<hbm2dao jdk5="true"/>
<hbm2hbmxml />
<hbm2cfgxml />

Digging a little further I am having runtime classpath problem. This is the first plugin I have ever written, so the dev environment is a little different. but basically it is not finding the hibernate jars during runtime but of course can find them to compile. So something of a packaging / environment setup that I need to get through, then I might have more questions on calling the exporters.

Thanks!

Jeff


Top
 Profile  
 
 Post subject: Calling Exporter class from custom plugin
PostPosted: Thu Mar 19, 2009 9:16 am 
Beginner
Beginner

Joined: Sun Jan 06, 2008 9:59 pm
Posts: 20
Hello,

Thanks. Yes most of them are the generic. I do also have single instances of

<hbm2java jdk5="true"/>
<hbm2dao jdk5="true"/>
<hbm2hbmxml />
<hbm2cfgxml />

Digging a little further I am having runtime classpath problem. This is the first plugin I have ever written, so the dev environment is a little different. but basically it is not finding the hibernate jars during runtime but of course can find them to compile. So something of a packaging / environment setup that I need to get through, then I might have more questions on calling the exporters.

Thanks!

Jeff


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 19, 2009 9:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
are you doing an eclipse plugin or just a custom hibernate exporter ?

the latter should just work ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Calling Exporter class from custom plugin
PostPosted: Thu Mar 19, 2009 9:50 am 
Beginner
Beginner

Joined: Sun Jan 06, 2008 9:59 pm
Posts: 20
Hello,

I am building an eclipse plugin that will call several of the hibernate exporters. Just trying to put a better UI instead of ant scripts. I also want to do some post processing of the files. So actually all the hibernate exporters do want I need, I just want to make my process more turn key.

Thanks

Jeff


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 19, 2009 8:04 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
So do a hibernate exporter that groups these and use the hibernate code generation stuff in eclipse to launch the codegen with a single hbmtemplate that points to your exporter.

But of course if you want more on top of that then you need to write some custom eclipse stuff.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.