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:[email protected]]
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: [email protected]
For additional commands, e-mail: [email protected]