<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>
jpaconfiguration
</implementation>
</component>
</components>
<componentProperties>
<drop>true</drop>
<jdk5>true</jdk5>
<outputfilename>schema.ddl</outputfilename>
<persistenceunit>Developer</persistenceunit>
<propertyfile>target/classes/jdbc.properties</propertyfile>
<skip>${maven.test.skip}</skip>
</componentProperties>
</configuration>
<dependencies>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.7</version>
</dependency>
</dependencies>
</plugin>
Canyon Narrows, Amargosa Range
3 hours ago
5 comments:
where does your persistence.xml live? i keep mine in src/main/resources but it keeps complaining about not finding one in META-INF/persistence.xml
:(
/src/main/resources/META-INF/persistence.xml
that did the trick. :)
thank you very much. finally it does what i wanted. The hibernate.property file is important to provide connection details. mine looks like this:
hibernate.connection.username=user
hibernate.connection.password=pwd
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
hibernate.connection.url=jdbc\:mysql\://localhost/MyDatabase
This plugin is really difficult to configure, and this blog helped me a lot. Thanks!
Post a Comment