Hi Marco,

 

No problem. 

 

I had to download hibernate3 plugin from
http://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-hibernate3
and compile it locally before I could get it to work.

 

Besides the command I ran are

mvn clean resources:resources hibernate3:hbm2java 

mvn clean resources:resources hibernate3:schema-export

 

Hope it helps.

 

    <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>

                <version>1.0-SNAPSHOT</version>

                <executions>

                    <execution>

                        <configuration>

                            <hibernate>

 
<configurationFile>/src/main/resources/hibernate.cfg.xml</configurationF
ile>

                            </hibernate>

                            <outputDirectory>

 
<hbm2cfgxml>src/main/resources</hbm2cfgxml>

                                <!--
hbm2dll>target/hibernate3/sql</hbm2dll -->

                            </outputDirectory>

                            <outputFile>SMS.sql</outputFile>

                        </configuration>

                    </execution>

                </executions>

            </plugin>

        </plugins>

        <extensions>

            <extension>

                <groupId>jdbc.jtds</groupId>

                <artifactId>jtds</artifactId>

                <version>1.2</version>

<!--

                <groupId>hsqldb</groupId>

                <artifactId>hsqldb</artifactId>

                <version>1.8.0.4</version>

-->

            </extension>

        </extensions>

    </build>

 

 

 

Thanks

Lakshman

  _____  

From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
Sent: Monday, 21 August 2006 9:00 PM
To: Lakshman Srilakshmanan
Subject: Re: maven2 / hibernate3- schema-export

 

Hi Lakshman,
 thanx fo ryour reply......
my main problem is that i canont even get the schema-export goal to be
executed....... that is why i m little
lost..
would you mind sending me a copy of your <build> section of your pom.xml
(if it is not too confidential) so that i can try to get it at run, even
with errors?

thanks in advance and regards
 marco

PS if i'd run mvn install, i suppose the  schema-export goal should be
executed as part of the install.. am i correct? 

On 8/21/06, Lakshman Srilakshmanan
<[EMAIL PROTECTED]> wrote: 

Hi Marco,

As we don't know what problems you are having, I am taking a stab in the

dark.

Have you included the dependency jars
ie
      <dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate</artifactId>
          <version> 3.1.2</version>
      </dependency>

      <dependency>
          <groupId>hsqldb</groupId>
          <artifactId>hsqldb</artifactId>
          <version> 1.8.0.4 <http://1.8.0.4> </version>
      </dependency>


        <extensions>
            <extension>
                <groupId>hsqldb</groupId>
                <artifactId>hsqldb</artifactId> 
                <version>1.8.0.4</version>
            </extension>
        </extensions>

Have you also configured the driver and url in your hibernate.cfg.xml 

Thanks
Lakshman


> -----Original Message-----
> From: Marco Mistroni [mailto:[EMAIL PROTECTED]
> Sent: Monday, 21 August 2006 4:21 AM
> To: Maven Users List 
> Subject: maven2 / hibernate3- schema-export
>
> hi all
>   i am trying to generate a schema out of my hibernate classes but i
can't
> manage....
>
> i am trying first to generate hbm.xml files using xdoclet, and then i
am
> trying to generate a schema using hibernate3 plugin
>
> here's my pom.xml (only relevant part of build)
>
> <build>
>
>     <plugins> 
>       <plugin>
>          <artifactId>xdoclet-maven-plugin</artifactId>
>          <groupId>org.codehaus.mojo</groupId>
>          <executions>
>          <execution> 
>               <phase>generate-sources</phase>
>              <goals>
>                 <goal>xdoclet</goal>
>              </goals>
>              <configuration> 
>                 <tasks>
>                 <echo message="Generating HBM files from java source
to
> ${basedir}/src/main/resources"/>
>                 <hibernatedoclet 
destdir="${basedir}/src/main/resources/"
> excludedtags="@version,@author,@todo,@see,@desc"  verbose="true">
>                    <fileset dir="${basedir}/src/main/java" 
> includes="**/hibernate/*.java"/>
>                    <hibernate version="3.0" />
>                 </hibernatedoclet>
>                 </tasks>
>                     </configuration> 
>            </execution>
>           </executions>
>       </plugin>
>        <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
>                 <artifactId>hibernate3-maven-plugin</artifactId> 
>                 <version>1.0-SNAPSHOT</version>
>                 <configuration>
>                       <hibernate>
>
>
<configurationFile>/src/main/resources/hibernate.properties</configurati

onFile>
>                       </hibernate>
>                       <outputDirectory>
>                         <hbm2ddl>src/main/resources</hbm2ddl>
>                       </outputDirectory> 
>                 </configuration>
>         </plugin>
>      </plugins>
> </build>
>
>
> can anyone tell me what am i doing wrong??
>
> thanks in advance and regards 
>   Marco


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

 

Reply via email to