This is more of a Hibernate problem than a Maven problem.

We use Hibernate and Spring and in the configuration file that includes the HibernateSessionFactory, the reference to the hibernate configuration file is specified as "classpath:hibernate.cfg.xml" since the configuration file is in another project that is a dependency of the project doing the reference.

I hope that this helps move your problem forward.

The whole bean is:

<bean id="hibernateSessionFactory" class="com.artifact_software.hibernate.session.alllazy.AllLazyFactoryBean" >
<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>

</property>
<property name="dataSource">
<ref bean="jdbcDataSource"/>
</property>
<property name="exposeTransactionAwareSessionFactory">
<value>true</value>
</property>
<property name="useTransactionAwareDataSource">
<value>true</value>
</property>

</bean>

Ron


On 24/04/2012 11:34 AM, nokha wrote:
Hi, I'm facing a problem when including a subproject as a dependency in the
POM of my project. Code is like the following:

<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";...>

   <modelVersion>4.0.0</modelVersion>
   <groupId>com.test</groupId>
   <artifactId>test1</artifactId>
   <version>1.0-SNAPSHOT</version>
   <packaging>war</packaging>

   <name>test1</name>
   <url>http://maven.apache.org</url>

   <dependencies>

     <dependency>
       <groupId>com.test</groupId>
       <artifactId>test2</artifactId>
       <version>1.0-SNAPSHOT</version>
     </dependency>

   </dependencies>
                
</project>

The problem is that test2 has hibernate mapping files, and currently when I
start the application in dev mode they are not being loaded.
Is there a trick for making project inclusion work?

Thanks!

--
View this message in context: 
http://maven.40175.n5.nabble.com/Including-Subprojects-as-jar-files-tp5662412p5662412.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to