Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-31 Thread O. Bigalk

Hi Peter 

thank you for this information. 

Unfortunatly I am forced to use maven 1.0.2 by our business commandment and
therefor can not use the hibernate3-maven-plugin.

Best Regards
Olaf Bigalk
--
View this message in context: 
http://www.nabble.com/Problem-hibernate3-plugin-cfg2cfgxml-t1310262.html#a3685476
Sent from the Maven - Users forum at Nabble.com.


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



RE: Problem hibernate3 plugin cfg2cfgxml

2006-03-31 Thread O. Bigalk


Johann Reyes-2 wrote:
 
 Hi Bigalk
 
 Right now the hibernate3-maven-plugin is available as a snapshot only and
 it
 is a maven 2.x plugin.
 
 You can find information about the plugin here:
 
 http://mojo.codehaus.org/hibernate3-maven-plugin
 ...
 

Thank you for the link, but I did not find there any download link for a
plugin binary distribution.

Regards
Olaf Bigalk

--
View this message in context: 
http://www.nabble.com/Problem-hibernate3-plugin-cfg2cfgxml-t1310262.html#a3685566
Sent from the Maven - Users forum at Nabble.com.


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



Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-28 Thread O. Bigalk

Hi Taavi,

where can I get the hibernate3-maven-plugin ?
I found some documentation on it on codehaus.org but I didn't see any binary
distribution of it.
I also checked the source repository at svn.mojo.codehaus.org but the source
distribution seems also incomplet regarding to its dependencies.
Does the hibernate3-maven-plugin run with maven 1.0.2 ?

--
View this message in context: 
http://www.nabble.com/Problem-hibernate3-plugin-cfg2cfgxml-t1310262.html#a3629767
Sent from the Maven - Users forum at Nabble.com.


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



Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-28 Thread Peter L. Berghold
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

O. Bigalk wrote:
 
 
 where can I get the hibernate3-maven-plugin ?
 

Add the following to your pom.xml

pluginRepositories
  pluginRepository
idsnapshots/id
urlhttp://snapshots.maven.codehaus.org/maven2/url
  /pluginRepository
/pluginRepositories

I also have

build
plugins
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdhibernate3-maven-plugin/artifactId
configuration
config/src/main/resources/hibernate.cfg.xml/config
/configuration
/plugin
/plugins
/build

in my POM as well.



- --

Peter L. Berghold [EMAIL PROTECTED]
Those who fail to learn from history are condemned to repeat it.
AIM: redcowdawgYahoo IM: blue_cowdawg  ICQ: 11455958
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

iD8DBQFEKUDwUM9/01RIhaARApDuAJ9KTjMpPazpfwPZavWgcKb3aqLykgCfRN7L
2q1OHS05poMaOGrIfgjVFyA=
=y1Yz
-END PGP SIGNATURE-

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

RE: Problem hibernate3 plugin cfg2cfgxml

2006-03-28 Thread Johann Reyes
Hi Bigalk

Right now the hibernate3-maven-plugin is available as a snapshot only and it
is a maven 2.x plugin.

You can find information about the plugin here:

http://mojo.codehaus.org/hibernate3-maven-plugin

If you have any other question, please feel free to ask.

Regards

Johann Reyes

-Original Message-
From: O. Bigalk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 28, 2006 8:44 AM
To: users@maven.apache.org
Subject: Re: Problem hibernate3 plugin cfg2cfgxml


Hi Taavi,

where can I get the hibernate3-maven-plugin ?
I found some documentation on it on codehaus.org but I didn't see any binary
distribution of it.
I also checked the source repository at svn.mojo.codehaus.org but the source
distribution seems also incomplet regarding to its dependencies.
Does the hibernate3-maven-plugin run with maven 1.0.2 ?

--
View this message in context:
http://www.nabble.com/Problem-hibernate3-plugin-cfg2cfgxml-t1310262.html#a36
29767
Sent from the Maven - Users forum at Nabble.com.


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




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



Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-23 Thread Taavi Sildeberg

Hello everybody,

I got rid of this error, sot that the next one can come and torture me  :)
This time stack trace is following:

com.thoughtworks.qdox.parser.ParseException: syntax error @[10,2] in 
file:/C:/devTest/timemanager/data/src/main/java/ee/zero/data/user/Address.java
at 
com.thoughtworks.qdox.parser.impl.Parser.yyerror(Parser.java:504)
at 
com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:610)

at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:488)
at 
com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:296)
at 
com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:312)
at 
com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:308)
at 
com.thoughtworks.qdox.JavaDocBuilder$1.visitFile(JavaDocBuilder.java:365)
at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:43)
at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.scan(DirectoryScanner.java:52)
at 
com.thoughtworks.qdox.JavaDocBuilder.addSourceTree(JavaDocBuilder.java:362)
at 
org.codehaus.mojo.hibernate3.HibernateUtils.getAnnotatedClasses(HibernateUtils.java:52)
at 
org.codehaus.mojo.hibernate3.HibernateExporterMojo.getConfiguration(HibernateExporterMojo.java:108)
at 
org.codehaus.mojo.hibernate3.HibernateExporterMojo.doExecute(HibernateExporterMojo.java:83)
at 
org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:57)
at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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)


If I look in to the Address.java then on 1o line is @Entity annotation. 
this is probably stupid question, but does qdox can understand java 1.5 
 annotations?   '



Taavi



Taavi Sildeberg wrote:

Hello,

I try to use plugin, but now  I get this error:

[INFO] Unresolved compilation problem:

[INFO] 
 


[DEBUG] Trace
java.lang.Error: Unresolved compilation problem:

at 
org.codehaus.mojo.hibernate3.HibernateUtils.getClassLoader(HibernateUtils.java:79) 

at 
org.codehaus.mojo.hibernate3.HibernateExporterMojo.getClassLoader(HibernateExporterMojo.java:195) 

at 
org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:56) 

at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415) 

at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531) 

at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485) 

at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455) 

at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303) 

at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270) 


Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-22 Thread Taavi Sildeberg

Hey Sylvain,

If this is not so big trouble can you send me some sample pom.xml, from 
I can learn how to configure your plugin?


Taavi


Sylvain Vieujot wrote:

I filled a Jira new feature request where you can find the source code
attached :

http://jira.codehaus.org/browse/MHIBERNATE-1

Hope this helps.

Sylvain.

On Tue, 2006-03-21 at 12:56 -0500, Johann Reyes wrote:


Hello Sylvian

Yes, I would be interested to take a look, I'll gladly accept the help. And
don't worry, the implementation I think would be fairly easy since I know
when a person is using annotations or not.

Thanks

Johann Reyes

-Original Message-
From: Sylvain Vieujot [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 11:39 AM

To: Maven Users List
Subject: RE: Problem hibernate3 plugin cfg2cfgxml

I did a private maven plugin that does just that : Fetch the annotations
and add the mapping class=.../ to an hibernate.cfg.xml file.
It would need to be a bite polished to go in a public repository, but if
you're interested, I could review it a bite to contribute it.

It works only for annotations though, but it can be combined with the
xdoclet plugin for the one that need to mix them

Best regards,

Sylvain Vieujot.

On Tue, 2006-03-21 at 08:39 -0500, Johann Reyes wrote:


Hello Taavi

Right now, hibernate-tools supports creation of hibernate.cfg.xml with
mappings automatically only with hbm.xml files. I'll check if they are
planning to support Annotations this way too, but at the moment is not
supported.

Regards

Johann Reyes

-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 8:33 AM

To: Maven Users List
Subject: Re: Problem hibernate3 plugin cfg2cfgxml

Hey,

But is there any way to create hibernate.cfg.xml with mappings 
automatically or I really write it manually?

Maby same ant task, or other tool, preferably maven 2 :)

Taavi


Johann Reyes wrote:

Hello Taavi

Ahh sorry, my mistake, I run my test, but I had the a hibernate.cfg.xml
al;ready setup and didn't notice that. After doing a little more

research,

the goal cfg2cfgxml is more for hbm files, since annotated classes there

is

no other way around that to have it specified in a hibernate.cfg.xml

file

as

per



http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setu

p-configuration

As it states there is no other way around. I'll keep looking into it to

see

if I can find a workaround but for that moment I have to say that you

need

to initially have a hibernate.cfg.xml file before using annotations with
hibernate.

Regards

Johann Reyes




-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 2:27 AM

To: Johann Reyes; users@maven.apache.org
Subject: Re: Problem hibernate3 plugin cfg2cfgxml

Thank you Johann for so quick answer.

Yes a have set the ejb3 to true.
Here is my pom.xml configuration:

  build
 plugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-compiler-plugin/artifactId
 configuration
   source1.5/source
   target1.5/target
 /configuration
   /plugin
   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdhibernate3-maven-plugin/artifactId
 configuration
   ejb3true/ejb3
   config
 /target/hibernatetools/hibernate.cfg.xml
   /config
   jdk5true/jdk5
   outputFile
 target/hibernatetools/db-schema.sql
   /outputFile
   properties
 /src/main/resources/hibernate.properties
   /properties
 /configuration
   /plugin
 /plugins

 extensions
   extension
 groupIdoracle/groupId
 artifactIdjdbc/artifactId
 version10.2.0.1.0/version
   /extension
 /extensions

   /build

And hibernate properties is following:

hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:orcl
hibernate.connection.username = blablah
hibernate.connection.password = blablah
hibernate.dialect = org.hibernate.dialect.Oracle9Dialect


Can you suggest what else could be wrong?


Taavi


Johann Reyes wrote:

Hello Taavi

Did you set the ejb3 parameter to true?

You can see an example here:



https://svn.mojo.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-

plugin/src/test/project-jdk15/pom.xml

Regards

Johann Reyes

-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 20, 2006 5:30 AM

To: Maven Users List
Subject: Problem hibernate3 plugin cfg2cfgxml

Hello,

I have a three java files with annotations. When I try to generate the 
hibernate.cfg.xml with maven.hibernte3.plugin, then the mapped classes 
are never included inside hibernate.cfg.xml file. If I add them manualy

then hbm2ddl works fine.
In the plugin manual is that hibernate3:cfg2cfgxml generates

RE: Problem hibernate3 plugin cfg2cfgxml

2006-03-22 Thread Johann Reyes
Heelo Taavi:

You can find an example here:

jdk4:
https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-plugi
n/src/test/project-jdk14

jd5:
https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-plugi
n/src/test/project-jdk15

Regards 

Johann Reyes

-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 22, 2006 6:13 AM
To: Maven Users List
Subject: Re: Problem hibernate3 plugin cfg2cfgxml

Hey Sylvain,

If this is not so big trouble can you send me some sample pom.xml, from 
I can learn how to configure your plugin?

Taavi


Sylvain Vieujot wrote:
 I filled a Jira new feature request where you can find the source code
 attached :
 
 http://jira.codehaus.org/browse/MHIBERNATE-1
 
 Hope this helps.
 
 Sylvain.
 
 On Tue, 2006-03-21 at 12:56 -0500, Johann Reyes wrote:
 
 Hello Sylvian

 Yes, I would be interested to take a look, I'll gladly accept the help.
And
 don't worry, the implementation I think would be fairly easy since I know
 when a person is using annotations or not.

 Thanks

 Johann Reyes

 -Original Message-
 From: Sylvain Vieujot [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 21, 2006 11:39 AM
 To: Maven Users List
 Subject: RE: Problem hibernate3 plugin cfg2cfgxml

 I did a private maven plugin that does just that : Fetch the annotations
 and add the mapping class=.../ to an hibernate.cfg.xml file.
 It would need to be a bite polished to go in a public repository, but if
 you're interested, I could review it a bite to contribute it.

 It works only for annotations though, but it can be combined with the
 xdoclet plugin for the one that need to mix them

 Best regards,

 Sylvain Vieujot.

 On Tue, 2006-03-21 at 08:39 -0500, Johann Reyes wrote:

 Hello Taavi

 Right now, hibernate-tools supports creation of hibernate.cfg.xml with
 mappings automatically only with hbm.xml files. I'll check if they are
 planning to support Annotations this way too, but at the moment is not
 supported.

 Regards

 Johann Reyes

 -Original Message-
 From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 21, 2006 8:33 AM
 To: Maven Users List
 Subject: Re: Problem hibernate3 plugin cfg2cfgxml

 Hey,

 But is there any way to create hibernate.cfg.xml with mappings 
 automatically or I really write it manually?
 Maby same ant task, or other tool, preferably maven 2 :)

 Taavi


 Johann Reyes wrote:
 Hello Taavi

 Ahh sorry, my mistake, I run my test, but I had the a hibernate.cfg.xml
 al;ready setup and didn't notice that. After doing a little more
 research,
 the goal cfg2cfgxml is more for hbm files, since annotated classes
there
 is
 no other way around that to have it specified in a hibernate.cfg.xml
 file
 as
 per



http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setu
 p-configuration

 As it states there is no other way around. I'll keep looking into it to
 see
 if I can find a workaround but for that moment I have to say that you
 need
 to initially have a hibernate.cfg.xml file before using annotations
with
 hibernate.

 Regards

 Johann Reyes




 -Original Message-
 From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 21, 2006 2:27 AM
 To: Johann Reyes; users@maven.apache.org
 Subject: Re: Problem hibernate3 plugin cfg2cfgxml

 Thank you Johann for so quick answer.

 Yes a have set the ejb3 to true.
 Here is my pom.xml configuration:

   build
  plugins
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-compiler-plugin/artifactId
  configuration
source1.5/source
target1.5/target
  /configuration
/plugin
plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdhibernate3-maven-plugin/artifactId
  configuration
ejb3true/ejb3
config
  /target/hibernatetools/hibernate.cfg.xml
/config
jdk5true/jdk5
outputFile
  target/hibernatetools/db-schema.sql
/outputFile
properties
  /src/main/resources/hibernate.properties
/properties
  /configuration
/plugin
  /plugins

  extensions
extension
  groupIdoracle/groupId
  artifactIdjdbc/artifactId
  version10.2.0.1.0/version
/extension
  /extensions

/build

 And hibernate properties is following:

 hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
 hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:orcl
 hibernate.connection.username = blablah
 hibernate.connection.password = blablah
 hibernate.dialect = org.hibernate.dialect.Oracle9Dialect


 Can you suggest what else could be wrong?


 Taavi


 Johann Reyes wrote:
 Hello Taavi

 Did you set the ejb3 parameter to true?

 You can see an example here:



https://svn.mojo.codehaus.org/mojo/trunk/mojo/mojo-sandbox

Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-22 Thread Sylvain Vieujot




To configure the plugin you need :

1) To add the tag !-- Include Mapping classes here -- to your hibernate.cfg.xml file at the location where you want the mappings to be included.

2) To add the following to your pom's build/plugins section :

 plugin
groupIdcom.seanergie.maven.plugins/groupId
artifactIdhibernate-annotations/artifactId
version1.0-SNAPSHOT/version
executions
	execution
		phasecompile/phase
		goals
			goalmappings-compile/goal
		/goals
	/execution
/executions
			/plugin

			plugin
groupIdcom.seanergie.maven.plugins/groupId
artifactIdhibernate-annotations/artifactId
version1.0-SNAPSHOT/version
executions
	execution
		phasetest-compile/phase
		goals
			goalmappings-test/goal
		/goals
	/execution
/executions
			/plugin

I attach a sample striped down pom.xml.

On Wed, 2006-03-22 at 13:13 +0200, Taavi Sildeberg wrote:


Hey Sylvain,

If this is not so big trouble can you send me some sample pom.xml, from 
I can learn how to configure your plugin?

Taavi


Sylvain Vieujot wrote:
 I filled a Jira new feature request where you can find the source code
 attached :
 
 http://jira.codehaus.org/browse/MHIBERNATE-1
 
 Hope this helps.
 
 Sylvain.
 
 On Tue, 2006-03-21 at 12:56 -0500, Johann Reyes wrote:
 
 Hello Sylvian

 Yes, I would be interested to take a look, I'll gladly accept the help. And
 don't worry, the implementation I think would be fairly easy since I know
 when a person is using annotations or not.

 Thanks

 Johann Reyes

 -Original Message-
 From: Sylvain Vieujot [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, March 21, 2006 11:39 AM
 To: Maven Users List
 Subject: RE: Problem hibernate3 plugin cfg2cfgxml

 I did a private maven plugin that does just that : Fetch the annotations
 and add the mapping class=.../ to an hibernate.cfg.xml file.
 It would need to be a bite polished to go in a public repository, but if
 you're interested, I could review it a bite to contribute it.

 It works only for annotations though, but it can be combined with the
 xdoclet plugin for the one that need to mix them

 Best regards,

 Sylvain Vieujot.

 On Tue, 2006-03-21 at 08:39 -0500, Johann Reyes wrote:

 Hello Taavi

 Right now, hibernate-tools supports creation of hibernate.cfg.xml with
 mappings automatically only with hbm.xml files. I'll check if they are
 planning to support Annotations this way too, but at the moment is not
 supported.

 Regards

 Johann Reyes

 -Original Message-
 From: Taavi Sildeberg [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, March 21, 2006 8:33 AM
 To: Maven Users List
 Subject: Re: Problem hibernate3 plugin cfg2cfgxml

 Hey,

 But is there any way to create hibernate.cfg.xml with mappings 
 automatically or I really write it manually?
 Maby same ant task, or other tool, preferably maven 2 :)

 Taavi


 Johann Reyes wrote:
 Hello Taavi

 Ahh sorry, my mistake, I run my test, but I had the a hibernate.cfg.xml
 al;ready setup and didn't notice that. After doing a little more
 research,
 the goal cfg2cfgxml is more for hbm files, since annotated classes there
 is
 no other way around that to have it specified in a hibernate.cfg.xml
 file
 as
 per


 http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setu
 p-configuration

 As it states there is no other way around. I'll keep looking into it to
 see
 if I can find a workaround but for that moment I have to say that you
 need
 to initially have a hibernate.cfg.xml file before using annotations with
 hibernate.

 Regards

 Johann Reyes




 -Original Message-
 From: Taavi Sildeberg [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, March 21, 2006 2:27 AM
 To: Johann Reyes; users@maven.apache.org
 Subject: Re: Problem hibernate3 plugin cfg2cfgxml

 Thank you Johann for so quick answer.

 Yes a have set the ejb3 to true.
 Here is my pom.xml configuration:

   build
  plugins
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-compiler-plugin/artifactId
  configuration
source1.5/source
target1.5/target
  /configuration
/plugin
plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdhibernate3-maven-plugin/artifactId
  configuration
ejb3true/ejb3
config
  /target/hibernatetools/hibernate.cfg.xml
/config
jdk5true/jdk5
outputFile
  target/hibernatetools/db-schema.sql
/outputFile
properties
  /src/main/resources/hibernate.properties
/properties
  /configuration
/plugin
  /plugins

  extensions
extension
  groupIdoracle/groupId
  artifactIdjdbc/artifactId
  version10.2.0.1.0/version
/extension
  /extensions

/build

 And hibernate properties is following:

 hibernate.connection.driver_class

Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-22 Thread Taavi Sildeberg

Hello Johann,

This is configuration for hibernate3 plugin. But I was looking 
configuration for the Sylvain Vieujot plugin, that adds the mappings.


Taavi

Johann Reyes wrote:

Heelo Taavi:

You can find an example here:

jdk4:
https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-plugi
n/src/test/project-jdk14

jd5:
https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-plugi
n/src/test/project-jdk15

Regards 


Johann Reyes

-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 22, 2006 6:13 AM

To: Maven Users List
Subject: Re: Problem hibernate3 plugin cfg2cfgxml

Hey Sylvain,

If this is not so big trouble can you send me some sample pom.xml, from 
I can learn how to configure your plugin?


Taavi


Sylvain Vieujot wrote:

I filled a Jira new feature request where you can find the source code
attached :

http://jira.codehaus.org/browse/MHIBERNATE-1

Hope this helps.

Sylvain.

On Tue, 2006-03-21 at 12:56 -0500, Johann Reyes wrote:


Hello Sylvian

Yes, I would be interested to take a look, I'll gladly accept the help.

And

don't worry, the implementation I think would be fairly easy since I know
when a person is using annotations or not.

Thanks

Johann Reyes

-Original Message-
From: Sylvain Vieujot [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 11:39 AM

To: Maven Users List
Subject: RE: Problem hibernate3 plugin cfg2cfgxml

I did a private maven plugin that does just that : Fetch the annotations
and add the mapping class=.../ to an hibernate.cfg.xml file.
It would need to be a bite polished to go in a public repository, but if
you're interested, I could review it a bite to contribute it.

It works only for annotations though, but it can be combined with the
xdoclet plugin for the one that need to mix them

Best regards,

Sylvain Vieujot.

On Tue, 2006-03-21 at 08:39 -0500, Johann Reyes wrote:


Hello Taavi

Right now, hibernate-tools supports creation of hibernate.cfg.xml with
mappings automatically only with hbm.xml files. I'll check if they are
planning to support Annotations this way too, but at the moment is not
supported.

Regards

Johann Reyes

-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 8:33 AM

To: Maven Users List
Subject: Re: Problem hibernate3 plugin cfg2cfgxml

Hey,

But is there any way to create hibernate.cfg.xml with mappings 
automatically or I really write it manually?

Maby same ant task, or other tool, preferably maven 2 :)

Taavi


Johann Reyes wrote:

Hello Taavi

Ahh sorry, my mistake, I run my test, but I had the a hibernate.cfg.xml
al;ready setup and didn't notice that. After doing a little more

research,

the goal cfg2cfgxml is more for hbm files, since annotated classes

there

is

no other way around that to have it specified in a hibernate.cfg.xml

file

as

per



http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setu

p-configuration

As it states there is no other way around. I'll keep looking into it to

see

if I can find a workaround but for that moment I have to say that you

need

to initially have a hibernate.cfg.xml file before using annotations

with

hibernate.

Regards

Johann Reyes




-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 2:27 AM

To: Johann Reyes; users@maven.apache.org
Subject: Re: Problem hibernate3 plugin cfg2cfgxml

Thank you Johann for so quick answer.

Yes a have set the ejb3 to true.
Here is my pom.xml configuration:

  build
 plugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-compiler-plugin/artifactId
 configuration
   source1.5/source
   target1.5/target
 /configuration
   /plugin
   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdhibernate3-maven-plugin/artifactId
 configuration
   ejb3true/ejb3
   config
 /target/hibernatetools/hibernate.cfg.xml
   /config
   jdk5true/jdk5
   outputFile
 target/hibernatetools/db-schema.sql
   /outputFile
   properties
 /src/main/resources/hibernate.properties
   /properties
 /configuration
   /plugin
 /plugins

 extensions
   extension
 groupIdoracle/groupId
 artifactIdjdbc/artifactId
 version10.2.0.1.0/version
   /extension
 /extensions

   /build

And hibernate properties is following:

hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:orcl
hibernate.connection.username = blablah
hibernate.connection.password = blablah
hibernate.dialect = org.hibernate.dialect.Oracle9Dialect


Can you suggest what else could be wrong?


Taavi


Johann Reyes wrote:

Hello Taavi

Did you set the ejb3 parameter to true?

You can see

Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-22 Thread Taavi Sildeberg

Hello Sylvain,

When I try to use your plugin, I got this result from it:

C:\devTest\timemanager\datamvn hibernate-annotations:mappings-compile
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'hibernate-annotations'.
Downloading: 
http://repo1.maven.org/maven2/oracle/jdbc/10.2.0.1.0/jdbc-10.2.0.1.0.pom
[WARNING] Unable to get resource from repository central 
(http://repo1.maven.org/maven2)
[INFO] 


[INFO] Building TimeManager Data Module
[INFO]task-segment: [hibernate-annotations:mappings-compile]
[INFO] 


[INFO] [hibernate-annotations:mappings-compile]
java.lang.NoClassDefFoundError: 
C:\devTest\timemanager\data\target\classes\ee\zero\data\user\Address 
(wrong name: ee/zero/data/user/Address)

at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at 
com.seanergie.maven.plugins.FileClassLoader.getClassFromFile(FileClassLoader.java:54)
at 
com.seanergie.maven.plugins.FileClassLoader.shouldBeMapped(FileClassLoader.java:84)
at 
com.seanergie.maven.plugins.AbstractHibernate.execute(AbstractHibernate.java:82)
at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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)
[INFO] Dependencies : [Ljava.net.URL;@2a15cd
java.lang.NoClassDefFoundError: 
C:\devTest\timemanager\data\target\classes\ee\zero\data\user\CopyOfUser 
(wrong name: ee/zero/data/user/CopyOfUser)

at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at 
com.seanergie.maven.plugins.FileClassLoader.getClassFromFile(FileClassLoader.java:54)
at 
com.seanergie.maven.plugins.FileClassLoader.shouldBeMapped(FileClassLoader.java:84)
at 
com.seanergie.maven.plugins.AbstractHibernate.execute(AbstractHibernate.java:82)
at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at 

Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-22 Thread Sylvain Vieujot
I sometime have problems like this.
Try to do an mvn clean before.
For me it solved the problem.

On Wed, 2006-03-22 at 16:10 +0200, Taavi Sildeberg wrote:

 Hello Sylvain,
 
 When I try to use your plugin, I got this result from it:
 
 C:\devTest\timemanager\datamvn hibernate-annotations:mappings-compile
 [INFO] Scanning for projects...
 [INFO] Searching repository for plugin with prefix: 'hibernate-annotations'.
 Downloading: 
 http://repo1.maven.org/maven2/oracle/jdbc/10.2.0.1.0/jdbc-10.2.0.1.0.pom
 [WARNING] Unable to get resource from repository central 
 (http://repo1.maven.org/maven2)
 [INFO] 
 
 [INFO] Building TimeManager Data Module
 [INFO]task-segment: [hibernate-annotations:mappings-compile]
 [INFO] 
 
 [INFO] [hibernate-annotations:mappings-compile]
 java.lang.NoClassDefFoundError: 
 C:\devTest\timemanager\data\target\classes\ee\zero\data\user\Address 
 (wrong name: ee/zero/data/user/Address)
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
  at 
 com.seanergie.maven.plugins.FileClassLoader.getClassFromFile(FileClassLoader.java:54)
  at 
 com.seanergie.maven.plugins.FileClassLoader.shouldBeMapped(FileClassLoader.java:84)
  at 
 com.seanergie.maven.plugins.AbstractHibernate.execute(AbstractHibernate.java:82)
  at 
 org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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.java:39)
  at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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)
 [INFO] Dependencies : [Ljava.net.URL;@2a15cd
 java.lang.NoClassDefFoundError: 
 C:\devTest\timemanager\data\target\classes\ee\zero\data\user\CopyOfUser 
 (wrong name: ee/zero/data/user/CopyOfUser)
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
  at 
 com.seanergie.maven.plugins.FileClassLoader.getClassFromFile(FileClassLoader.java:54)
  at 
 com.seanergie.maven.plugins.FileClassLoader.shouldBeMapped(FileClassLoader.java:84)
  at 
 com.seanergie.maven.plugins.AbstractHibernate.execute(AbstractHibernate.java:82)
  at 
 org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
  at 
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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 

RE: Problem hibernate3 plugin cfg2cfgxml

2006-03-22 Thread Johann Reyes
Hello Sylvain

Based in your plugin, I have added now the ability to support the auto
discovery of hibernate annotated classes to the plugin. If you like please
try it.

Regards

Johann Reyes

-Original Message-
From: Sylvain Vieujot [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 22, 2006 9:40 AM
To: [EMAIL PROTECTED]
Cc: Maven Users List
Subject: Re: Problem hibernate3 plugin cfg2cfgxml

I sometime have problems like this.
Try to do an mvn clean before.
For me it solved the problem.

On Wed, 2006-03-22 at 16:10 +0200, Taavi Sildeberg wrote:

 Hello Sylvain,
 
 When I try to use your plugin, I got this result from it:
 
 C:\devTest\timemanager\datamvn hibernate-annotations:mappings-compile
 [INFO] Scanning for projects...
 [INFO] Searching repository for plugin with prefix:
'hibernate-annotations'.
 Downloading: 
 http://repo1.maven.org/maven2/oracle/jdbc/10.2.0.1.0/jdbc-10.2.0.1.0.pom
 [WARNING] Unable to get resource from repository central 
 (http://repo1.maven.org/maven2)
 [INFO] 


 [INFO] Building TimeManager Data Module
 [INFO]task-segment: [hibernate-annotations:mappings-compile]
 [INFO] 


 [INFO] [hibernate-annotations:mappings-compile]
 java.lang.NoClassDefFoundError: 
 C:\devTest\timemanager\data\target\classes\ee\zero\data\user\Address 
 (wrong name: ee/zero/data/user/Address)
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
  at 

com.seanergie.maven.plugins.FileClassLoader.getClassFromFile(FileClassLoader
.java:54)
  at 

com.seanergie.maven.plugins.FileClassLoader.shouldBeMapped(FileClassLoader.j
ava:84)
  at 

com.seanergie.maven.plugins.AbstractHibernate.execute(AbstractHibernate.java
:82)
  at 

org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage
r.java:415)
  at 

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:531)
  at 

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De
faultLifecycleExecutor.java:485)
  at 

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:455)
  at 

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:303)
  at 

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
ultLifecycleExecutor.java:270)
  at 

org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.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.java:39
)
  at 

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.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)
 [INFO] Dependencies : [Ljava.net.URL;@2a15cd
 java.lang.NoClassDefFoundError: 
 C:\devTest\timemanager\data\target\classes\ee\zero\data\user\CopyOfUser 
 (wrong name: ee/zero/data/user/CopyOfUser)
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
  at 

com.seanergie.maven.plugins.FileClassLoader.getClassFromFile(FileClassLoader
.java:54)
  at 

com.seanergie.maven.plugins.FileClassLoader.shouldBeMapped(FileClassLoader.j
ava:84)
  at 

com.seanergie.maven.plugins.AbstractHibernate.execute(AbstractHibernate.java
:82)
  at 

org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage
r.java:415)
  at 

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:531)
  at 

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De
faultLifecycleExecutor.java:485)
  at 

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:455)
  at 

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:303

Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-22 Thread Taavi Sildeberg

Hello,

I try to use plugin, but now  I get this error:

[INFO] Unresolved compilation problem:

[INFO] 


[DEBUG] Trace
java.lang.Error: Unresolved compilation problem:

at 
org.codehaus.mojo.hibernate3.HibernateUtils.getClassLoader(HibernateUtils.java:79)
at 
org.codehaus.mojo.hibernate3.HibernateExporterMojo.getClassLoader(HibernateExporterMojo.java:195)
at 
org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:56)
at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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)
[INFO] 



Can this be the problem, that I have both java 1.4 and 1.5 install in my 
machine?


All the best

Taavi

Johann Reyes wrote:

Hello Sylvain

Based in your plugin, I have added now the ability to support the auto
discovery of hibernate annotated classes to the plugin. If you like please
try it.

Regards

Johann Reyes

-Original Message-
From: Sylvain Vieujot [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 22, 2006 9:40 AM

To: [EMAIL PROTECTED]
Cc: Maven Users List
Subject: Re: Problem hibernate3 plugin cfg2cfgxml

I sometime have problems like this.
Try to do an mvn clean before.
For me it solved the problem.

On Wed, 2006-03-22 at 16:10 +0200, Taavi Sildeberg wrote:


Hello Sylvain,

When I try to use your plugin, I got this result from it:

C:\devTest\timemanager\datamvn hibernate-annotations:mappings-compile
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix:

'hibernate-annotations'.
Downloading: 
http://repo1.maven.org/maven2/oracle/jdbc/10.2.0.1.0/jdbc-10.2.0.1.0.pom
[WARNING] Unable to get resource from repository central 
(http://repo1.maven.org/maven2)
[INFO] 




[INFO] Building TimeManager Data Module
[INFO]task-segment: [hibernate-annotations:mappings-compile]
[INFO] 




[INFO] [hibernate-annotations:mappings-compile]
java.lang.NoClassDefFoundError: 
C:\devTest\timemanager\data\target\classes\ee\zero\data\user\Address 
(wrong name: ee/zero/data/user/Address)

 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
 at 


com.seanergie.maven.plugins.FileClassLoader.getClassFromFile(FileClassLoader
.java:54)
 at 


com.seanergie.maven.plugins.FileClassLoader.shouldBeMapped(FileClassLoader.j
ava:84)
 at 


com.seanergie.maven.plugins.AbstractHibernate.execute(AbstractHibernate.java
:82)
 at 


org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage
r.java:415)
 at 


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:531)
 at 


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De
faultLifecycleExecutor.java:485)
 at 


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:455)
 at 


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:303

RE: Problem hibernate3 plugin cfg2cfgxml

2006-03-21 Thread Johann Reyes
Hello Taavi

Ahh sorry, my mistake, I run my test, but I had the a hibernate.cfg.xml
al;ready setup and didn't notice that. After doing a little more research,
the goal cfg2cfgxml is more for hbm files, since annotated classes there is
no other way around that to have it specified in a hibernate.cfg.xml file as
per

http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setu
p-configuration

As it states there is no other way around. I'll keep looking into it to see
if I can find a workaround but for that moment I have to say that you need
to initially have a hibernate.cfg.xml file before using annotations with
hibernate.

Regards

Johann Reyes




-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 2:27 AM
To: Johann Reyes; users@maven.apache.org
Subject: Re: Problem hibernate3 plugin cfg2cfgxml

Thank you Johann for so quick answer.

Yes a have set the ejb3 to true.
Here is my pom.xml configuration:

  build
 plugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-compiler-plugin/artifactId
 configuration
   source1.5/source
   target1.5/target
 /configuration
   /plugin
   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdhibernate3-maven-plugin/artifactId
 configuration
   ejb3true/ejb3
   config
 /target/hibernatetools/hibernate.cfg.xml
   /config
   jdk5true/jdk5
   outputFile
 target/hibernatetools/db-schema.sql
   /outputFile
   properties
 /src/main/resources/hibernate.properties
   /properties
 /configuration
   /plugin
 /plugins

 extensions
   extension
 groupIdoracle/groupId
 artifactIdjdbc/artifactId
 version10.2.0.1.0/version
   /extension
 /extensions

   /build

And hibernate properties is following:

hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:orcl
hibernate.connection.username = blablah
hibernate.connection.password = blablah
hibernate.dialect = org.hibernate.dialect.Oracle9Dialect


Can you suggest what else could be wrong?


Taavi


Johann Reyes wrote:
 Hello Taavi
 
 Did you set the ejb3 parameter to true?
 
 You can see an example here:
 

https://svn.mojo.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-
 plugin/src/test/project-jdk15/pom.xml
 
 Regards
 
 Johann Reyes
 
 -Original Message-
 From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 20, 2006 5:30 AM
 To: Maven Users List
 Subject: Problem hibernate3 plugin cfg2cfgxml
 
 Hello,
 
 I have a three java files with annotations. When I try to generate the 
 hibernate.cfg.xml with maven.hibernte3.plugin, then the mapped classes 
 are never included inside hibernate.cfg.xml file. If I add them manualy 
 then hbm2ddl works fine.
 In the plugin manual is that hibernate3:cfg2cfgxml generates 
 hibernate.cfg.xml. file
 
 Can someone suggest what I am doing wrong?
 
 
 Taavi
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

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




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



RE: Problem hibernate3 plugin cfg2cfgxml

2006-03-21 Thread Johann Reyes
Hello Taavi

Right now, hibernate-tools supports creation of hibernate.cfg.xml with
mappings automatically only with hbm.xml files. I'll check if they are
planning to support Annotations this way too, but at the moment is not
supported.

Regards

Johann Reyes

-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 8:33 AM
To: Maven Users List
Subject: Re: Problem hibernate3 plugin cfg2cfgxml

Hey,

But is there any way to create hibernate.cfg.xml with mappings 
automatically or I really write it manually?
Maby same ant task, or other tool, preferably maven 2 :)

Taavi


Johann Reyes wrote:
 Hello Taavi
 
 Ahh sorry, my mistake, I run my test, but I had the a hibernate.cfg.xml
 al;ready setup and didn't notice that. After doing a little more research,
 the goal cfg2cfgxml is more for hbm files, since annotated classes there
is
 no other way around that to have it specified in a hibernate.cfg.xml file
as
 per
 

http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setu
 p-configuration
 
 As it states there is no other way around. I'll keep looking into it to
see
 if I can find a workaround but for that moment I have to say that you need
 to initially have a hibernate.cfg.xml file before using annotations with
 hibernate.
 
 Regards
 
 Johann Reyes
 
 
 
 
 -Original Message-
 From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 21, 2006 2:27 AM
 To: Johann Reyes; users@maven.apache.org
 Subject: Re: Problem hibernate3 plugin cfg2cfgxml
 
 Thank you Johann for so quick answer.
 
 Yes a have set the ejb3 to true.
 Here is my pom.xml configuration:
 
   build
  plugins
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-compiler-plugin/artifactId
  configuration
source1.5/source
target1.5/target
  /configuration
/plugin
plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdhibernate3-maven-plugin/artifactId
  configuration
ejb3true/ejb3
config
  /target/hibernatetools/hibernate.cfg.xml
/config
jdk5true/jdk5
outputFile
  target/hibernatetools/db-schema.sql
/outputFile
properties
  /src/main/resources/hibernate.properties
/properties
  /configuration
/plugin
  /plugins
 
  extensions
extension
  groupIdoracle/groupId
  artifactIdjdbc/artifactId
  version10.2.0.1.0/version
/extension
  /extensions
 
/build
 
 And hibernate properties is following:
 
 hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
 hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:orcl
 hibernate.connection.username = blablah
 hibernate.connection.password = blablah
 hibernate.dialect = org.hibernate.dialect.Oracle9Dialect
 
 
 Can you suggest what else could be wrong?
 
 
 Taavi
 
 
 Johann Reyes wrote:
 Hello Taavi

 Did you set the ejb3 parameter to true?

 You can see an example here:



https://svn.mojo.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-
 plugin/src/test/project-jdk15/pom.xml

 Regards

 Johann Reyes

 -Original Message-
 From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 20, 2006 5:30 AM
 To: Maven Users List
 Subject: Problem hibernate3 plugin cfg2cfgxml

 Hello,

 I have a three java files with annotations. When I try to generate the 
 hibernate.cfg.xml with maven.hibernte3.plugin, then the mapped classes 
 are never included inside hibernate.cfg.xml file. If I add them manualy 
 then hbm2ddl works fine.
 In the plugin manual is that hibernate3:cfg2cfgxml generates 
 hibernate.cfg.xml. file

 Can someone suggest what I am doing wrong?


 Taavi

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





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

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




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



Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-21 Thread Taavi Sildeberg

Hey,

But is there any way to create hibernate.cfg.xml with mappings 
automatically or I really write it manually?

Maby same ant task, or other tool, preferably maven 2 :)

Taavi


Johann Reyes wrote:

Hello Taavi

Ahh sorry, my mistake, I run my test, but I had the a hibernate.cfg.xml
al;ready setup and didn't notice that. After doing a little more research,
the goal cfg2cfgxml is more for hbm files, since annotated classes there is
no other way around that to have it specified in a hibernate.cfg.xml file as
per

http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setu
p-configuration

As it states there is no other way around. I'll keep looking into it to see
if I can find a workaround but for that moment I have to say that you need
to initially have a hibernate.cfg.xml file before using annotations with
hibernate.

Regards

Johann Reyes




-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 2:27 AM

To: Johann Reyes; users@maven.apache.org
Subject: Re: Problem hibernate3 plugin cfg2cfgxml

Thank you Johann for so quick answer.

Yes a have set the ejb3 to true.
Here is my pom.xml configuration:

  build
 plugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-compiler-plugin/artifactId
 configuration
   source1.5/source
   target1.5/target
 /configuration
   /plugin
   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdhibernate3-maven-plugin/artifactId
 configuration
   ejb3true/ejb3
   config
 /target/hibernatetools/hibernate.cfg.xml
   /config
   jdk5true/jdk5
   outputFile
 target/hibernatetools/db-schema.sql
   /outputFile
   properties
 /src/main/resources/hibernate.properties
   /properties
 /configuration
   /plugin
 /plugins

 extensions
   extension
 groupIdoracle/groupId
 artifactIdjdbc/artifactId
 version10.2.0.1.0/version
   /extension
 /extensions

   /build

And hibernate properties is following:

hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:orcl
hibernate.connection.username = blablah
hibernate.connection.password = blablah
hibernate.dialect = org.hibernate.dialect.Oracle9Dialect


Can you suggest what else could be wrong?


Taavi


Johann Reyes wrote:

Hello Taavi

Did you set the ejb3 parameter to true?

You can see an example here:



https://svn.mojo.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-

plugin/src/test/project-jdk15/pom.xml

Regards

Johann Reyes

-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 20, 2006 5:30 AM

To: Maven Users List
Subject: Problem hibernate3 plugin cfg2cfgxml

Hello,

I have a three java files with annotations. When I try to generate the 
hibernate.cfg.xml with maven.hibernte3.plugin, then the mapped classes 
are never included inside hibernate.cfg.xml file. If I add them manualy 
then hbm2ddl works fine.
In the plugin manual is that hibernate3:cfg2cfgxml generates 
hibernate.cfg.xml. file


Can someone suggest what I am doing wrong?


Taavi

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







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




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





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



RE: Problem hibernate3 plugin cfg2cfgxml

2006-03-21 Thread Sylvain Vieujot
I did a private maven plugin that does just that : Fetch the annotations
and add the mapping class=.../ to an hibernate.cfg.xml file.
It would need to be a bite polished to go in a public repository, but if
you're interested, I could review it a bite to contribute it.

It works only for annotations though, but it can be combined with the
xdoclet plugin for the one that need to mix them

Best regards,

Sylvain Vieujot.

On Tue, 2006-03-21 at 08:39 -0500, Johann Reyes wrote:

 Hello Taavi
 
 Right now, hibernate-tools supports creation of hibernate.cfg.xml with
 mappings automatically only with hbm.xml files. I'll check if they are
 planning to support Annotations this way too, but at the moment is not
 supported.
 
 Regards
 
 Johann Reyes
 
 -Original Message-
 From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 21, 2006 8:33 AM
 To: Maven Users List
 Subject: Re: Problem hibernate3 plugin cfg2cfgxml
 
 Hey,
 
 But is there any way to create hibernate.cfg.xml with mappings 
 automatically or I really write it manually?
 Maby same ant task, or other tool, preferably maven 2 :)
 
 Taavi
 
 
 Johann Reyes wrote:
  Hello Taavi
  
  Ahh sorry, my mistake, I run my test, but I had the a hibernate.cfg.xml
  al;ready setup and didn't notice that. After doing a little more research,
  the goal cfg2cfgxml is more for hbm files, since annotated classes there
 is
  no other way around that to have it specified in a hibernate.cfg.xml file
 as
  per
  
 
 http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setu
  p-configuration
  
  As it states there is no other way around. I'll keep looking into it to
 see
  if I can find a workaround but for that moment I have to say that you need
  to initially have a hibernate.cfg.xml file before using annotations with
  hibernate.
  
  Regards
  
  Johann Reyes
  
  
  
  
  -Original Message-
  From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, March 21, 2006 2:27 AM
  To: Johann Reyes; users@maven.apache.org
  Subject: Re: Problem hibernate3 plugin cfg2cfgxml
  
  Thank you Johann for so quick answer.
  
  Yes a have set the ejb3 to true.
  Here is my pom.xml configuration:
  
build
   plugins
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
   configuration
 source1.5/source
 target1.5/target
   /configuration
 /plugin
 plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdhibernate3-maven-plugin/artifactId
   configuration
 ejb3true/ejb3
 config
   /target/hibernatetools/hibernate.cfg.xml
 /config
 jdk5true/jdk5
 outputFile
   target/hibernatetools/db-schema.sql
 /outputFile
 properties
   /src/main/resources/hibernate.properties
 /properties
   /configuration
 /plugin
   /plugins
  
   extensions
 extension
   groupIdoracle/groupId
   artifactIdjdbc/artifactId
   version10.2.0.1.0/version
 /extension
   /extensions
  
 /build
  
  And hibernate properties is following:
  
  hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
  hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:orcl
  hibernate.connection.username = blablah
  hibernate.connection.password = blablah
  hibernate.dialect = org.hibernate.dialect.Oracle9Dialect
  
  
  Can you suggest what else could be wrong?
  
  
  Taavi
  
  
  Johann Reyes wrote:
  Hello Taavi
 
  Did you set the ejb3 parameter to true?
 
  You can see an example here:
 
 
 
 https://svn.mojo.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-
  plugin/src/test/project-jdk15/pom.xml
 
  Regards
 
  Johann Reyes
 
  -Original Message-
  From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
  Sent: Monday, March 20, 2006 5:30 AM
  To: Maven Users List
  Subject: Problem hibernate3 plugin cfg2cfgxml
 
  Hello,
 
  I have a three java files with annotations. When I try to generate the 
  hibernate.cfg.xml with maven.hibernte3.plugin, then the mapped classes 
  are never included inside hibernate.cfg.xml file. If I add them manualy 
  then hbm2ddl works fine.
  In the plugin manual is that hibernate3:cfg2cfgxml generates 
  hibernate.cfg.xml. file
 
  Can someone suggest what I am doing wrong?
 
 
  Taavi
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED

RE: Problem hibernate3 plugin cfg2cfgxml

2006-03-21 Thread Johann Reyes
Hello Sylvian

Yes, I would be interested to take a look, I'll gladly accept the help. And
don't worry, the implementation I think would be fairly easy since I know
when a person is using annotations or not.

Thanks

Johann Reyes

-Original Message-
From: Sylvain Vieujot [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 11:39 AM
To: Maven Users List
Subject: RE: Problem hibernate3 plugin cfg2cfgxml

I did a private maven plugin that does just that : Fetch the annotations
and add the mapping class=.../ to an hibernate.cfg.xml file.
It would need to be a bite polished to go in a public repository, but if
you're interested, I could review it a bite to contribute it.

It works only for annotations though, but it can be combined with the
xdoclet plugin for the one that need to mix them

Best regards,

Sylvain Vieujot.

On Tue, 2006-03-21 at 08:39 -0500, Johann Reyes wrote:

 Hello Taavi
 
 Right now, hibernate-tools supports creation of hibernate.cfg.xml with
 mappings automatically only with hbm.xml files. I'll check if they are
 planning to support Annotations this way too, but at the moment is not
 supported.
 
 Regards
 
 Johann Reyes
 
 -Original Message-
 From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 21, 2006 8:33 AM
 To: Maven Users List
 Subject: Re: Problem hibernate3 plugin cfg2cfgxml
 
 Hey,
 
 But is there any way to create hibernate.cfg.xml with mappings 
 automatically or I really write it manually?
 Maby same ant task, or other tool, preferably maven 2 :)
 
 Taavi
 
 
 Johann Reyes wrote:
  Hello Taavi
  
  Ahh sorry, my mistake, I run my test, but I had the a hibernate.cfg.xml
  al;ready setup and didn't notice that. After doing a little more
research,
  the goal cfg2cfgxml is more for hbm files, since annotated classes there
 is
  no other way around that to have it specified in a hibernate.cfg.xml
file
 as
  per
  
 

http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setu
  p-configuration
  
  As it states there is no other way around. I'll keep looking into it to
 see
  if I can find a workaround but for that moment I have to say that you
need
  to initially have a hibernate.cfg.xml file before using annotations with
  hibernate.
  
  Regards
  
  Johann Reyes
  
  
  
  
  -Original Message-
  From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, March 21, 2006 2:27 AM
  To: Johann Reyes; users@maven.apache.org
  Subject: Re: Problem hibernate3 plugin cfg2cfgxml
  
  Thank you Johann for so quick answer.
  
  Yes a have set the ejb3 to true.
  Here is my pom.xml configuration:
  
build
   plugins
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
   configuration
 source1.5/source
 target1.5/target
   /configuration
 /plugin
 plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdhibernate3-maven-plugin/artifactId
   configuration
 ejb3true/ejb3
 config
   /target/hibernatetools/hibernate.cfg.xml
 /config
 jdk5true/jdk5
 outputFile
   target/hibernatetools/db-schema.sql
 /outputFile
 properties
   /src/main/resources/hibernate.properties
 /properties
   /configuration
 /plugin
   /plugins
  
   extensions
 extension
   groupIdoracle/groupId
   artifactIdjdbc/artifactId
   version10.2.0.1.0/version
 /extension
   /extensions
  
 /build
  
  And hibernate properties is following:
  
  hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
  hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:orcl
  hibernate.connection.username = blablah
  hibernate.connection.password = blablah
  hibernate.dialect = org.hibernate.dialect.Oracle9Dialect
  
  
  Can you suggest what else could be wrong?
  
  
  Taavi
  
  
  Johann Reyes wrote:
  Hello Taavi
 
  Did you set the ejb3 parameter to true?
 
  You can see an example here:
 
 
 

https://svn.mojo.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-
  plugin/src/test/project-jdk15/pom.xml
 
  Regards
 
  Johann Reyes
 
  -Original Message-
  From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
  Sent: Monday, March 20, 2006 5:30 AM
  To: Maven Users List
  Subject: Problem hibernate3 plugin cfg2cfgxml
 
  Hello,
 
  I have a three java files with annotations. When I try to generate the 
  hibernate.cfg.xml with maven.hibernte3.plugin, then the mapped classes 
  are never included inside hibernate.cfg.xml file. If I add them manualy

  then hbm2ddl works fine.
  In the plugin manual is that hibernate3:cfg2cfgxml generates 
  hibernate.cfg.xml. file
 
  Can someone suggest what I am doing wrong?
 
 
  Taavi

RE: Problem hibernate3 plugin cfg2cfgxml

2006-03-21 Thread Sylvain Vieujot
I filled a Jira new feature request where you can find the source code
attached :

http://jira.codehaus.org/browse/MHIBERNATE-1

Hope this helps.

Sylvain.

On Tue, 2006-03-21 at 12:56 -0500, Johann Reyes wrote:

 Hello Sylvian
 
 Yes, I would be interested to take a look, I'll gladly accept the help. And
 don't worry, the implementation I think would be fairly easy since I know
 when a person is using annotations or not.
 
 Thanks
 
 Johann Reyes
 
 -Original Message-
 From: Sylvain Vieujot [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 21, 2006 11:39 AM
 To: Maven Users List
 Subject: RE: Problem hibernate3 plugin cfg2cfgxml
 
 I did a private maven plugin that does just that : Fetch the annotations
 and add the mapping class=.../ to an hibernate.cfg.xml file.
 It would need to be a bite polished to go in a public repository, but if
 you're interested, I could review it a bite to contribute it.
 
 It works only for annotations though, but it can be combined with the
 xdoclet plugin for the one that need to mix them
 
 Best regards,
 
 Sylvain Vieujot.
 
 On Tue, 2006-03-21 at 08:39 -0500, Johann Reyes wrote:
 
  Hello Taavi
  
  Right now, hibernate-tools supports creation of hibernate.cfg.xml with
  mappings automatically only with hbm.xml files. I'll check if they are
  planning to support Annotations this way too, but at the moment is not
  supported.
  
  Regards
  
  Johann Reyes
  
  -Original Message-
  From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, March 21, 2006 8:33 AM
  To: Maven Users List
  Subject: Re: Problem hibernate3 plugin cfg2cfgxml
  
  Hey,
  
  But is there any way to create hibernate.cfg.xml with mappings 
  automatically or I really write it manually?
  Maby same ant task, or other tool, preferably maven 2 :)
  
  Taavi
  
  
  Johann Reyes wrote:
   Hello Taavi
   
   Ahh sorry, my mistake, I run my test, but I had the a hibernate.cfg.xml
   al;ready setup and didn't notice that. After doing a little more
 research,
   the goal cfg2cfgxml is more for hbm files, since annotated classes there
  is
   no other way around that to have it specified in a hibernate.cfg.xml
 file
  as
   per
   
  
 
 http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setu
   p-configuration
   
   As it states there is no other way around. I'll keep looking into it to
  see
   if I can find a workaround but for that moment I have to say that you
 need
   to initially have a hibernate.cfg.xml file before using annotations with
   hibernate.
   
   Regards
   
   Johann Reyes
   
   
   
   
   -Original Message-
   From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
   Sent: Tuesday, March 21, 2006 2:27 AM
   To: Johann Reyes; users@maven.apache.org
   Subject: Re: Problem hibernate3 plugin cfg2cfgxml
   
   Thank you Johann for so quick answer.
   
   Yes a have set the ejb3 to true.
   Here is my pom.xml configuration:
   
 build
plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
configuration
  source1.5/source
  target1.5/target
/configuration
  /plugin
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdhibernate3-maven-plugin/artifactId
configuration
  ejb3true/ejb3
  config
/target/hibernatetools/hibernate.cfg.xml
  /config
  jdk5true/jdk5
  outputFile
target/hibernatetools/db-schema.sql
  /outputFile
  properties
/src/main/resources/hibernate.properties
  /properties
/configuration
  /plugin
/plugins
   
extensions
  extension
groupIdoracle/groupId
artifactIdjdbc/artifactId
version10.2.0.1.0/version
  /extension
/extensions
   
  /build
   
   And hibernate properties is following:
   
   hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
   hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:orcl
   hibernate.connection.username = blablah
   hibernate.connection.password = blablah
   hibernate.dialect = org.hibernate.dialect.Oracle9Dialect
   
   
   Can you suggest what else could be wrong?
   
   
   Taavi
   
   
   Johann Reyes wrote:
   Hello Taavi
  
   Did you set the ejb3 parameter to true?
  
   You can see an example here:
  
  
  
 
 https://svn.mojo.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-
   plugin/src/test/project-jdk15/pom.xml
  
   Regards
  
   Johann Reyes
  
   -Original Message-
   From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
   Sent: Monday, March 20, 2006 5:30 AM
   To: Maven Users List
   Subject: Problem hibernate3 plugin cfg2cfgxml
  
   Hello,
  
   I have a three java files with annotations. When I try to generate

RE: Problem hibernate3 plugin cfg2cfgxml

2006-03-20 Thread Johann Reyes
Hello Taavi

Did you set the ejb3 parameter to true?

You can see an example here:

https://svn.mojo.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-
plugin/src/test/project-jdk15/pom.xml

Regards

Johann Reyes

-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 20, 2006 5:30 AM
To: Maven Users List
Subject: Problem hibernate3 plugin cfg2cfgxml

Hello,

I have a three java files with annotations. When I try to generate the 
hibernate.cfg.xml with maven.hibernte3.plugin, then the mapped classes 
are never included inside hibernate.cfg.xml file. If I add them manualy 
then hbm2ddl works fine.
In the plugin manual is that hibernate3:cfg2cfgxml generates 
hibernate.cfg.xml. file

Can someone suggest what I am doing wrong?


Taavi

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




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



Re: Problem hibernate3 plugin cfg2cfgxml

2006-03-20 Thread Taavi Sildeberg

Thank you Johann for so quick answer.

Yes a have set the ejb3 to true.
Here is my pom.xml configuration:

 build
plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
configuration
  source1.5/source
  target1.5/target
/configuration
  /plugin
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdhibernate3-maven-plugin/artifactId
configuration
  ejb3true/ejb3
  config
/target/hibernatetools/hibernate.cfg.xml
  /config
  jdk5true/jdk5
  outputFile
target/hibernatetools/db-schema.sql
  /outputFile
  properties
/src/main/resources/hibernate.properties
  /properties
/configuration
  /plugin
/plugins

extensions
  extension
groupIdoracle/groupId
artifactIdjdbc/artifactId
version10.2.0.1.0/version
  /extension
/extensions

  /build

And hibernate properties is following:

hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:orcl
hibernate.connection.username = blablah
hibernate.connection.password = blablah
hibernate.dialect = org.hibernate.dialect.Oracle9Dialect


Can you suggest what else could be wrong?


Taavi


Johann Reyes wrote:

Hello Taavi

Did you set the ejb3 parameter to true?

You can see an example here:

https://svn.mojo.codehaus.org/mojo/trunk/mojo/mojo-sandbox/hibernate3-maven-
plugin/src/test/project-jdk15/pom.xml

Regards

Johann Reyes

-Original Message-
From: Taavi Sildeberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 20, 2006 5:30 AM

To: Maven Users List
Subject: Problem hibernate3 plugin cfg2cfgxml

Hello,

I have a three java files with annotations. When I try to generate the 
hibernate.cfg.xml with maven.hibernte3.plugin, then the mapped classes 
are never included inside hibernate.cfg.xml file. If I add them manualy 
then hbm2ddl works fine.
In the plugin manual is that hibernate3:cfg2cfgxml generates 
hibernate.cfg.xml. file


Can someone suggest what I am doing wrong?


Taavi

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







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