Hello Matt If your annotated classes are found in a dependency jar you can try this:
<componentProperties> <scan-jars>true</scan-jars> </componentProperties> Regards Johann Reyes PS also, Are you defining the annotated classes in hibernate.cfg.xml but in a included jar? -----Original Message----- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 20, 2006 8:43 PM To: [email protected] Subject: [mojo-user] Scanning JARs with Hibernate3 Maven Plugin 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.AnnotationSessionFactor yBean"> <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 --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
