Brice is correct. I'm using Hibernate annotations w/ the javax persistence API and you simply have to include it as a dependency and have support for jdk 1.5+ in your IDE.
Kris On Thu, 2007-08-16 at 11:25 -0600, Brice Lambi wrote: > I've never used the hibernate annotations so I can't give too much > advice on that. But it should be as simple as adding > hibernate-annotations as a dependency on your maven project and > running 'mvn eclipse:eclipse' and/or 'mvn eclipse:add-maven-rep' to > make the eclipse project files and then eclipse should be able to auto > resolve those annotation imports for you. But yes, jdbcconfiguration > allows you to reverse engineer a schema or generate a schema if you > manually create your hbm mapping files. To use the > annotationconfiguration you will need to specify which package you > would like it to examine, but it should work in the same manner > (generating hbm files and a schema). > > Sorry, I don't have any advice on the doclet plugin. > > Cheers, > Brice > > > On 8/14/07, Roberto del Fuego <[EMAIL PROTECTED]> wrote: > Hi Brice, > > Thanks for the reply! Sorry for asking questions but there is > no substantial documentation for the plugin that I have > noticed (or if there is, could someone point me to it please?) > jdbcconfiguration I presume lets you reverse engineer by > pointing to an existing schema and annotationconfiguration by > using annotations. Is this correct? > > I tried opening Eclipse, adding an anntotation (with the > @entity tag) and running the goal again but I have a few > problems still in that Eclipse doesn't recognise the > annotation (I'm not sure how to use them; I donwloaded the > hibernate annotations jar and put it in the compiler's > annotation processing factory setting. AI know this is not a > maven problem, but any pointers would be appreciated). > > So maybe I should go for the path of least resistence and use > the hibernatedoclet plugin instead. Does anyone know how to > use this (or again, could point me into some documentation). > The search function on the codehaus site doesn't seem to work > so I can search the mailing lists easily. Hibernatedoclet > would be a quick win for me if someone would have a sample > pom.xml that I could view. > > Thanks very much for your help! > > Roberto > ----- Original Message ----- > From: Brice Lambi > To: [email protected] > Sent: Monday, August 13, 2007 5:55 PM > Subject: Re: [mojo-user] Hibernate3 plugin - How to > generate hbm xml mapping files > > > The hbm2hbmxml goal should generate those files for > you. It depends on how you have things setup if you > want to use annotationconfiguration or > jdbcconfiguration. If you have a schema that can be > reverse engineered then it can do it from that. I > believe there is some default behavior that it will > use if your classes do not use annotations, you just > need to add the classes you want mappings for to > hibernate.cfg.xml. > > Good luck! > > > On 8/13/07, Roberto del Fuego > <[EMAIL PROTECTED] > wrote: > Hi, > > I'm trying to use the Hibernate3 plugin and > could use some help if you > wouldn't mind. > > How can I generate the .hbm.xml mapping files? > Do I put XDoclet style > annotations on my classes? Are the mapping > files then generated and > included in the .cfg.xml file? > > I have a hibernate.properties file and have > run hibernate3:hbm2cfgxml: > this generates me a hibernate.cfg.xml file but > now I want to generate > the .hbm.xml files. > > Any help (or possibly a zipfile sample) would > be *really* apreciated!! > > > thanks very much for your help, > > Roberto > > > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
