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>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
           <source>1.5</source>
           <target>1.5</target>
         </configuration>
       </plugin>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>hibernate3-maven-plugin</artifactId>
         <configuration>
           <ejb3>true</ejb3>
           <config>
             /target/hibernatetools/hibernate.cfg.xml
           </config>
           <jdk5>true</jdk5>
           <outputFile>
             target/hibernatetools/db-schema.sql
           </outputFile>
           <properties>
             /src/main/resources/hibernate.properties
           </properties>
         </configuration>
       </plugin>
     </plugins>

     <extensions>
       <extension>
         <groupId>oracle</groupId>
         <artifactId>jdbc</artifactId>
         <version>10.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]

Reply via email to