I've found that the Hibernate3 Plugin requires I have a
hibernate.cfg.xml, rather than definining my annotated classes in
Spring. Is that still true with the 2.0-SNAPSHOT?
My configuration currently is:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>annotationconfiguration</implementation>
</component>
</components>
<componentProperties>
<jdk5>true</jdk5>
<propertyfile>/target/test-classes/jdbc.properties</propertyfile>
</componentProperties>
</configuration>
<executions>
<execution>
<phase>test-compile</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>${jdbc.groupId}</groupId>
<artifactId>${jdbc.artifactId}</artifactId>
<version>${jdbc.version}</version>
</dependency>
</dependencies>
</plugin>
Where my Spring sessionFactory is:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configLocation" value="classpath:hibernate.cfg.xml"/>
<property name="hibernateProperties">
<value>
hibernate.dialect=${hibernate.dialect}
hibernate.hbm2ddl.auto=update
hibernate.query.substitutions=true 'Y', false 'N'
</value>
</property>
</bean>
Thanks,
Matt
--
http://raibledesigns.com
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email