maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Chaudhuri" <nchaudh...@potomacfusion.com>
Subject RE: Hibernate 3 Plugin
Date Thu, 13 Aug 2009 21:53:33 GMT
With Karl's suggestion, I changed my plugin definition as follows:

<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>hibernate3-maven-plugin</artifactId>
                <version>2.2</version>
                <executions>
                    <execution>
                        <id>hbm2ddl</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>hbm2ddl</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <components>
                        <component>
                            <name>hbm2ddl</name>
                            <implementation>jpaconfiguration</implementation>
                        </component>
                    </components>
                    <componentProperties>
                        <create>true</create>
                        <drop>false</drop>
                        <export>false</export>
                        <configurationfile>${basedir}/src/main/resources/persistence.xml</configurationfile>
                        <persistenceunit>myapp</persistenceunit>
                        <outputfilename>myapp.sql</outputfilename>
                        <format>true</format>
                    </componentProperties>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.oracle.jdbc</groupId>
                        <artifactId>ojdbc6</artifactId>
                        <version>11.1.0.7.0</version>
                    </dependency>
                </dependencies>
            </plugin>


Unfortunately, I am still getting the same error.  

I am wondering if this has to do with the fact I have a multi-module project.  This persistence
pom produces a jar packaging and is dependent on no other modules, but it does have a parent
pom that simply lists the modules and defines dependencies in common among modules like Spring.
 Should my plugin definition be at the parent level?

Thanks.


-----Original Message-----
From: Karl Heinz Marbaise [mailto:khmarbaise@gmx.de]
Sent: Thu 8/13/2009 4:09 PM
To: Maven Users List
Subject: Re: Hibernate 3 Plugin
 
Hi,

you haven't defined an execution for the PlugIN.

	<executions>
           <execution>
              <id>hbm2ddl</id>
              <phase>process-classes</phase>
              <goals>
                 <goal>hbm2ddl</goal>
              </goals>
           </execution>
        </executions>

>                     <componentProperties>
>                         <create>true</create>
>                         <drop>false</drop>
>                         <export>false</export>
>                         <configurationfile>/target/classes/persistence.xml</configurationfile>
In my opinion this should be changed...
to the given persistence.xml file...
> 
> Here is the persistence.xml founf in src/main/resources as well as target/classes:

<configurationfile>${basedir}/src/main/resources/persistence.xml</configurationfile>...


Kind regards
Karl Heinz Marbaise
-- 
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
Hauptstrasse 177                         USt.IdNr: DE191347579
52146 W├╝rselen                           http://www.soebes.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org





Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message