issue with hibernate3 plugin create database in wrong location
I am using the hibernate3 plugin to create an h2 database. I use this URL: jdbc:h2:file:${basedir}/target/h2/testdb;REFERENTIAL_INTEGRITY=FALSE Then I see it translates to: *[INFO] Finished at: Sun Oct 04 07:57:17 PDT 2009 [yoursos] INFO [Finalizer] DriverManagerConnectionProvider.close(170) | cleaning up connection pool: jdbc:h2:file: /Users/mickknutson/svnworkspaces/baselogic/services/data-services/target /h2/yoursos;REFERENTIAL_INTEGRITY=FALSE [INFO] Final Memory: 42M/81M * But the plugin keeps creating, and using this in my tests and when I have a DB change, I have to manually delete this database in order for the changes to take affect: */Users/mickknutson/target/**db* How can I force the database to only be created in my build target DIR? --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com ---
Hibernate3 plugin : problem with mapping generatting
Hi all i'm using Hibernate3 plugin for generation mapping classes and HBM for an oracle schema the probleme that the goal mvn hibernate3:hbm2cfgxml or the the other vlable goal checks also system table and the exceution take many time, at the and i get that trace error : 16:05:50,780 DEBUG org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy - Default type found for [SYS._ALL_INSTANTIATION_DDL.DDL_TEXT t:CLOB l: 255 p:19 s:2 n:true id:false] to [clob] 16:05:50,780 DEBUG org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy - Default type found for [SYS._ALL_INSTANTIATION_DDL.DDL_NUM t:NUMERIC l:255 p:22 s:0 n:false id:false] to [big_decimal] 16:05:50,780 DEBUG org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy - Default type found for [SYS._ALL_INSTANTIATION_DDL.PHASE t:NUMERIC l: 255 p:22 s:0 n:false id:false] to [big_decimal] 16:05:50,780 INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:@oracle:thin:@url:1521:SIDNAME [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Duplicate class name 'AllRepcolumn' generated for 'org.hibernate.mapping.Table(SYS._ALL_REPCOLUMN)'. Same name where generated for 'org.hibern ate.mapping.Table(SYS._ALL_REPCOLUMN)' [INFO] [INFO] Trace org.hibernate.cfg.JDBCBinderException: Duplicate class name 'AllRepcolumn' generated for 'org.hibernate.mapping.Table(SYS._ALL_REPCOLUMN)'. Same name where generated for 'org.hibernate.mapping.Table(SYS._ALL_REPCOLUMN)' at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:166) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:89) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:42) at org.codehaus.mojo.hibernate3.configuration.JDBCComponentConfiguration.doConfiguration(JDBCComponentConfiguration.java:67) at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfiguration.getConfiguration(AbstractComponentConfiguration.java:56) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.configureExporter(HibernateExporterMojo.java:197) at org.codehaus.mojo.hibernate3.exporter.Hbm2CfgXmlExporterMojo.configureExporter(Hbm2CfgXmlExporterMojo.java:62) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.doExecute(HibernateExporterMojo.java:270) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:149) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) at org.apache.maven.cli.MavenCli.main(MavenCli.java:282) 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:597) 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] [INFO] Total time: 3 minutes 23 seconds [INFO] Finished at: Tue Aug 26 16:05:50 CEST 2008 16:05:51,021 INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:oracle:thin:@url:1521:SIDNAME [INFO] Final Memory: 12M/28M [INFO] im using oracle DB version 9.2.0.8.0 with maven configuration : build plugins .. plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.2-SNAPSHOT/version configuration
Hibernate3 plugin : problem with mapping
i relance my request :) i'm using Hibernate3 plugin for generation mapping classes and HBM for an oracle schema the probleme that the goal mvn hibernate3:hbm2cfgxml or the the other available goals checks also system table and the exceution take many time, at the and i get that trace error : 16:05:50,780 DEBUG org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy - Default type found for [SYS._ALL_INSTANTIATION_DDL.DDL_TEXT t:CLOB l: 255 p:19 s:2 n:true id:false] to [clob] 16:05:50,780 DEBUG org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy - Default type found for [SYS._ALL_INSTANTIATION_DDL.DDL_NUM t:NUMERIC l:255 p:22 s:0 n:false id:false] to [big_decimal] 16:05:50,780 DEBUG org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy - Default type found for [SYS._ALL_INSTANTIATION_DDL.PHASE t:NUMERIC l: 255 p:22 s:0 n:false id:false] to [big_decimal] 16:05:50,780 INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:@oracle:thin:@url:1521:SIDNAME [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Duplicate class name 'AllRepcolumn' generated for 'org.hibernate.mapping.Table(SYS._ALL_REPCOLUMN)'. Same name where generated for 'org.hibern ate.mapping.Table(SYS._ALL_REPCOLUMN)' [INFO] [INFO] Trace org.hibernate.cfg.JDBCBinderException: Duplicate class name 'AllRepcolumn' generated for 'org.hibernate.mapping.Table(SYS._ALL_REPCOLUMN)'. Same name where generated for 'org.hibernate.mapping.Table(SYS._ALL_REPCOLUMN)' at org.hibernate.cfg.JDBCBinder.createPersistentClasses( JDBCBinder.java:166) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:89) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC( JDBCMetaDataConfiguration.java:42) at org.codehaus.mojo.hibernate3.configuration. JDBCComponentConfiguration.doConfiguration(JDBCComponentConfiguration. java:67) at org.codehaus.mojo.hibernate3.configuration. AbstractComponentConfiguration.getConfiguration( AbstractComponentConfiguration.java:56) at org.codehaus.mojo.hibernate3.HibernateExporterMojo. configureExporter(HibernateExporterMojo.java:197) at org.codehaus.mojo.hibernate3.exporter.Hbm2CfgXmlExporterMojo. configureExporter(Hbm2CfgXmlExporterMojo.java:62) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.doExecute( HibernateExporterMojo.java:270) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute( HibernateExporterMojo.java:149) at org.apache.maven.plugin.DefaultPluginManager.executeMojo( DefaultPluginManager.java:447) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor. executeStandaloneGoal(DefaultLifecycleExecutor.java:493) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal( DefaultLifecycleExecutor.java:463) at org.apache.maven.lifecycle.DefaultLifecycleExecutor. executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor. executeTaskSegments(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) at org.apache.maven.cli.MavenCli.main(MavenCli.java:282) 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:597) 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] [INFO] Total time: 3 minutes 23 seconds [INFO] Finished at: Tue Aug 26 16:05:50 CEST 2008 16:05:51,021 INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:oracle:thin:@url:1521:SIDNAME [INFO] Final Memory: 12M/28M [INFO] im using oracle DB version 9.2.0.8.0 with maven configuration : build plugins .. plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.2-SNAPSHOT
RE: Hibernate3 plugin : problem with mapping generatting
Hi That's explained here http://www.velocityreviews.com/forums/t298010-jboss-ide-using-hibernate-tool s-getting-jdbcbinderexception.html Basically you need to specify your schema in a hibernate.reveng.xml file. Regards Johann Reyes -Original Message- From: MedElb [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2008 10:15 AM To: Maven Users List Subject: Hibernate3 plugin : problem with mapping generatting Hi all i'm using Hibernate3 plugin for generation mapping classes and HBM for an oracle schema the probleme that the goal mvn hibernate3:hbm2cfgxml or the the other vlable goal checks also system table and the exceution take many time, at the and i get that trace error : 16:05:50,780 DEBUG org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy - Default type found for [SYS._ALL_INSTANTIATION_DDL.DDL_TEXT t:CLOB l: 255 p:19 s:2 n:true id:false] to [clob] 16:05:50,780 DEBUG org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy - Default type found for [SYS._ALL_INSTANTIATION_DDL.DDL_NUM t:NUMERIC l:255 p:22 s:0 n:false id:false] to [big_decimal] 16:05:50,780 DEBUG org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy - Default type found for [SYS._ALL_INSTANTIATION_DDL.PHASE t:NUMERIC l: 255 p:22 s:0 n:false id:false] to [big_decimal] 16:05:50,780 INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:@oracle:thin:@url:1521:SIDNAME [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Duplicate class name 'AllRepcolumn' generated for 'org.hibernate.mapping.Table(SYS._ALL_REPCOLUMN)'. Same name where generated for 'org.hibern ate.mapping.Table(SYS._ALL_REPCOLUMN)' [INFO] [INFO] Trace org.hibernate.cfg.JDBCBinderException: Duplicate class name 'AllRepcolumn' generated for 'org.hibernate.mapping.Table(SYS._ALL_REPCOLUMN)'. Same name where generated for 'org.hibernate.mapping.Table(SYS._ALL_REPCOLUMN)' at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:166) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:89) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfigu ration.java:42) at org.codehaus.mojo.hibernate3.configuration.JDBCComponentConfiguration.doConf iguration(JDBCComponentConfiguration.java:67) at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfiguration.ge tConfiguration(AbstractComponentConfiguration.java:56) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.configureExporter(Hiberna teExporterMojo.java:197) at org.codehaus.mojo.hibernate3.exporter.Hbm2CfgXmlExporterMojo.configureExport er(Hbm2CfgXmlExporterMojo.java:62) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.doExecute(HibernateExport erMojo.java:270) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporter Mojo.java:149) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage r.java:447) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife cycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De faultLifecycleExecutor.java:493) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec ycleExecutor.java:463) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail ures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa ultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle Executor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) at org.apache.maven.cli.MavenCli.main(MavenCli.java:282) 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:597) 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] [INFO] Total time: 3 minutes 23 seconds [INFO] Finished at: Tue Aug 26 16:05:50 CEST 2008 16:05:51,021 INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up
Re: Multiple Executions with Hibernate3 Plugin
So, it is the case that you can only use antrun one in your pom.xml to do one thing? You can't create new goals using XML? If so, that is wicked lame. Alan On Apr 7, 2008, at 3:38 PM, Alan Gutierrez wrote: Wayne You could either include the full plugin config in the plugin or just a property value, whatever makes the most sense. Did you mean... You could either include the full plugin config in the *profile* or just a property value, whatever makes the most sense. Okay. So, there are profiles. I'll use that. I'm curious though, is there no way to create custom goals? I'm wondering how someone would use the antrun task more than once in their build. Let's say I had a foo tool and a bar tool, neither of which had a Maven plugin, but both of which had ant tasks. What if I wanted to create two goals. bar:run foo:run But those goals really where calling antrun:run , which would have to be used twice in the pom, once to define bar:run and once to define foo:run . Analogous, I suppose, to creating ant tasks in build.xml . Is there no way to create new goals short of creating a new plugin? Are profiles supposed to be the means to define new tasks? Alan On Apr 6, 2008, at 11:55 PM, Wayne Fay wrote: The best way to handle this is with multiple profiles. Then you activate one with -Pprofilename eg -Pdbupdate. You could either include the full plugin config in the plugin or just a property value, whatever makes the most sense. Wayne On 4/4/08, Alan Gutierrez [EMAIL PROTECTED] wrote: I have the maven plugin working with the following code. plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-alpha-2/version dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.1.3/version /dependency /dependencies configuration executions execution phaseprocess-resources/phase goals goalhbm2ddl/goal /goals /execution /executions componentProperties exportfalse/export !-- updatetrue/update -- ejb3true/ejb3 jdk5true/jdk5 formattrue/format outputfilenameschema.sql/outputfilename /componentProperties /configuration /plugin The executions section I've just added, but I'm not sure how to get to where I want to go. What I want is the ability to run this plugin with the update feature on, so that I can update the databases easily, when I'm in development mode. What XML do I add to create a new separate goal? I supposed I could toggle update using a commandline parameter, but I'm wondering, what are the ways to create a different configuration for a plugin? For the antrun plugin to be useful, it seems like you should be able to specify many different task configurations. -- Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504 717 1428 Think New Orleans | http://thinknola.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504 717 1428 Think New Orleans | http://thinknola.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Executions with Hibernate3 Plugin
No, you can't create new goals using XML. And this is not wicked lame -- its a good thing for people who care about consistent and repeatable builds across their organization. You can however bind multiple occurrences of the antrun plugin (with varying configurations) to multiple phases if you need various things done automatically at various times in the build. Or you can use profiles as I suggested and call a specific Antrun execution. Maven is not Ant. If you want to use Ant, then just use it instead. Wayne On 4/8/08, Alan Gutierrez [EMAIL PROTECTED] wrote: So, it is the case that you can only use antrun one in your pom.xml to do one thing? You can't create new goals using XML? If so, that is wicked lame. Alan On Apr 7, 2008, at 3:38 PM, Alan Gutierrez wrote: Wayne You could either include the full plugin config in the plugin or just a property value, whatever makes the most sense. Did you mean... You could either include the full plugin config in the *profile* or just a property value, whatever makes the most sense. Okay. So, there are profiles. I'll use that. I'm curious though, is there no way to create custom goals? I'm wondering how someone would use the antrun task more than once in their build. Let's say I had a foo tool and a bar tool, neither of which had a Maven plugin, but both of which had ant tasks. What if I wanted to create two goals. bar:run foo:run But those goals really where calling antrun:run , which would have to be used twice in the pom, once to define bar:run and once to define foo:run . Analogous, I suppose, to creating ant tasks in build.xml . Is there no way to create new goals short of creating a new plugin? Are profiles supposed to be the means to define new tasks? Alan On Apr 6, 2008, at 11:55 PM, Wayne Fay wrote: The best way to handle this is with multiple profiles. Then you activate one with -Pprofilename eg -Pdbupdate. You could either include the full plugin config in the plugin or just a property value, whatever makes the most sense. Wayne On 4/4/08, Alan Gutierrez [EMAIL PROTECTED] wrote: I have the maven plugin working with the following code. plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-alpha-2/version dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.1.3/version /dependency /dependencies configuration executions execution phaseprocess-resources/phase goals goalhbm2ddl/goal /goals /execution /executions componentProperties exportfalse/export !-- updatetrue/update -- ejb3true/ejb3 jdk5true/jdk5 formattrue/format outputfilenameschema.sql/outputfilename /componentProperties /configuration /plugin The executions section I've just added, but I'm not sure how to get to where I want to go. What I want is the ability to run this plugin with the update feature on, so that I can update the databases easily, when I'm in development mode. What XML do I add to create a new separate goal? I supposed I could toggle update using a commandline parameter, but I'm wondering, what are the ways to create a different configuration for a plugin? For the antrun plugin to be useful, it seems like you should be able to specify many different task configurations. -- Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504 717 1428 Think New Orleans | http://thinknola.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504 717 1428 Think New Orleans | http://thinknola.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: Multiple Executions with Hibernate3 Plugin
Wayne You could either include the full plugin config in the plugin or just a property value, whatever makes the most sense. Did you mean... You could either include the full plugin config in the *profile* or just a property value, whatever makes the most sense. Okay. So, there are profiles. I'll use that. I'm curious though, is there no way to create custom goals? I'm wondering how someone would use the antrun task more than once in their build. Let's say I had a foo tool and a bar tool, neither of which had a Maven plugin, but both of which had ant tasks. What if I wanted to create two goals. bar:run foo:run But those goals really where calling antrun:run , which would have to be used twice in the pom, once to define bar:run and once to define foo:run . Analogous, I suppose, to creating ant tasks in build.xml . Is there no way to create new goals short of creating a new plugin? Are profiles supposed to be the means to define new tasks? Alan On Apr 6, 2008, at 11:55 PM, Wayne Fay wrote: The best way to handle this is with multiple profiles. Then you activate one with -Pprofilename eg -Pdbupdate. You could either include the full plugin config in the plugin or just a property value, whatever makes the most sense. Wayne On 4/4/08, Alan Gutierrez [EMAIL PROTECTED] wrote: I have the maven plugin working with the following code. plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-alpha-2/version dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.1.3/version /dependency /dependencies configuration executions execution phaseprocess-resources/phase goals goalhbm2ddl/goal /goals /execution /executions componentProperties exportfalse/export !-- updatetrue/update -- ejb3true/ejb3 jdk5true/jdk5 formattrue/format outputfilenameschema.sql/outputfilename /componentProperties /configuration /plugin The executions section I've just added, but I'm not sure how to get to where I want to go. What I want is the ability to run this plugin with the update feature on, so that I can update the databases easily, when I'm in development mode. What XML do I add to create a new separate goal? I supposed I could toggle update using a commandline parameter, but I'm wondering, what are the ways to create a different configuration for a plugin? For the antrun plugin to be useful, it seems like you should be able to specify many different task configurations. -- Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504 717 1428 Think New Orleans | http://thinknola.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Executions with Hibernate3 Plugin
The best way to handle this is with multiple profiles. Then you activate one with -Pprofilename eg -Pdbupdate. You could either include the full plugin config in the plugin or just a property value, whatever makes the most sense. Wayne On 4/4/08, Alan Gutierrez [EMAIL PROTECTED] wrote: I have the maven plugin working with the following code. plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-alpha-2/version dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.1.3/version /dependency /dependencies configuration executions execution phaseprocess-resources/phase goals goalhbm2ddl/goal /goals /execution /executions componentProperties exportfalse/export !-- updatetrue/update -- ejb3true/ejb3 jdk5true/jdk5 formattrue/format outputfilenameschema.sql/outputfilename /componentProperties /configuration /plugin The executions section I've just added, but I'm not sure how to get to where I want to go. What I want is the ability to run this plugin with the update feature on, so that I can update the databases easily, when I'm in development mode. What XML do I add to create a new separate goal? I supposed I could toggle update using a commandline parameter, but I'm wondering, what are the ways to create a different configuration for a plugin? For the antrun plugin to be useful, it seems like you should be able to specify many different task configurations. Alan Gutierrez - 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]
Multiple Executions with Hibernate3 Plugin
I have the maven plugin working with the following code. plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-alpha-2/version dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.1.3/version /dependency /dependencies configuration executions execution phaseprocess-resources/phase goals goalhbm2ddl/goal /goals /execution /executions componentProperties exportfalse/export !-- updatetrue/update -- ejb3true/ejb3 jdk5true/jdk5 formattrue/format outputfilenameschema.sql/outputfilename /componentProperties /configuration /plugin The executions section I've just added, but I'm not sure how to get to where I want to go. What I want is the ability to run this plugin with the update feature on, so that I can update the databases easily, when I'm in development mode. What XML do I add to create a new separate goal? I supposed I could toggle update using a commandline parameter, but I'm wondering, what are the ways to create a different configuration for a plugin? For the antrun plugin to be useful, it seems like you should be able to specify many different task configurations. Alan Gutierrez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANN] Maven Hibernate3 Plugin 2.1 Released
The Mojo team is pleased to announce the release of the Maven Hibernate3 Plugin version 2.1. This release contains some dependencies upgrades and bug fixes. A list of changes is attached at the end of this mail. Enjoy! Johann Reyes Release Notes - Maven 2.x Hibernate Plugin - Version 2.1 ** Bug * [MHIBERNATE-67] - Plugin Not Working with a persistence.xml and annotations * [MHIBERNATE-72] - Example page with phase embedding shows wrong example ** Improvement * [MHIBERNATE-64] - Update dependencies to latest hibernate and hibernate tools * [MHIBERNATE-71] - jpaconfiguration does not support namingstrategy
Re: running hibernate3 plugin with jpaconfiguration
] And finally here is one of my entity class: package deng.auction.data.model; import javax.persistence.*; @Entity @Table(name=category) public class Category { @Id @GeneratedValue @Column(name=id) private Short id; @Column(name=name) private String name; public Short getId() { return id; } public void setId(Short id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } } Thanks -- /bugslayer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/running-hibernate3-plugin-with-jpaconfiguration-tf4503567s177.html#a12863736 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: running hibernate3 plugin with jpaconfiguration
Thanks for helping guys, but I finally figured out. My problem is I didn't have hibernate-annotations as dependency added! But as I stated in the first email, there is not ERROR reported! Everything runs and reported as SUCCESSFUL. Maybe the hibernate3 plugin developer should check for this and give a gentle error instead? So, for me, these are the basic file settings needed to get a Hibernate JPA + Mysql project started with Maven. I hope this help other when they look for it. pom.xml http://snipplr.com/view/3767/maven2-pomxml-for-hibernatejpamysqlhibernatetools/ src/main/resources/META-INF/persistence.xml: http://snipplr.com/view/3770/persistentxml-for-hibernate-vendor/ this is my model class for testing: src/main/java/deng/myhibernatejpa http://snipplr.com/view/3769/jpa-annotatedpersistent-class/ Now you can run: mvn hibernate3:hbm2ddl -Z On 9/24/07, mraible [EMAIL PROTECTED] wrote: It works in AppFuse - maybe it'd help to look at our configuration. Archetype creation commands @ http://appfuse.org/display/APF/AppFuse+QuickStart Change from Hibernate to JPA: http://appfuse.org/display/APF/Using+JPA#UsingJPA-setup HTH, Matt thebugslayer wrote: Hi, Can someone please help me see why I do not see my database table created after I ran $ mvn hibernate3:hbm2ddl? I don't have any errors, just database wasn't updated. This is my partial pom.xml plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-alpha-2/version configuration components component namehbm2ddl/name /component /components componentProperties implementationjpaconfiguration/implementation droptrue/drop createtrue/create exporttrue/export jdk5true/jdk5 persistenceunitdefault/persistenceunit /componentProperties /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.0.5/version /dependency /dependencies /plugin Here is my persistence.xml ?xml version=1.0 encoding=UTF-8? persistence xmlns=http://java.sun.com/xml/ns/persistence; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd; version=1.0 persistence-unit name=default providerorg.hibernate.ejb.HibernatePersistence/provider properties !-- Auto detect annotation model classes -- property name=hibernate.archive.autodetection value=class/ !-- Datasource -- property name=hibernate.dialect value=org.hibernate.dialect.MySQLDialect/ property name=hibernate.connection.driver_class value=com.mysql.jdbc.Driver/ property name=hibernate.connection.username value=root/ property name=hibernate.connection.password value=/ property name=hibernate.connection.url value=jdbc:mysql://localhost/auction_dev/ /properties /persistence-unit /persistence Here is my mvn output: [INFO] [hibernate3:hbm2ddl] 04:40:52,707 INFO org.hibernate.ejb.Version - Hibernate EntityManager 3.2.0.GA 04:40:52,723 INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.2.0.GA 04:40:52,730 INFO org.hibernate.cfg.Environment - Hibernate 3.2.0.cr5 04:40:52,734 INFO org.hibernate.cfg.Environment - hibernate.properties not found 04:40:52,735 INFO org.hibernate.cfg.Environment - Bytecode provider name : cglib 04:40:52,740 INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling [DEBUG] basedir: /Users/zemian/Desktop/projects/auction [INFO] src/main/resources/hibernate.cfg.xml not found within the project. Trying absolute path. [INFO] No hibernate configuration file loaded. [INFO] src/main/resources/database.properties not found within the project. Trying absolute path. [INFO] No hibernate properties file loaded. 04:40:53,067 INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect 04:40:53,108 INFO org.hibernate.tool.hbm2ddl.SchemaExport - Running hbm2ddl schema export 04:40:53,109 INFO org.hibernate.tool.hbm2ddl.SchemaExport - exporting generated schema to database 04:40:53,112 INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection
Re: running hibernate3 plugin with jpaconfiguration
How would you propose that the hibernate3 plugin possibly know that you didn't include the annotations dependency when you should have? Can you describe (in pseudo-code) how the plugin should behave? I'd have trouble describing it, much less implementing it. Its one of those do what I mean, not what I said kind of things that computers aren't very good at. Wayne On 9/24/07, thebugslayer [EMAIL PROTECTED] wrote: Thanks for helping guys, but I finally figured out. My problem is I didn't have hibernate-annotations as dependency added! But as I stated in the first email, there is not ERROR reported! Everything runs and reported as SUCCESSFUL. Maybe the hibernate3 plugin developer should check for this and give a gentle error instead? So, for me, these are the basic file settings needed to get a Hibernate JPA + Mysql project started with Maven. I hope this help other when they look for it. pom.xml http://snipplr.com/view/3767/maven2-pomxml-for-hibernatejpamysqlhibernatetools/ src/main/resources/META-INF/persistence.xml: http://snipplr.com/view/3770/persistentxml-for-hibernate-vendor/ this is my model class for testing: src/main/java/deng/myhibernatejpa http://snipplr.com/view/3769/jpa-annotatedpersistent-class/ Now you can run: mvn hibernate3:hbm2ddl -Z On 9/24/07, mraible [EMAIL PROTECTED] wrote: It works in AppFuse - maybe it'd help to look at our configuration. Archetype creation commands @ http://appfuse.org/display/APF/AppFuse+QuickStart Change from Hibernate to JPA: http://appfuse.org/display/APF/Using+JPA#UsingJPA-setup HTH, Matt thebugslayer wrote: Hi, Can someone please help me see why I do not see my database table created after I ran $ mvn hibernate3:hbm2ddl? I don't have any errors, just database wasn't updated. This is my partial pom.xml plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-alpha-2/version configuration components component namehbm2ddl/name /component /components componentProperties implementationjpaconfiguration/implementation droptrue/drop createtrue/create exporttrue/export jdk5true/jdk5 persistenceunitdefault/persistenceunit /componentProperties /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.0.5/version /dependency /dependencies /plugin Here is my persistence.xml ?xml version=1.0 encoding=UTF-8? persistence xmlns=http://java.sun.com/xml/ns/persistence; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd; version=1.0 persistence-unit name=default providerorg.hibernate.ejb.HibernatePersistence/provider properties !-- Auto detect annotation model classes -- property name=hibernate.archive.autodetection value=class/ !-- Datasource -- property name=hibernate.dialect value=org.hibernate.dialect.MySQLDialect/ property name=hibernate.connection.driver_class value=com.mysql.jdbc.Driver/ property name=hibernate.connection.username value=root/ property name=hibernate.connection.password value=/ property name=hibernate.connection.url value=jdbc:mysql://localhost/auction_dev/ /properties /persistence-unit /persistence Here is my mvn output: [INFO] [hibernate3:hbm2ddl] 04:40:52,707 INFO org.hibernate.ejb.Version - Hibernate EntityManager 3.2.0.GA 04:40:52,723 INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.2.0.GA 04:40:52,730 INFO org.hibernate.cfg.Environment - Hibernate 3.2.0.cr5 04:40:52,734 INFO org.hibernate.cfg.Environment - hibernate.properties not found 04:40:52,735 INFO org.hibernate.cfg.Environment - Bytecode provider name : cglib 04:40:52,740 INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling [DEBUG] basedir: /Users/zemian/Desktop/projects/auction [INFO] src/main/resources/hibernate.cfg.xml not found within the project. Trying absolute path. [INFO] No hibernate configuration file loaded. [INFO] src/main/resources
Re: running hibernate3 plugin with jpaconfiguration
Hum I can't think of anything on top of my head at the moment either Wayne. Perhaps one way would help if we simply add hibernate-annotations as depended by hibernate-entitymanager in it's pom. We get error if we don't have hibernate-entitymanager when using jpaconfiguration in hiberante-tools implementation. -Z On 9/24/07, Wayne Fay [EMAIL PROTECTED] wrote: How would you propose that the hibernate3 plugin possibly know that you didn't include the annotations dependency when you should have? Can you describe (in pseudo-code) how the plugin should behave? I'd have trouble describing it, much less implementing it. Its one of those do what I mean, not what I said kind of things that computers aren't very good at. Wayne On 9/24/07, thebugslayer [EMAIL PROTECTED] wrote: Thanks for helping guys, but I finally figured out. My problem is I didn't have hibernate-annotations as dependency added! But as I stated in the first email, there is not ERROR reported! Everything runs and reported as SUCCESSFUL. Maybe the hibernate3 plugin developer should check for this and give a gentle error instead? So, for me, these are the basic file settings needed to get a Hibernate JPA + Mysql project started with Maven. I hope this help other when they look for it. pom.xml http://snipplr.com/view/3767/maven2-pomxml-for-hibernatejpamysqlhibernatetools/ src/main/resources/META-INF/persistence.xml: http://snipplr.com/view/3770/persistentxml-for-hibernate-vendor/ this is my model class for testing: src/main/java/deng/myhibernatejpa http://snipplr.com/view/3769/jpa-annotatedpersistent-class/ Now you can run: mvn hibernate3:hbm2ddl -Z On 9/24/07, mraible [EMAIL PROTECTED] wrote: It works in AppFuse - maybe it'd help to look at our configuration. Archetype creation commands @ http://appfuse.org/display/APF/AppFuse+QuickStart Change from Hibernate to JPA: http://appfuse.org/display/APF/Using+JPA#UsingJPA-setup HTH, Matt thebugslayer wrote: Hi, Can someone please help me see why I do not see my database table created after I ran $ mvn hibernate3:hbm2ddl? I don't have any errors, just database wasn't updated. This is my partial pom.xml plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-alpha-2/version configuration components component namehbm2ddl/name /component /components componentProperties implementationjpaconfiguration/implementation droptrue/drop createtrue/create exporttrue/export jdk5true/jdk5 persistenceunitdefault/persistenceunit /componentProperties /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.0.5/version /dependency /dependencies /plugin Here is my persistence.xml ?xml version=1.0 encoding=UTF-8? persistence xmlns=http://java.sun.com/xml/ns/persistence; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd; version=1.0 persistence-unit name=default providerorg.hibernate.ejb.HibernatePersistence/provider properties !-- Auto detect annotation model classes -- property name=hibernate.archive.autodetection value=class/ !-- Datasource -- property name=hibernate.dialect value=org.hibernate.dialect.MySQLDialect/ property name=hibernate.connection.driver_class value=com.mysql.jdbc.Driver/ property name=hibernate.connection.username value=root/ property name=hibernate.connection.password value=/ property name=hibernate.connection.url value=jdbc:mysql://localhost/auction_dev/ /properties /persistence-unit /persistence Here is my mvn output: [INFO] [hibernate3:hbm2ddl] 04:40:52,707 INFO org.hibernate.ejb.Version - Hibernate EntityManager 3.2.0.GA 04:40:52,723 INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.2.0.GA 04:40:52,730 INFO org.hibernate.cfg.Environment - Hibernate 3.2.0.cr5 04:40:52,734 INFO
Re: running hibernate3 plugin with jpaconfiguration
Also second helpful item to other users in community would be a working version of pom.xml with each specific of configuration implementation ( i believe there is only 3) as examples in the plug-in site? It was the first place I looked, and I couldn't get the project working after many hours of more searching. Just an idea/feedback :) -Z On 9/24/07, thebugslayer [EMAIL PROTECTED] wrote: Hum I can't think of anything on top of my head at the moment either Wayne. Perhaps one way would help if we simply add hibernate-annotations as depended by hibernate-entitymanager in it's pom. We get error if we don't have hibernate-entitymanager when using jpaconfiguration in hiberante-tools implementation. -Z On 9/24/07, Wayne Fay [EMAIL PROTECTED] wrote: How would you propose that the hibernate3 plugin possibly know that you didn't include the annotations dependency when you should have? Can you describe (in pseudo-code) how the plugin should behave? I'd have trouble describing it, much less implementing it. Its one of those do what I mean, not what I said kind of things that computers aren't very good at. Wayne On 9/24/07, thebugslayer [EMAIL PROTECTED] wrote: Thanks for helping guys, but I finally figured out. My problem is I didn't have hibernate-annotations as dependency added! But as I stated in the first email, there is not ERROR reported! Everything runs and reported as SUCCESSFUL. Maybe the hibernate3 plugin developer should check for this and give a gentle error instead? So, for me, these are the basic file settings needed to get a Hibernate JPA + Mysql project started with Maven. I hope this help other when they look for it. pom.xml http://snipplr.com/view/3767/maven2-pomxml-for-hibernatejpamysqlhibernatetools/ src/main/resources/META-INF/persistence.xml: http://snipplr.com/view/3770/persistentxml-for-hibernate-vendor/ this is my model class for testing: src/main/java/deng/myhibernatejpa http://snipplr.com/view/3769/jpa-annotatedpersistent-class/ Now you can run: mvn hibernate3:hbm2ddl -Z On 9/24/07, mraible [EMAIL PROTECTED] wrote: It works in AppFuse - maybe it'd help to look at our configuration. Archetype creation commands @ http://appfuse.org/display/APF/AppFuse+QuickStart Change from Hibernate to JPA: http://appfuse.org/display/APF/Using+JPA#UsingJPA-setup HTH, Matt thebugslayer wrote: Hi, Can someone please help me see why I do not see my database table created after I ran $ mvn hibernate3:hbm2ddl? I don't have any errors, just database wasn't updated. This is my partial pom.xml plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-alpha-2/version configuration components component namehbm2ddl/name /component /components componentProperties implementationjpaconfiguration/implementation droptrue/drop createtrue/create exporttrue/export jdk5true/jdk5 persistenceunitdefault/persistenceunit /componentProperties /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.0.5/version /dependency /dependencies /plugin Here is my persistence.xml ?xml version=1.0 encoding=UTF-8? persistence xmlns=http://java.sun.com/xml/ns/persistence; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd; version=1.0 persistence-unit name=default providerorg.hibernate.ejb.HibernatePersistence/provider properties !-- Auto detect annotation model classes -- property name=hibernate.archive.autodetection value=class/ !-- Datasource -- property name=hibernate.dialect value=org.hibernate.dialect.MySQLDialect/ property name=hibernate.connection.driver_class value=com.mysql.jdbc.Driver/ property name=hibernate.connection.username value=root/ property name=hibernate.connection.password value
running hibernate3 plugin with jpaconfiguration
Hi, Can someone please help me see why I do not see my database table created after I ran $ mvn hibernate3:hbm2ddl? I don't have any errors, just database wasn't updated. This is my partial pom.xml plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-alpha-2/version configuration components component namehbm2ddl/name /component /components componentProperties implementationjpaconfiguration/implementation droptrue/drop createtrue/create exporttrue/export jdk5true/jdk5 persistenceunitdefault/persistenceunit /componentProperties /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.0.5/version /dependency /dependencies /plugin Here is my persistence.xml ?xml version=1.0 encoding=UTF-8? persistence xmlns=http://java.sun.com/xml/ns/persistence; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd; version=1.0 persistence-unit name=default providerorg.hibernate.ejb.HibernatePersistence/provider properties !-- Auto detect annotation model classes -- property name=hibernate.archive.autodetection value=class/ !-- Datasource -- property name=hibernate.dialect value=org.hibernate.dialect.MySQLDialect/ property name=hibernate.connection.driver_class value=com.mysql.jdbc.Driver/ property name=hibernate.connection.username value=root/ property name=hibernate.connection.password value=/ property name=hibernate.connection.url value=jdbc:mysql://localhost/auction_dev/ /properties /persistence-unit /persistence Here is my mvn output: [INFO] [hibernate3:hbm2ddl] 04:40:52,707 INFO org.hibernate.ejb.Version - Hibernate EntityManager 3.2.0.GA 04:40:52,723 INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.2.0.GA 04:40:52,730 INFO org.hibernate.cfg.Environment - Hibernate 3.2.0.cr5 04:40:52,734 INFO org.hibernate.cfg.Environment - hibernate.properties not found 04:40:52,735 INFO org.hibernate.cfg.Environment - Bytecode provider name : cglib 04:40:52,740 INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling [DEBUG] basedir: /Users/zemian/Desktop/projects/auction [INFO] src/main/resources/hibernate.cfg.xml not found within the project. Trying absolute path. [INFO] No hibernate configuration file loaded. [INFO] src/main/resources/database.properties not found within the project. Trying absolute path. [INFO] No hibernate properties file loaded. 04:40:53,067 INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect 04:40:53,108 INFO org.hibernate.tool.hbm2ddl.SchemaExport - Running hbm2ddl schema export 04:40:53,109 INFO org.hibernate.tool.hbm2ddl.SchemaExport - exporting generated schema to database 04:40:53,112 INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!) 04:40:53,112 INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20 04:40:53,112 INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: true 04:40:53,116 INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/auction_dev 04:40:53,116 INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=root, password=, autocommit=true, release_mode=auto} 04:40:53,329 INFO org.hibernate.tool.hbm2ddl.SchemaExport - schema export complete 04:40:53,330 INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:mysql://localhost/auction_dev [INFO] [INFO] BUILD SUCCESSFUL [INFO] And finally here is one of my entity class: package deng.auction.data.model; import javax.persistence.*; @Entity @Table(name=category) public class Category { @Id @GeneratedValue @Column(name=id) private Short id; @Column(name=name) private String name; public Short getId() { return id; } public void setId(Short id) { this.id =
Re: How do i use the hibernate3 plugin from codehause
I had this problem too and it seems we're not alone. In my opinion an extra property should be added: executeOnDatabase (but with a better name) which defaults on false and outputFile should default on something like target/hibernate3/script.sql so a defaulted hbm2dll run would create scripts. It's *very* scary when you try to create script files and it starts doing things on the database. With kind regards, Geoffrey De Smet Charles Harvey III wrote: I'll be damned. I had outputFile setup before and it never did anything. Maybe because I had it as a .txt file. I don't care, as long as it is working now I feel much better. Sorry that I said it did not work correctly. Charlie Johann Reyes said the following on 10/20/2006 10:10 AM: Hello Charles To output to a file, you just need to check that you have configured the following parameter outputFile as described here: http://mojo.codehaus.org/hibernate3-maven-plugin/hbm2ddl-mojo.html Once the plugin sees that you have specified that parameter, it won't attempt to write in the database, instead it would do it in the file just specified. *note* Just specify a filename like dll-schema.sql not a file path. Regards Johann Reyes -Original Message- From: Charles Harvey III [mailto:[EMAIL PROTECTED] Sent: Friday, October 20, 2006 10:01 AM To: Maven Users List Subject: Re: How do i use the hibernate3 plugin from codehause You have been able to generate DDL files? See, I think I was mislead by what hibernate3:hbm2ddl is supposed to do. I wanted it to generate a bunch of text files with a bunch of CREATE statements. Instead, it connects to my database and creates the tables for me. I can't stop it from doing that. If I don't put in a connection URL to the database, it fails. And I have setup the outputDirectory correctly in the plugin setup, still nothing. Can someone send me their exact setup so that I can try this again. And, just to be sure. Is this possible? I do NOT want to have the tables created automatically. I just want text files. Thanks. Charlie Stefan Hübner said the following on 10/19/2006 1:34 PM: Hi Yves, 2006/10/19, Yves Van Steen [EMAIL PROTECTED]: I want to create ddl sql files from my hbm files but none of the goals of the hibernate3 plugin actually works? Is this plugin useable or still in development? I'm using it quite successfully to generate ddl-files with hibernate3:hbm2ddl. I was also trying to get hbm2doc running, but that one is not working as of now, because the Hibernate-libraries are not stable yet. Apperently there are some screwed up dependencies. It's in development (1.0-SNAPSHOT). There was an attempt to publish 1.0, but that process got stuck a while ago. there are still some bugs left - like your one. you might want to keep track of http://jira.codehaus.org/browse/MOJO-515. I think, whenever the Hibernate guys publish their 3.2 release, this plugin will be fixed. Even now it does a great job. jm2c -Stefan - 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] !DSPAM:4538d73c241851913645530! - 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: How do i use the hibernate3 plugin from codehause
Hi Yves, 2006/10/19, Yves Van Steen [EMAIL PROTECTED]: I want to create ddl sql files from my hbm files but none of the goals of the hibernate3 plugin actually works? Is this plugin useable or still in development? I'm using it quite successfully to generate ddl-files with hibernate3:hbm2ddl. I was also trying to get hbm2doc running, but that one is not working as of now, because the Hibernate-libraries are not stable yet. Apperently there are some screwed up dependencies. It's in development (1.0-SNAPSHOT). There was an attempt to publish 1.0, but that process got stuck a while ago. there are still some bugs left - like your one. you might want to keep track of http://jira.codehaus.org/browse/MOJO-515. I think, whenever the Hibernate guys publish their 3.2 release, this plugin will be fixed. Even now it does a great job. jm2c -Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do i use the hibernate3 plugin from codehause
[This discussion should really move to [EMAIL PROTECTED] On 19/10/06, Stefan Hübner [EMAIL PROTECTED] wrote: It's in development (1.0-SNAPSHOT). There was an attempt to publish 1.0, but that process got stuck a while ago. there are still some bugs left - like your one. you might want to keep track of http://jira.codehaus.org/browse/MOJO-515. This should be fixed with hibernate-tools 3.2.0.beta8. I think, whenever the Hibernate guys publish their 3.2 release, this plugin will be fixed. Even now it does a great job. Hibernate 3.2.0.ga is now out and uploaded to ibiblio, but a release of the hibernate3-maven-plugin is really waiting for hibernate-tools to use these new releases. See this thread: http://archive.mojo.codehaus.org/dev/c184d750610180649h22e63af0sdd427bd9f67a163%40mail.gmail.com Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do i use the hibernate3 plugin from codehause
You have been able to generate DDL files? See, I think I was mislead by what hibernate3:hbm2ddl is supposed to do. I wanted it to generate a bunch of text files with a bunch of CREATE statements. Instead, it connects to my database and creates the tables for me. I can't stop it from doing that. If I don't put in a connection URL to the database, it fails. And I have setup the outputDirectory correctly in the plugin setup, still nothing. Can someone send me their exact setup so that I can try this again. And, just to be sure. Is this possible? I do NOT want to have the tables created automatically. I just want text files. Thanks. Charlie Stefan Hübner said the following on 10/19/2006 1:34 PM: Hi Yves, 2006/10/19, Yves Van Steen [EMAIL PROTECTED]: I want to create ddl sql files from my hbm files but none of the goals of the hibernate3 plugin actually works? Is this plugin useable or still in development? I'm using it quite successfully to generate ddl-files with hibernate3:hbm2ddl. I was also trying to get hbm2doc running, but that one is not working as of now, because the Hibernate-libraries are not stable yet. Apperently there are some screwed up dependencies. It's in development (1.0-SNAPSHOT). There was an attempt to publish 1.0, but that process got stuck a while ago. there are still some bugs left - like your one. you might want to keep track of http://jira.codehaus.org/browse/MOJO-515. I think, whenever the Hibernate guys publish their 3.2 release, this plugin will be fixed. Even now it does a great job. jm2c -Stefan - 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: How do i use the hibernate3 plugin from codehause
Hello Charles To output to a file, you just need to check that you have configured the following parameter outputFile as described here: http://mojo.codehaus.org/hibernate3-maven-plugin/hbm2ddl-mojo.html Once the plugin sees that you have specified that parameter, it won't attempt to write in the database, instead it would do it in the file just specified. *note* Just specify a filename like dll-schema.sql not a file path. Regards Johann Reyes -Original Message- From: Charles Harvey III [mailto:[EMAIL PROTECTED] Sent: Friday, October 20, 2006 10:01 AM To: Maven Users List Subject: Re: How do i use the hibernate3 plugin from codehause You have been able to generate DDL files? See, I think I was mislead by what hibernate3:hbm2ddl is supposed to do. I wanted it to generate a bunch of text files with a bunch of CREATE statements. Instead, it connects to my database and creates the tables for me. I can't stop it from doing that. If I don't put in a connection URL to the database, it fails. And I have setup the outputDirectory correctly in the plugin setup, still nothing. Can someone send me their exact setup so that I can try this again. And, just to be sure. Is this possible? I do NOT want to have the tables created automatically. I just want text files. Thanks. Charlie Stefan Hübner said the following on 10/19/2006 1:34 PM: Hi Yves, 2006/10/19, Yves Van Steen [EMAIL PROTECTED]: I want to create ddl sql files from my hbm files but none of the goals of the hibernate3 plugin actually works? Is this plugin useable or still in development? I'm using it quite successfully to generate ddl-files with hibernate3:hbm2ddl. I was also trying to get hbm2doc running, but that one is not working as of now, because the Hibernate-libraries are not stable yet. Apperently there are some screwed up dependencies. It's in development (1.0-SNAPSHOT). There was an attempt to publish 1.0, but that process got stuck a while ago. there are still some bugs left - like your one. you might want to keep track of http://jira.codehaus.org/browse/MOJO-515. I think, whenever the Hibernate guys publish their 3.2 release, this plugin will be fixed. Even now it does a great job. jm2c -Stefan - 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] !DSPAM:4538d73c241851913645530! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do i use the hibernate3 plugin from codehause
I'll be damned. I had outputFile setup before and it never did anything. Maybe because I had it as a .txt file. I don't care, as long as it is working now I feel much better. Sorry that I said it did not work correctly. Charlie Johann Reyes said the following on 10/20/2006 10:10 AM: Hello Charles To output to a file, you just need to check that you have configured the following parameter outputFile as described here: http://mojo.codehaus.org/hibernate3-maven-plugin/hbm2ddl-mojo.html Once the plugin sees that you have specified that parameter, it won't attempt to write in the database, instead it would do it in the file just specified. *note* Just specify a filename like dll-schema.sql not a file path. Regards Johann Reyes -Original Message- From: Charles Harvey III [mailto:[EMAIL PROTECTED] Sent: Friday, October 20, 2006 10:01 AM To: Maven Users List Subject: Re: How do i use the hibernate3 plugin from codehause You have been able to generate DDL files? See, I think I was mislead by what hibernate3:hbm2ddl is supposed to do. I wanted it to generate a bunch of text files with a bunch of CREATE statements. Instead, it connects to my database and creates the tables for me. I can't stop it from doing that. If I don't put in a connection URL to the database, it fails. And I have setup the outputDirectory correctly in the plugin setup, still nothing. Can someone send me their exact setup so that I can try this again. And, just to be sure. Is this possible? I do NOT want to have the tables created automatically. I just want text files. Thanks. Charlie Stefan Hübner said the following on 10/19/2006 1:34 PM: Hi Yves, 2006/10/19, Yves Van Steen [EMAIL PROTECTED]: I want to create ddl sql files from my hbm files but none of the goals of the hibernate3 plugin actually works? Is this plugin useable or still in development? I'm using it quite successfully to generate ddl-files with hibernate3:hbm2ddl. I was also trying to get hbm2doc running, but that one is not working as of now, because the Hibernate-libraries are not stable yet. Apperently there are some screwed up dependencies. It's in development (1.0-SNAPSHOT). There was an attempt to publish 1.0, but that process got stuck a while ago. there are still some bugs left - like your one. you might want to keep track of http://jira.codehaus.org/browse/MOJO-515. I think, whenever the Hibernate guys publish their 3.2 release, this plugin will be fixed. Even now it does a great job. jm2c -Stefan - 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] !DSPAM:4538d73c241851913645530! - 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: How do i use the hibernate3 plugin from codehause
Hey, So the hbm2ddl goal creates the ddl sql script. But what does the schema-update schema-export goals do? They should then execute the sql script on the database but that don't seem to work for me. It just creates the sql script. Anybody have any ideas? The build just succeeds but no database changes present. Here is my configuration. I run the command mvn install. What is the objective: 1) create the sql file in the src/main/resources (this it does but not in the correct folder ) 2) execute the schema to the db plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version1.0-SNAPSHOT/version executions executionphaseinstall/phase goals goalhbm2ddl/goal goalschema-export/goal /goals /execution /executions configuration hibernateconfigurationFile/src/main/resources/hibernate.cfg.xml/configu rationFile/hibernate outputDirectory hbm2dllsrc/main/resources/hbm2dll /outputDirectory outputFiledbcreate.sql/outputFile updatetrue/update droptrue/drop formatfalse/format /configuration /plugin -Oorspronkelijk bericht- Van: Charles Harvey III [mailto:[EMAIL PROTECTED] Verzonden: vrijdag 20 oktober 2006 16:59 Aan: Maven Users List Onderwerp: Re: How do i use the hibernate3 plugin from codehause I'll be damned. I had outputFile setup before and it never did anything. Maybe because I had it as a .txt file. I don't care, as long as it is working now I feel much better. Sorry that I said it did not work correctly. Charlie Johann Reyes said the following on 10/20/2006 10:10 AM: Hello Charles To output to a file, you just need to check that you have configured the following parameter outputFile as described here: http://mojo.codehaus.org/hibernate3-maven-plugin/hbm2ddl-mojo.html Once the plugin sees that you have specified that parameter, it won't attempt to write in the database, instead it would do it in the file just specified. *note* Just specify a filename like dll-schema.sql not a file path. Regards Johann Reyes -Original Message- From: Charles Harvey III [mailto:[EMAIL PROTECTED] Sent: Friday, October 20, 2006 10:01 AM To: Maven Users List Subject: Re: How do i use the hibernate3 plugin from codehause You have been able to generate DDL files? See, I think I was mislead by what hibernate3:hbm2ddl is supposed to do. I wanted it to generate a bunch of text files with a bunch of CREATE statements. Instead, it connects to my database and creates the tables for me. I can't stop it from doing that. If I don't put in a connection URL to the database, it fails. And I have setup the outputDirectory correctly in the plugin setup, still nothing. Can someone send me their exact setup so that I can try this again. And, just to be sure. Is this possible? I do NOT want to have the tables created automatically. I just want text files. Thanks. Charlie Stefan Hübner said the following on 10/19/2006 1:34 PM: Hi Yves, 2006/10/19, Yves Van Steen [EMAIL PROTECTED]: I want to create ddl sql files from my hbm files but none of the goals of the hibernate3 plugin actually works? Is this plugin useable or still in development? I'm using it quite successfully to generate ddl-files with hibernate3:hbm2ddl. I was also trying to get hbm2doc running, but that one is not working as of now, because the Hibernate-libraries are not stable yet. Apperently there are some screwed up dependencies. It's in development (1.0-SNAPSHOT). There was an attempt to publish 1.0, but that process got stuck a while ago. there are still some bugs left - like your one. you might want to keep track of http://jira.codehaus.org/browse/MOJO-515. I think, whenever the Hibernate guys publish their 3.2 release, this plugin will be fixed. Even now it does a great job. jm2c -Stefan - 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] !DSPAM:4538d73c241851913645530! - 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] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.408
How do i use the hibernate3 plugin from codehause
Hey, I want to create ddl sql files from my hbm files but none of the goals of the hibernate3 plugin actually works? Is this plugin useable or still in development? If possible I also want to execute these sql files to my database server. Anybody have any ideas? My configuration is the same as on the info site HYPERLINK http://mojo.codehaus.org/hibernate3-maven-plugin/howto.htmlhttp://mojo.cod ehaus.org/hibernate3-maven-plugin/howto.html OUTPUT Hibernate3:hbm2java = generates the java files but ends with an error hibernate3:schema-update = returns success but does nothing hibernate3:hbm2doc = class not found exception org/hibernate/engine/query/sql/NativeSQLQueryReturn hibernate3:hbm2hbmxml = class not found exception org/hibernate/engine/query/sql/NativeSQLQueryReturn Hibernate3:hbm2ddl hibernate3:schema-export (any difference between the 2 ???) returns this [INFO] Configuration XML file loaded: G:\PROJECTS\sw - admin baert\source\Common \src\main\resources\hibernate.cfg.xml [INFO] Configuration Properties file loaded: G:\PROJECTS\sw - admin baert\source \Common\src\main\resources\database.properties [WARNING] 1 error(s) occurred while performing hbm2ddl. [WARNING] Error #1: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused: connect STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused: connect at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja va:156) at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:276) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2641) at com.mysql.jdbc.Connection.init(Connection.java:1531) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java :266) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:140) at org.hibernate.connection.DriverManagerConnectionProvider.getConnectio n(DriverManagerConnectionProvider.java:110) at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(Ma nagedProviderConnectionHelper.java:28) at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:178 ) at org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doSchemaExport (SchemaExportMojo.java:79) at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(H bm2DDLExporterMojo.java:56) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateE xporterMojo.java:59) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:534) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:488) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:140) 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:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.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) ** END NESTED EXCEPTION ** -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.408 / Virus Database: 268.13.5/483 - Release Date: 18/10/2006
Re: How do i use the hibernate3 plugin from codehause
No. It does not work. I have been trying to get that thing to generate SQL files for a month now. Don't bother wasting your time. Charlie Yves Van Steen said the following on 10/19/2006 1:00 PM: Hey, I want to create ddl sql files from my hbm files but none of the goals of the hibernate3 plugin actually works? Is this plugin useable or still in development? If possible I also want to execute these sql files to my database server. Anybody have any ideas? My configuration is the same as on the info site HYPERLINK http://mojo.codehaus.org/hibernate3-maven-plugin/howto.htmlhttp://mojo.cod ehaus.org/hibernate3-maven-plugin/howto.html OUTPUT Hibernate3:hbm2java = generates the java files but ends with an error hibernate3:schema-update = returns success but does nothing hibernate3:hbm2doc = class not found exception org/hibernate/engine/query/sql/NativeSQLQueryReturn hibernate3:hbm2hbmxml = class not found exception org/hibernate/engine/query/sql/NativeSQLQueryReturn Hibernate3:hbm2ddl hibernate3:schema-export (any difference between the 2 ???) returns this [INFO] Configuration XML file loaded: G:\PROJECTS\sw - admin baert\source\Common \src\main\resources\hibernate.cfg.xml [INFO] Configuration Properties file loaded: G:\PROJECTS\sw - admin baert\source \Common\src\main\resources\database.properties [WARNING] 1 error(s) occurred while performing hbm2ddl. [WARNING] Error #1: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused: connect STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused: connect at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja va:156) at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:276) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2641) at com.mysql.jdbc.Connection.init(Connection.java:1531) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java :266) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:140) at org.hibernate.connection.DriverManagerConnectionProvider.getConnectio n(DriverManagerConnectionProvider.java:110) at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(Ma nagedProviderConnectionHelper.java:28) at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:178 ) at org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doSchemaExport (SchemaExportMojo.java:79) at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(H bm2DDLExporterMojo.java:56) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateE xporterMojo.java:59) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:534) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:488) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:140) 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:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.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) ** END NESTED EXCEPTION ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do i use the hibernate3 plugin from codehause
Hello Yves To create sql from hbm.xml files it works, from the error message that you posted, it looks like it's failing to connect to your database server as it looks it's trying to create the database tables in it. The difference between hbm2ddl and schema-export is that hbm2ddl is used to create and update database schemas (thus you need to specify what action you are going to do in your pom.xml) while the schema-export you don't need to specify nothing in your pom.xml and it creates the tables in the database while schema-update it just update the schema in the database. About your error, it looks the database it's running because the database it's refusing the connection, so I would check the username and password that you are using to create the connection to see if they are the right ones. Regards Johann Reyes -Original Message- From: Yves Van Steen [mailto:[EMAIL PROTECTED] Sent: Thursday, October 19, 2006 1:01 PM To: Maven Users List Subject: How do i use the hibernate3 plugin from codehause Hey, I want to create ddl sql files from my hbm files but none of the goals of the hibernate3 plugin actually works? Is this plugin useable or still in development? If possible I also want to execute these sql files to my database server. Anybody have any ideas? My configuration is the same as on the info site HYPERLINK http://mojo.codehaus.org/hibernate3-maven-plugin/howto.htmlhttp://mojo.cod ehaus.org/hibernate3-maven-plugin/howto.html OUTPUT Hibernate3:hbm2java = generates the java files but ends with an error hibernate3:schema-update = returns success but does nothing hibernate3:hbm2doc = class not found exception org/hibernate/engine/query/sql/NativeSQLQueryReturn hibernate3:hbm2hbmxml = class not found exception org/hibernate/engine/query/sql/NativeSQLQueryReturn Hibernate3:hbm2ddl hibernate3:schema-export (any difference between the 2 ???) returns this [INFO] Configuration XML file loaded: G:\PROJECTS\sw - admin baert\source\Common \src\main\resources\hibernate.cfg.xml [INFO] Configuration Properties file loaded: G:\PROJECTS\sw - admin baert\source \Common\src\main\resources\database.properties [WARNING] 1 error(s) occurred while performing hbm2ddl. [WARNING] Error #1: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused: connect STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused: connect at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja va:156) at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:276) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2641) at com.mysql.jdbc.Connection.init(Connection.java:1531) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java :266) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:140) at org.hibernate.connection.DriverManagerConnectionProvider.getConnectio n(DriverManagerConnectionProvider.java:110) at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(Ma nagedProviderConnectionHelper.java:28) at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:178 ) at org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doSchemaExport (SchemaExportMojo.java:79) at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(H bm2DDLExporterMojo.java:56) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateE xporterMojo.java:59) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:534) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:488) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:140) 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:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39
RE: How do i use the hibernate3 plugin from codehause
Hello Charles From hbm.xml files it works sql generation. From annotated classes also it does. For JPA classes not sure yet as they are something new and I'm looking into it. I have checked my messages and haven't found a message from you reporting a problem, so if you like I can help you with it. Regards Johann Reyes -Original Message- From: Charles Harvey III [mailto:[EMAIL PROTECTED] Sent: Thursday, October 19, 2006 1:04 PM To: Maven Users List Subject: Re: How do i use the hibernate3 plugin from codehause No. It does not work. I have been trying to get that thing to generate SQL files for a month now. Don't bother wasting your time. Charlie Yves Van Steen said the following on 10/19/2006 1:00 PM: Hey, I want to create ddl sql files from my hbm files but none of the goals of the hibernate3 plugin actually works? Is this plugin useable or still in development? If possible I also want to execute these sql files to my database server. Anybody have any ideas? My configuration is the same as on the info site HYPERLINK http://mojo.codehaus.org/hibernate3-maven-plugin/howto.htmlhttp://mo jo.cod ehaus.org/hibernate3-maven-plugin/howto.html OUTPUT Hibernate3:hbm2java = generates the java files but ends with an error hibernate3:schema-update = returns success but does nothing hibernate3:hbm2doc = class not found exception org/hibernate/engine/query/sql/NativeSQLQueryReturn hibernate3:hbm2hbmxml = class not found exception org/hibernate/engine/query/sql/NativeSQLQueryReturn Hibernate3:hbm2ddl hibernate3:schema-export (any difference between the 2 ???) returns this [INFO] Configuration XML file loaded: G:\PROJECTS\sw - admin baert\source\Common \src\main\resources\hibernate.cfg.xml [INFO] Configuration Properties file loaded: G:\PROJECTS\sw - admin baert\source \Common\src\main\resources\database.properties [WARNING] 1 error(s) occurred while performing hbm2ddl. [WARNING] Error #1: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused: connect STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused: connect at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja va:156) at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:276) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2641) at com.mysql.jdbc.Connection.init(Connection.java:1531) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java :266) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:140) at org.hibernate.connection.DriverManagerConnectionProvider.getConnectio n(DriverManagerConnectionProvider.java:110) at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(Ma nagedProviderConnectionHelper.java:28) at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:178 ) at org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doSchemaExport (SchemaExportMojo.java:79) at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(H bm2DDLExporterMojo.java:56) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateE xporterMojo.java:59) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:534) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:488) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:140) 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:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585
hibernate3 plugin can't resolve maven-hibernate3-api
I'm trying to use the hibernate3-maven-plugin from codehaus with maven 2.0.4. I keep getting stuck with the following error regarding hibernate3-api and hibernate3-jdk I don't understand why the dependencies are missing The . Any help is a appreciated. Missing: -- 1) org.codehaus.mojo.hibernate3:maven-hibernate3-api:jar:1.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.codehaus.mojo.hibernate3 -DartifactId=maven-hibernate3-api \ -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060825.145135-3 2) org.codehaus.mojo.hibernate3:maven-hibernate3-api:jar:1.0-SNAPSHOT 2) org.codehaus.mojo.hibernate3:maven-hibernate3-jdk15:jar:1.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.codehaus.mojo.hibernate3 -DartifactId=maven-hibernate3-jdk15 \ -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060825.145135-3 2) org.codehaus.mojo.hibernate3:maven-hibernate3-jdk15:jar:1.0-SNAPSHOT -- Here's my plugin def: groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version1.0-SNAPSHOT/version executions execution goals goalhbm2ddl/goal /goals phaseprocess-resources/phase configuration hibernate configurationFilesrc/main/webapp/WEB-INF/classes/hibernate.cfg.xml/configurationFile /hibernate outputDirectory /outputDirectory /configuration /execution /executions /plugin I have this as one of my plugin repo defs pluginRepository idcodehaus.plugin.snapshots/id urlhttp://snapshots.maven.codehaus.org/maven2//url snapshots enabledtrue/enabled /snapshots releases enabledtrue/enabled /releases /pluginRepository -- View this message in context: http://www.nabble.com/hibernate3-plugin-can%27t-resolve-maven-hibernate3-api-tf2236295.html#a6200670 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hibernate3 plugin can't resolve maven-hibernate3-api
I'd copy that Codehaus pluginRepo as a regular repository and see if that fixed it. Try mvn -U to update your plugins. Also try mvn -X to get full debug log, and make sure Maven is looking at the Codehaus repo for those deps. Wayne On 9/7/06, SkipWalker [EMAIL PROTECTED] wrote: I'm trying to use the hibernate3-maven-plugin from codehaus with maven 2.0.4. I keep getting stuck with the following error regarding hibernate3-api and hibernate3-jdk I don't understand why the dependencies are missing The . Any help is a appreciated. Missing: -- 1) org.codehaus.mojo.hibernate3:maven-hibernate3-api:jar:1.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.codehaus.mojo.hibernate3 -DartifactId=maven-hibernate3-api \ -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060825.145135-3 2) org.codehaus.mojo.hibernate3:maven-hibernate3-api:jar:1.0-SNAPSHOT 2) org.codehaus.mojo.hibernate3:maven-hibernate3-jdk15:jar:1.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.codehaus.mojo.hibernate3 -DartifactId=maven-hibernate3-jdk15 \ -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060825.145135-3 2) org.codehaus.mojo.hibernate3:maven-hibernate3-jdk15:jar:1.0-SNAPSHOT -- Here's my plugin def: groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version1.0-SNAPSHOT/version executions execution goals goalhbm2ddl/goal /goals phaseprocess-resources/phase configuration hibernate configurationFilesrc/main/webapp/WEB-INF/classes/hibernate.cfg.xml/configurationFile /hibernate outputDirectory /outputDirectory /configuration /execution /executions /plugin I have this as one of my plugin repo defs pluginRepository idcodehaus.plugin.snapshots/id urlhttp://snapshots.maven.codehaus.org/maven2//url snapshots enabledtrue/enabled /snapshots releases enabledtrue/enabled /releases /pluginRepository -- View this message in context: http://www.nabble.com/hibernate3-plugin-can%27t-resolve-maven-hibernate3-api-tf2236295.html#a6200670 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: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file
Lakshman, Thanks for the response. My Category.hbm.xml was not in the src/main/resources directory, but I have moved it there to now avail. I am running mvn clean generate-sources to execute the build. Attempting a mvn clean resources:resources hibernate3:hbm2java yields the same error/stack trace as I included in the original posting. Any other suggestions? This seems like a simple problem, but it has cause great delay for me. Very annoying! Bryan
RE: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file
Hi Bryan, When you execute mvn clean resources:resources does your hibernate.cfg.xml file get copied into target/classes ? Thanks Lakshman -Original Message- From: Bryan Woodcox [mailto:[EMAIL PROTECTED] Sent: Tuesday, 22 August 2006 2:10 PM To: users@maven.apache.org Subject: RE: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file Lakshman, Thanks for the response. My Category.hbm.xml was not in the src/main/resources directory, but I have moved it there to now avail. I am running mvn clean generate-sources to execute the build. Attempting a mvn clean resources:resources hibernate3:hbm2java yields the same error/stack trace as I included in the original posting. Any other suggestions? This seems like a simple problem, but it has cause great delay for me. Very annoying! Bryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file
Lakshman- Hey thanks for your help. I was able to get it working by running a mvn clean resources:resources generate-sources. Thanks again! Bryan -Original Message- From: Lakshman Srilakshmanan [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 22, 2006 5:34 PM To: Maven Users List Subject: RE: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file Hi Bryan, When you execute mvn clean resources:resources does your hibernate.cfg.xml file get copied into target/classes ? Thanks Lakshman -Original Message- From: Bryan Woodcox [mailto:[EMAIL PROTECTED] Sent: Tuesday, 22 August 2006 2:10 PM To: users@maven.apache.org Subject: RE: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file Lakshman, Thanks for the response. My Category.hbm.xml was not in the src/main/resources directory, but I have moved it there to now avail. I am running mvn clean generate-sources to execute the build. Attempting a mvn clean resources:resources hibernate3:hbm2java yields the same error/stack trace as I included in the original posting. Any other suggestions? This seems like a simple problem, but it has cause great delay for me. Very annoying! Bryan - 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: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file
Hi Bryan, I am asking the obvious, but do you have your hibernate.cfg.xml and CategoryImpl.hbm.xml in src/main/resources. Secondly, are you executing mvn clean resources:resources hibernate3:hbm2java Thanks Lakshman -Original Message- From: Bryan Woodcox [mailto:[EMAIL PROTECTED] Sent: Sunday, 20 August 2006 6:47 AM To: users@maven.apache.org Subject: Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file I am using the hibernate3 plugin for maven2. When I attempt to generate my POJO's from my hbm files I get the following error. [INFO] Preparing hibernate3:hbm2java [WARNING] Removing: hbm2java from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [hibernate3:hbm2java {execution: hbm2java}] Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment clinit INFO: Hibernate 3.2 cr2 Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment clinit INFO: hibernate.properties not found Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment buildBytecodeProvider INFO: Bytecode provider name : cglib Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment clinit INFO: using JDK 1.4 java.sql.Timestamp handling Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Configuration configure INFO: configuring from file: hibernate.cfg.xml Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Configuration addResource INFO: Reading mappings from resource: CategoryImpl.hbm.xml [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Resource: CategoryImpl.hbm.xml not found [INFO] [INFO] Trace org.hibernate.MappingException: Resource: CategoryImpl.hbm.xml not found at org.hibernate.cfg.Configuration.addResource(Configuration.java:512) at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(Annotation Conf iguration.java:348) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1 474) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1453) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1427) . . . My configuration is as follows. Hibernate.cfg.xml ?xml version='1.0' encoding='utf-8'? !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate Configuration DTD//EN http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd; hibernate-configuration !-- a SessionFactory instance -- session-factory name=hibernate_session !-- begin: properties -- property name=connection.driver_classcom.mysql.jdbc.Driver/property property name=connection.urljdbc:mysql://localhost:3306/wcs/property property name=connection.usernameroot/property property name=connection.passwordxxx/property property name=dialectorg.hibernate.dialect.MySQLDialect/property property name=show_sqlfalse/property !-- end: properties -- mapping resource=CategoryImpl.hbm.xml/ mapping resource=src/main/domain/AddressFormatImpl.hbm.xml/ mapping resource=src/main/domain/AddressImpl.hbm.xml/ /session-factory /hibernate-configuration Pom.xml excerpt build resources resource directorysrc/main/resources/directory filteringtrue/filtering /resource resource directorysrc/main/domain/directory filteringtrue/filtering /resource /resources extensions extension groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.0.2/version /extension /extensions 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 version1.0-SNAPSHOT/version executions execution idhbm2java/id phasegenerate-sources/phase goals goalhbm2java/goal /goals configuration hibernate configurationFilesrc/main/resources/hibernate.cfg.xml/configurationFi le /hibernate outputDirectory hbm2javasrc/main/java/hbm2java /outputDirectory /configuration /execution I am using hibernate-tools-3.2.0.beta6a with hibernate-3.2.0rc2. I
Hibernate3 plugin cannot find resource specified in hibernate.cfg.xml file
I am using the hibernate3 plugin for maven2. When I attempt to generate my POJO's from my hbm files I get the following error. [INFO] Preparing hibernate3:hbm2java [WARNING] Removing: hbm2java from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [hibernate3:hbm2java {execution: hbm2java}] Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment clinit INFO: Hibernate 3.2 cr2 Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment clinit INFO: hibernate.properties not found Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment buildBytecodeProvider INFO: Bytecode provider name : cglib Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Environment clinit INFO: using JDK 1.4 java.sql.Timestamp handling Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Configuration configure INFO: configuring from file: hibernate.cfg.xml Aug 19, 2006 2:30:59 PM org.hibernate.cfg.Configuration addResource INFO: Reading mappings from resource: CategoryImpl.hbm.xml [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Resource: CategoryImpl.hbm.xml not found [INFO] [INFO] Trace org.hibernate.MappingException: Resource: CategoryImpl.hbm.xml not found at org.hibernate.cfg.Configuration.addResource(Configuration.java:512) at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConf iguration.java:348) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1474) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1453) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1427) . . . My configuration is as follows. Hibernate.cfg.xml ?xml version='1.0' encoding='utf-8'? !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate Configuration DTD//EN http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd; hibernate-configuration !-- a SessionFactory instance -- session-factory name=hibernate_session !-- begin: properties -- property name=connection.driver_classcom.mysql.jdbc.Driver/property property name=connection.urljdbc:mysql://localhost:3306/wcs/property property name=connection.usernameroot/property property name=connection.passwordxxx/property property name=dialectorg.hibernate.dialect.MySQLDialect/property property name=show_sqlfalse/property !-- end: properties -- mapping resource=CategoryImpl.hbm.xml/ mapping resource=src/main/domain/AddressFormatImpl.hbm.xml/ mapping resource=src/main/domain/AddressImpl.hbm.xml/ /session-factory /hibernate-configuration Pom.xml excerpt build resources resource directorysrc/main/resources/directory filteringtrue/filtering /resource resource directorysrc/main/domain/directory filteringtrue/filtering /resource /resources extensions extension groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.0.2/version /extension /extensions 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 version1.0-SNAPSHOT/version executions execution idhbm2java/id phasegenerate-sources/phase goals goalhbm2java/goal /goals configuration hibernate configurationFilesrc/main/resources/hibernate.cfg.xml/configurationFile /hibernate outputDirectory hbm2javasrc/main/java/hbm2java /outputDirectory /configuration /execution I am using hibernate-tools-3.2.0.beta6a with hibernate-3.2.0rc2. I have also tried hibernate-tools-3.1.0beta4 with hibernate-3.1.2 with the same problem. Futhermore, I have attempted to change the path to the hbm files, to no avail. This should be an easy thing to do, but every combination I try fails with the same error. Any assistance would be welcomed. thanks
Re: Problem hibernate3 plugin cfg2cfgxml
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
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
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
-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
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: Sun Licensing Feedback (was: RE: wither the hibernate3 plugin?)
Actually I've been working on getting these Jars uploaded into ibiblio by way of Project Glassfish. I've had some conversations with people from Sun on the Glassfish dev list recently and just opened an RFE on their bug tracker for this issue. They would like to satisfy this request but are focusing on delivering a stable release right now and so this create Maven bundles of Glassfish artifacts is going to stay on the back-burner for a short while. But it is definitely on their list of things to do. Go vote on the bug, or add a comment. ;-) https://glassfish.dev.java.net/issues/show_bug.cgi?id=489 Wayne On 3/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Wayne, What email address did you use to provide feedback to Sun? I'd like to do the same and I'm probably not the only one. Thanks, Brian -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 3:33 PM To: Maven Users List Subject: Re: wither the hibernate3 plugin? We're all frustrated by issues like this. Call or email Sun and complain... Ask them to publish Jars (source, binary javadocs) like this under a license which more freely allows distribution so they can be included in ibiblio. There's really no good reason why APIs can't be published under a pretty open license, in my opinion... Wayne On 3/27/06, Johann Reyes [EMAIL PROTECTED] wrote: For licensing issues, it can not be included in ibiblio. You can download it from here: http://prdownloads.sourceforge.net/hibernate/hibernate-annotations-3.1be ta8. zip?download Just rename the ejb-persistence.jar to ejb-3.0-public-draft-20060118.jar Regards Johann Reyes -Original Message- From: Peter L. Berghold [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 3:03 PM To: Johann Reyes Cc: 'Maven Users List' Subject: Re: wither the hibernate3 plugin? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Johann Reyes wrote: the pluginRepositories format should be like the following: That solved the immediate problem and now I've careened into the next problem. required artifacts missing: javax.persistence:ejb:jar:3.0-public-draft-20060118 for the artifact: org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060323.21 2212-5 I took a look in the various repositories that I know of and once again I don't see the jar file that I'm looking for. OK: I've solved this problem once with javax.transaction.jta and installed the jar file from Scum Microsystems and that's hunky dory now. I'm looking around for a download for this now and can't find anything but the JDK which I've already downloaded and I'm not seeing a jar file there either. Maddening... - -- 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 iD8DBQFEKEUCUM9/01RIhaARAjyQAKCBniqTooqJ7jwtWwxs77PVEvmltwCeIBxN EvwnZ7CZjQiJZPR96PFWPdo= =8Oq0 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wither the hibernate3 plugin?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Over on MOJO I see a reference to a hibernate3 plugin. So following instructions I put the following in my POM: repositories repository idMaven Snapshots/id urlhttp://snapshots.maven.codehaus.org/maven2//url snapshots enabledtrue/enabled /snapshots releases enabledfalse/enabled /releases /repository /repositories pluginRepositories pluginRepository idMaven Snapshots/id urlhttp://snapshots.maven.codehaus.org/maven2//url snapshots enabledtrue/enabled /snapshots releases enabledfalse/enabled /releases /pluginRepository /pluginRepositories and as well in one of my modules I have: build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId configuration config/src/main/resources/net/berghold/hbm/hibernate.cfg.xml/config /configuration /plugin /plugins /build So far.. so good... right? I run mvn hibernate3:hbm2java as intended and I get [INFO] The plugin 'org.codehaus.mojo:hibernate3-maven-plugin' does not exist or no valid version could be found OK.. so I point my browser to where I think the plugin should be http://snapshots.maven.codehaus.org/maven2//maven2/org/apache/maven/plugins and lo and behold, maven isn't lying to me, it ain't there. So... where did it go? - -- 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 iD8DBQFEKDgBUM9/01RIhaARAi5RAKC/qfttyCr16J5FEZpwv/ip+u7AyQCgrOVm nTI6jXzYYWI0edks29NDGRE= =pbIJ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: wither the hibernate3 plugin?
Hey Peter, I think you looked in the wrong place. This would be the correct URL: http://snapshots.maven.codehaus.org/maven2/org/codehaus/mojo/hibernate3- maven-plugin/ Brian -Original Message- From: Peter L. Berghold [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 2:08 PM To: Maven Users List Subject: wither the hibernate3 plugin? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Over on MOJO I see a reference to a hibernate3 plugin. So following instructions I put the following in my POM: repositories repository idMaven Snapshots/id urlhttp://snapshots.maven.codehaus.org/maven2//url snapshots enabledtrue/enabled /snapshots releases enabledfalse/enabled /releases /repository /repositories pluginRepositories pluginRepository idMaven Snapshots/id urlhttp://snapshots.maven.codehaus.org/maven2//url snapshots enabledtrue/enabled /snapshots releases enabledfalse/enabled /releases /pluginRepository /pluginRepositories and as well in one of my modules I have: build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId configuration config/src/main/resources/net/berghold/hbm/hibernate.cfg.xml/config /configuration /plugin /plugins /build So far.. so good... right? I run mvn hibernate3:hbm2java as intended and I get [INFO] The plugin 'org.codehaus.mojo:hibernate3-maven-plugin' does not exist or no valid version could be found OK.. so I point my browser to where I think the plugin should be http://snapshots.maven.codehaus.org/maven2//maven2/org/apache/maven/plug ins and lo and behold, maven isn't lying to me, it ain't there. So... where did it go? - -- 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 iD8DBQFEKDgBUM9/01RIhaARAi5RAKC/qfttyCr16J5FEZpwv/ip+u7AyQCgrOVm nTI6jXzYYWI0edks29NDGRE= =pbIJ -END PGP SIGNATURE- Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wither the hibernate3 plugin?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: Hey Peter, I think you looked in the wrong place. This would be the correct URL: http://snapshots.maven.codehaus.org/maven2/org/codehaus/mojo/hibernate3- maven-plugin/ OK... but why the error? - -- 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 iD8DBQFEKD6oUM9/01RIhaARAoUKAJ47OW3BLgkfYr66pVBGuOMwXBOUSQCaArGW y0S5NEr0tY0PL4e+xtUGhZc= =PI6B -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: wither the hibernate3 plugin?
As per the documentation found here: http://maven.apache.org/guides/development/guide-testing-development-plugins .html the pluginRepositories format should be like the following: pluginRepositories pluginRepository idsnapshots/id urlhttp://snapshots.maven.codehaus.org/maven2/url /pluginRepository /pluginRepositories Regards Johann Reyes -Original Message- From: Peter L. Berghold [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 2:36 PM To: [EMAIL PROTECTED] Cc: users@maven.apache.org Subject: Re: wither the hibernate3 plugin? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: Hey Peter, I think you looked in the wrong place. This would be the correct URL: http://snapshots.maven.codehaus.org/maven2/org/codehaus/mojo/hibernate3- maven-plugin/ OK... but why the error? - -- 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 iD8DBQFEKD6oUM9/01RIhaARAoUKAJ47OW3BLgkfYr66pVBGuOMwXBOUSQCaArGW y0S5NEr0tY0PL4e+xtUGhZc= =PI6B -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wither the hibernate3 plugin?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Johann Reyes wrote: the pluginRepositories format should be like the following: That solved the immediate problem and now I've careened into the next problem. required artifacts missing: javax.persistence:ejb:jar:3.0-public-draft-20060118 for the artifact: org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060323.212212-5 I took a look in the various repositories that I know of and once again I don't see the jar file that I'm looking for. OK: I've solved this problem once with javax.transaction.jta and installed the jar file from Scum Microsystems and that's hunky dory now. I'm looking around for a download for this now and can't find anything but the JDK which I've already downloaded and I'm not seeing a jar file there either. Maddening... - -- 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 iD8DBQFEKEUCUM9/01RIhaARAjyQAKCBniqTooqJ7jwtWwxs77PVEvmltwCeIBxN EvwnZ7CZjQiJZPR96PFWPdo= =8Oq0 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: wither the hibernate3 plugin?
For licensing issues, it can not be included in ibiblio. You can download it from here: http://prdownloads.sourceforge.net/hibernate/hibernate-annotations-3.1beta8. zip?download Just rename the ejb-persistence.jar to ejb-3.0-public-draft-20060118.jar Regards Johann Reyes -Original Message- From: Peter L. Berghold [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 3:03 PM To: Johann Reyes Cc: 'Maven Users List' Subject: Re: wither the hibernate3 plugin? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Johann Reyes wrote: the pluginRepositories format should be like the following: That solved the immediate problem and now I've careened into the next problem. required artifacts missing: javax.persistence:ejb:jar:3.0-public-draft-20060118 for the artifact: org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060323.212212-5 I took a look in the various repositories that I know of and once again I don't see the jar file that I'm looking for. OK: I've solved this problem once with javax.transaction.jta and installed the jar file from Scum Microsystems and that's hunky dory now. I'm looking around for a download for this now and can't find anything but the JDK which I've already downloaded and I'm not seeing a jar file there either. Maddening... - -- 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 iD8DBQFEKEUCUM9/01RIhaARAjyQAKCBniqTooqJ7jwtWwxs77PVEvmltwCeIBxN EvwnZ7CZjQiJZPR96PFWPdo= =8Oq0 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wither the hibernate3 plugin?
We're all frustrated by issues like this. Call or email Sun and complain... Ask them to publish Jars (source, binary javadocs) like this under a license which more freely allows distribution so they can be included in ibiblio. There's really no good reason why APIs can't be published under a pretty open license, in my opinion... Wayne On 3/27/06, Johann Reyes [EMAIL PROTECTED] wrote: For licensing issues, it can not be included in ibiblio. You can download it from here: http://prdownloads.sourceforge.net/hibernate/hibernate-annotations-3.1beta8. zip?download Just rename the ejb-persistence.jar to ejb-3.0-public-draft-20060118.jar Regards Johann Reyes -Original Message- From: Peter L. Berghold [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 3:03 PM To: Johann Reyes Cc: 'Maven Users List' Subject: Re: wither the hibernate3 plugin? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Johann Reyes wrote: the pluginRepositories format should be like the following: That solved the immediate problem and now I've careened into the next problem. required artifacts missing: javax.persistence:ejb:jar:3.0-public-draft-20060118 for the artifact: org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060323.212212-5 I took a look in the various repositories that I know of and once again I don't see the jar file that I'm looking for. OK: I've solved this problem once with javax.transaction.jta and installed the jar file from Scum Microsystems and that's hunky dory now. I'm looking around for a download for this now and can't find anything but the JDK which I've already downloaded and I'm not seeing a jar file there either. Maddening... - -- 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 iD8DBQFEKEUCUM9/01RIhaARAjyQAKCBniqTooqJ7jwtWwxs77PVEvmltwCeIBxN EvwnZ7CZjQiJZPR96PFWPdo= =8Oq0 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sun Licensing Feedback (was: RE: wither the hibernate3 plugin?)
Wayne, What email address did you use to provide feedback to Sun? I'd like to do the same and I'm probably not the only one. Thanks, Brian -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 3:33 PM To: Maven Users List Subject: Re: wither the hibernate3 plugin? We're all frustrated by issues like this. Call or email Sun and complain... Ask them to publish Jars (source, binary javadocs) like this under a license which more freely allows distribution so they can be included in ibiblio. There's really no good reason why APIs can't be published under a pretty open license, in my opinion... Wayne On 3/27/06, Johann Reyes [EMAIL PROTECTED] wrote: For licensing issues, it can not be included in ibiblio. You can download it from here: http://prdownloads.sourceforge.net/hibernate/hibernate-annotations-3.1be ta8. zip?download Just rename the ejb-persistence.jar to ejb-3.0-public-draft-20060118.jar Regards Johann Reyes -Original Message- From: Peter L. Berghold [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 3:03 PM To: Johann Reyes Cc: 'Maven Users List' Subject: Re: wither the hibernate3 plugin? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Johann Reyes wrote: the pluginRepositories format should be like the following: That solved the immediate problem and now I've careened into the next problem. required artifacts missing: javax.persistence:ejb:jar:3.0-public-draft-20060118 for the artifact: org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060323.21 2212-5 I took a look in the various repositories that I know of and once again I don't see the jar file that I'm looking for. OK: I've solved this problem once with javax.transaction.jta and installed the jar file from Scum Microsystems and that's hunky dory now. I'm looking around for a download for this now and can't find anything but the JDK which I've already downloaded and I'm not seeing a jar file there either. Maddening... - -- 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 iD8DBQFEKEUCUM9/01RIhaARAjyQAKCBniqTooqJ7jwtWwxs77PVEvmltwCeIBxN EvwnZ7CZjQiJZPR96PFWPdo= =8Oq0 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem hibernate3 plugin cfg2cfgxml
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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]
RE: Problem hibernate3 plugin cfg2cfgxml
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
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]
Re: hibernate3 plugin
A site that describes goals and documents the plugin would be most usefull. Srgjan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hibernate3 plugin
06-02-13, Michal Palička [EMAIL PROTECTED] napisał(a): the Hibernate3 plugin can be found at the mojo-sandbox. Hi, (Since it's the users mailing list I hope such irritating questions are acceptable ;)) What's the difference between the Hibernate3 plugin hosted at the mojo-sandbox and the XDoclet2 Hibernate plugin for Maven2? Michal Palicka Jacek -- Jacek Laskowski http://www.laskowski.org.pl
RE: hibernate3 plugin
Hello Michal The main difference is that while the hibernate3-maven-plugin is based on hibernate-tools (http://www.hibernate.org/hib_docs/tools/reference/en/html/ant.html) and can do more tasks like create a database schema base in your POJOs or generate a database documentation (kind of javadoc) also based in your POJOS Regards Johann Reyes -Original Message- From: Jacek Laskowski [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 15, 2006 2:03 AM To: Maven Users List Subject: Re: hibernate3 plugin 06-02-13, Michal Palička [EMAIL PROTECTED] napisał(a): the Hibernate3 plugin can be found at the mojo-sandbox. Hi, (Since it's the users mailing list I hope such irritating questionsare acceptable ;)) What's the difference between the Hibernate3 plugin hosted at themojo-sandbox and the XDoclet2 Hibernate plugin for Maven2? Michal Palicka Jacek --Jacek Laskowskihttp://www.laskowski.org.pl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: hibernate3 plugin
Hello, the Hibernate3 plugin can be found at the mojo-sandbox. http://mojo.codehaus.org/faq.html#what-is-the-sandbox I am not sure whether it supports Maven 1.x. You'll have to build it from the source. The source can be downloaded from a public SVN repository. Regards Michal Palicka -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Saturday, February 11, 2006 2:17 PM To: Maven Users List Subject: hibernate3 plugin hello all, i m currently using Maven 1.1, and i need to download hibernate3-maven-plugin can anyone tell me where i can downlod it, and which version? thanks in advance and regards marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hibernate3 plugin
I think all mojo plugins will work on Maven 2 only. -allan Michal Palička wrote: Hello, the Hibernate3 plugin can be found at the mojo-sandbox. http://mojo.codehaus.org/faq.html#what-is-the-sandbox I am not sure whether it supports Maven 1.x. You'll have to build it from the source. The source can be downloaded from a public SVN repository. Regards Michal Palicka -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Saturday, February 11, 2006 2:17 PM To: Maven Users List Subject: hibernate3 plugin hello all, i m currently using Maven 1.1, and i need to download hibernate3-maven-plugin can anyone tell me where i can downlod it, and which version? thanks in advance and regards marco - 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]
hibernate3 plugin
hello all, i m currently using Maven 1.1, and i need to download hibernate3-maven-plugin can anyone tell me where i can downlod it, and which version? thanks in advance and regards marco
m2 , xdoclet2 , hibernate3 plugin with 1.5 generic collections WORKS
Works now fine after manually figuring out and installing dependencies ! after downloading xdoclet2 from codehaus, adjust pom file build ... plugin groupIdxdoclet/groupId artifactIdmaven2-xdoclet2-plugin/artifactId version2.0.5-SNAPSHOT/version configuration configs config pluginorg.xdoclet.plugin.hibernate.HibernateMappingPlugin/plugin params destdir${project.build.outputDirectory}/destdir /params /config /configs /configuration dependencies dependency groupIdxdoclet-plugins/groupId artifactIdxdoclet-plugin-web/artifactId version1.0.4-SNAPSHOT/version /dependency dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.4/version /dependency dependency groupIdjavax.servlet/groupId artifactIdjsp-api/artifactId version2.0/version /dependency /dependencies executions execution phasegenerate-sources/phase goals goalxdoclet/goal /goals /execution /executions /plugin __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: m2 , xdoclet2 , hibernate3 plugin with 1.5 generic collections WORKS
Tony, Works now fine after manually figuring out and installing dependencies ! after downloading xdoclet2 from codehaus, adjust pom file Look at my reply to your other post, and pointed to sample. You should not have to manually download and edit anything. It'll JUST WORK (TM) :-). Shash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fwd: Re: m2 , xdoclet2 , hibernate3 plugin with 1.5 generic collections WORKS
Shash, I've tried the 2 repositories to dist.codehaus.org (central and default) but with no effect... Tony --- Sasvata Chatterjee [EMAIL PROTECTED] wrote: Date: Fri, 27 Jan 2006 08:34:25 -0600 From: Sasvata Chatterjee [EMAIL PROTECTED] To: Maven Users List users@maven.apache.org Subject: Re: m2 , xdoclet2 , hibernate3 plugin with 1.5 generic collections WORKS Tony, Works now fine after manually figuring out and installing dependencies ! after downloading xdoclet2 from codehaus, adjust pom file Look at my reply to your other post, and pointed to sample. You should not have to manually download and edit anything. It'll JUST WORK (TM) :-). Shash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: m2 , xdoclet2 , hibernate3 plugin with 1.5 generic collections WORKS
Can you put this information on the wiki or in a JIRA issue requesting to enhance the documentation with this info? regards, Wim 2006/1/27, tony nys [EMAIL PROTECTED]: Works now fine after manually figuring out and installing dependencies ! after downloading xdoclet2 from codehaus, adjust pom file build ... plugin groupIdxdoclet/groupId artifactIdmaven2-xdoclet2-plugin/artifactId version2.0.5-SNAPSHOT/version configuration configs config pluginorg.xdoclet.plugin.hibernate.HibernateMappingPlugin/plugin params destdir${project.build.outputDirectory}/destdir /params /config /configs /configuration dependencies dependency groupIdxdoclet-plugins/groupId artifactIdxdoclet-plugin-web/artifactId version1.0.4-SNAPSHOT/version /dependency dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.4/version /dependency dependency groupIdjavax.servlet/groupId artifactIdjsp-api/artifactId version2.0/version /dependency /dependencies executions execution phasegenerate-sources/phase goals goalxdoclet/goal /goals /execution /executions /plugin __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]