I recently added c3p0 and now when I use Maven to generate the schema I am getting class not found.
It works fine if I remove the c3p0 config form hibernate.cfg.xml
when I run
mvn hibernate3:hbm2ddl
i get
java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/PoolConfig
Must be a classpath issue, but I have c3p0 as a dependency in the pom.xml.
When I run the app itself all seems fine.
Is there a way to tell the hibernate3-maven-plugin about a classpath, or a dependency?
Here is my plugin config
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>postgresql</implementation>
</component>
<component>
<name>hbm2hbmxml</name>
<outputDirectory>src/main/resources</outputDirectory>
</component>
</components>
<componentProperties>
<drop>true</drop>
<jdk5>true</jdk5>
<implementation>annotationconfiguration</implementation>
<configurationfile>/src/main/resources/hibernate.cfg.xml</configurationfile>
<outputfilename>schema.sql</outputfilename>
</componentProperties>
</configuration>
</plugin>
</plugins>
Here is my dependency, I have the c3p0 version in a top level pom.
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
</dependency>
Thanks in advance
BobBobBob
|