RE: hibernate3-maven-plugin:hbm2java - Setup Problems

2006-04-18 Thread Roye, Suhneel BGI SF
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.
configurationisAnnotationsEnabledfalse/isAnnotationsEnabled/confi
guration
3. hbm2java isAnnotationsEnabled=false 4.
hbm2javaisAnnotationsEnabledfalse/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
idsnapshots/id
urlhttp://snapshots.maven.codehaus.org/maven2/url
/pluginRepository
/pluginRepositories

.
.
.
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdhibernate3-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

RE: hibernate3-maven-plugin:hbm2java - Setup Problems

2006-04-18 Thread Roye, Suhneel BGI SF
FYI, here's the stack trace that led me to believe that the
hibernate3-maven-plugin requires Log4J:

[INFO] [hibernate3:hbm2java]
[INFO]


[ERROR] FATAL ERROR
[INFO]


[INFO] null
org/apache/log4j/Category
[INFO]


[INFO] Trace
java.lang.ExceptionInInitializerError
at
org.codehaus.mojo.hibernate3.exporter.Hbm2JavaGeneratorMojo.createExport
er(Hbm2JavaGeneratorMojo.java:68)
at
org.codehaus.mojo.hibernate3.HibernateExporterMojo.doExecute(HibernateEx
porterMojo.java:93)
at
org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExpo
rterMojo.java:60)

at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:415)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:531)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:485)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:455)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:303)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:270)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:139)
at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@e7f6eb for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@e7f6eb for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category))
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImp
l.java:543)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp
l.java:235)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp
l.java:209)
at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at
org.hibernate.tool.hbm2x.POJOExporter.clinit(POJOExporter.java:19)
... 21 more
Caused by: org.apache.commons.logging.LogConfigurationException: No
suitable Log constructor [Ljava.lang.Class;@e7f6eb for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category)
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFact
oryImpl.java:413)

at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImp
l.java:529)
... 25 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
at java.lang.Class.getDeclaredConstructors0(Native Method)
at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
at java.lang.Class.getConstructor0(Class.java:2640)
at java.lang.Class.getConstructor(Class.java:1629)
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFact
oryImpl.java:410)

... 26 more


-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

RE: hibernate3-maven-plugin:hbm2java - Setup Problems

2006-04-18 Thread Johann Reyes
Hello Suhneel

Hmm looks like you are talking about the namingstrategy in hibernate, that
you can find about it here:

http://www.hibernate.org/hib_docs/v3/api/org/hibernate/cfg/NamingStrategy.ht
ml

Also thanks for the stacktrace, I'll have a fun weekend trying to tackle
this, lol. If you need more help just let me know.

Regards

Johann Reyes

-Original Message-
From: Roye, Suhneel BGI SF [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 18, 2006 1:16 PM
To: Maven Users List
Subject: RE: hibernate3-maven-plugin:hbm2java - Setup Problems

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.
configurationisAnnotationsEnabledfalse/isAnnotationsEnabled/confi
guration
3. hbm2java isAnnotationsEnabled=false 4.
hbm2javaisAnnotationsEnabledfalse/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
idsnapshots/id
urlhttp://snapshots.maven.codehaus.org/maven2/url
/pluginRepository
/pluginRepositories

.
.
.
plugin

RE: hibernate3-maven-plugin:hbm2java - Setup Problems

2006-04-18 Thread Gwyn

Hi,
  I'm no expert, but it looks to me as if the log4j connection is as a
result of clogging.  Whether it's as a result of implicit or explict config,
I've no idea...
/Gwyn
--
View this message in context: 
http://www.nabble.com/hibernate3-maven-plugin%3Ahbm2java---Setup-Problems-t1463811.html#a3974445
Sent from the Maven - Users forum at Nabble.com.


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



RE: hibernate3-maven-plugin:hbm2java - Setup Problems

2006-04-17 Thread Johann Reyes
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
idsnapshots/id
urlhttp://snapshots.maven.codehaus.org/maven2/url
/pluginRepository
/pluginRepositories

.
.
.
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdhibernate3-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]



RE: hibernate3-maven-plugin:hbm2java - Setup Problems

2006-04-17 Thread Roye, Suhneel BGI SF
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.
configurationisAnnotationsEnabledfalse/isAnnotationsEnabled/confi
guration
3. hbm2java isAnnotationsEnabled=false
4.
hbm2javaisAnnotationsEnabledfalse/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
idsnapshots/id
urlhttp://snapshots.maven.codehaus.org/maven2/url
/pluginRepository
/pluginRepositories

.
.
.
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdhibernate3-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]



RE: hibernate3-maven-plugin:hbm2java - Setup Problems

2006-04-17 Thread Johann Reyes
Hello Suhneel

I just finished deploying a new snapshot that allows that, please refer to:

http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/hbm2java-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.
configurationisAnnotationsEnabledfalse/isAnnotationsEnabled/confi
guration
3. hbm2java isAnnotationsEnabled=false
4.
hbm2javaisAnnotationsEnabledfalse/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
idsnapshots/id
urlhttp://snapshots.maven.codehaus.org/maven2/url
/pluginRepository
/pluginRepositories

.
.
.
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdhibernate3-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

RE: hibernate3-maven-plugin:hbm2java - Setup Problems

2006-04-17 Thread Roye, Suhneel BGI SF
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.
configurationisAnnotationsEnabledfalse/isAnnotationsEnabled/confi
guration
3. hbm2java isAnnotationsEnabled=false 4.
hbm2javaisAnnotationsEnabledfalse/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
idsnapshots/id
urlhttp://snapshots.maven.codehaus.org/maven2/url
/pluginRepository
/pluginRepositories

.
.
.
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdhibernate3-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

RE: hibernate3-maven-plugin:hbm2java - Setup Problems

2006-04-17 Thread Johann Reyes
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.
configurationisAnnotationsEnabledfalse/isAnnotationsEnabled/confi
guration
3. hbm2java isAnnotationsEnabled=false 4.
hbm2javaisAnnotationsEnabledfalse/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
idsnapshots/id
urlhttp://snapshots.maven.codehaus.org/maven2/url
/pluginRepository
/pluginRepositories

.
.
.
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdhibernate3-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