Sweet! This is exactly what I was looking for. Thanks for getting the plugin updated so quickly.
There is one other small enhancement that would be nice - the generated POJO's use capital letters to start variable names that represent associated entities (other variables are fine). It would be nice (and more standardized) if they could adhere to the "first letter lowercase" rule when naming variables for associated entities. Thanks again, Johann. -----Original Message----- From: Johann Reyes [mailto:[EMAIL PROTECTED] Sent: Monday, April 17, 2006 6:08 PM To: 'Maven Users List' Subject: RE: hibernate3-maven-plugin:hbm2java - Setup Problems Hello Suhneel Yes, it would let you turn off generics ( 2 flags, jdk5 for generics and ejb3 for annotations ) even if you are using jdk 1.5 About Log4j, I'll research some more, with my test I don't have the need to include log4j in the pom.xml Regards Johann Reyes -----Original Message----- From: Roye, Suhneel BGI SF [mailto:[EMAIL PROTECTED] Sent: Monday, April 17, 2006 8:58 PM To: Maven Users List Subject: RE: hibernate3-maven-plugin:hbm2java - Setup Problems I haven't tried out the new snapshot yet - will it still let me use JDK 1.5 but only disable annotations (the documentation I read included a JDK5 flag, but made no mention of turning off only annotations in JDK 1.5)? I added the Log4J dependency to my POM, just like any other dependency. I'm using Hibernate 3.1.2. -----Original Message----- From: Johann Reyes [mailto:[EMAIL PROTECTED] Sent: Monday, April 17, 2006 5:12 PM To: 'Maven Users List' Subject: RE: hibernate3-maven-plugin:hbm2java - Setup Problems Hello Suhneel I just finished deploying a new snapshot that allows that, please refer to: http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/hbm2ja va-m ojo.html Regards Johann Reyes Ps also I'm looking into the log4j dependency, how did you add it? And also what exact version of hibernate are you using in your dependencies list? -----Original Message----- From: Roye, Suhneel BGI SF [mailto:[EMAIL PROTECTED] Sent: Monday, April 17, 2006 6:15 PM To: Maven Users List Subject: RE: hibernate3-maven-plugin:hbm2java - Setup Problems I got my problem figured out...I needed to add a dependency on log4j, which looks like it's being used by the internals of the mojo. I now have POJO's being generated from my Hibernate mapping files. I'm using JDK 1.5, but I would like annotations disabled (I would still like to use generics and autoboxing, however). I looked at the mojo API and the HibernateExporterMojo has an "isAnnotationsEnabled" property, which I would like to set to false. I tried setting it in various places in my POM, but none worked: 1. <configuration isAnnotationsEnabled="false"> 2. <configuration><isAnnotationsEnabled>false</isAnnotationsEnabled></confi guration> 3. <hbm2java isAnnotationsEnabled="false"> 4. <hbm2java><isAnnotationsEnabled>false</isAnnotationsEnabled></hbm2java> Can I manually disable annotations, and if so, where is the correct place in my POM/Hibernate configuration to disable JDK 1.5 annotations? I would like to avoid changing my Java version back to 1.4 just for this goal, to avoid the creation of annotations in my POJO's. Thanks much. -----Original Message----- From: Johann Reyes [mailto:[EMAIL PROTECTED] Sent: Monday, April 17, 2006 1:32 PM To: 'Maven Users List' Subject: RE: hibernate3-maven-plugin:hbm2java - Setup Problems Hello Suhneel; Could you please run "mvn -X hibernate3:hbm2java" and send me the output? Also what jdk you are running? Regards Johann Reyes -----Original Message----- From: Roye, Suhneel BGI SF [mailto:[EMAIL PROTECTED] Sent: Monday, April 17, 2006 3:34 PM To: Maven Users List Subject: hibernate3-maven-plugin:hbm2java - Setup Problems I am trying to set up the Hibernate3 plugin for Maven2. Specifically, I would like to have the plugin generate POJO's from *.hbm.xml mapping files. Relevant portions of my project directory structure: Hibernate Configuration: <project>/src/main/resources/hibernate.cfg.xml Hibernate Mappings: <project>/src/main/resources/com/mycompany/app/*.hbm.xml Target directory for generated POJO's: <project>/src/main/java/com/mycompany/app/*.java POM snippet: . . . <pluginRepositories> <pluginRepository> <id>snapshots</id> <url>http://snapshots.maven.codehaus.org/maven2</url> </pluginRepository> </pluginRepositories> . . . <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>hibernate3-maven-plugin</artifactId> <configuration> <hibernate> <configurationFile>/src/main/resources/hibernate.cfg.xml</configurationF ile> </hibernate> <outputDirectory> <hbm2java>/src/main/java</hbm2java> </outputDirectory> </configuration> </plugin> . . . Hibernate configuration snippet: . . . <mapping resource="com/mycompany/app/TableOne.hbm.xml"/> <mapping resource="com/mycompany/app/TableTwo.hbm.xml"/> <mapping resource="com/mycompany/app/TableThree.hbm.xml"/> . . When I run "mvn hibernate3:hbm2java", I get an error and no POJO's are generated. The top of my stack trace is: java.lang.ExceptionInInitializerError at org.codehaus.mojo.hibernate3.exporter.Hbm2JavaGeneratorMojo.createExport er(Hbm2JavaGeneratorMojo.java:52) Can someone please point out what I'm missing or doing wrong? Thanks. This message and any attachments are confidential, proprietary, and may be privileged. If this message was misdirected, Barclays Global Investors (BGI) does not waive any confidentiality or privilege. If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of BGI, unless the author is authorized by BGI to express such views or opinions on its behalf. All email sent to or from this address is subject to electronic storage and review by BGI. Although BGI operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]