maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giovanni Azua" <brave...@swissonline.ch>
Subject RE: errors for hibernate test cases
Date Fri, 30 Nov 2007 23:02:20 GMT
Resolved!

I had the following entry in my pom.xml

<testResources>
 <testResource>
    <directory>src/test/resources</directory>
    <includes>	
	<include>log4j.xml</include>
    </includes>
 </testResource>
</testResources>

.. therefore it was excluding everything else, so got rid of this entry and
now it works fine.

Thanks!
Giovanni

> -----Original Message-----
> From: Giovanni Azua [mailto:bravegag@swissonline.ch] 
> Sent: Friday, November 30, 2007 11:17 PM
> To: 'Maven Users List'
> Subject: errors for hibernate test cases
> 
> hi,
> 
> I have a set of test cases that pass fine under Eclipse .. 
> but from Maven I get java.lang.NoClassDefFoundError when 
> running TestHibernateGenericReadOnlyDao and 
> TestHibernateGenericDao (see below).
> 
> My gut-feeling is that the auxiliary Fixture class Person 
> (not a TestCase and not Test* pattern) is being filtered out 
> by Maven during testing?
> 
> Also can not tell from the logs that Person.hbm.xml is being 
> picked up properly ... does it belong under 
> /src/test/java/<my packages>.../ ? or under 
> /src/test/resources/<my packages>.../ ?
> 
> If interested the sources are available for checkout from:
> http://perfectjpattern.svn.sourceforge.net/svnroot/perfectjpat
> tern/trunk/
> 
> TIA,
> regards,
> Giovanni
> 
> I have implemented a Generic Dao based on Hibernate and then 
> included under my test package:
> 
> trunk/
> - perfectjpattern-j2ee
> -- pom.xml
> -- src/
> --- test/
> ---- java/
> ----- perfectjpattern/
> ------ j2ee/
> ------- database/
> -------- dao/
> --------- hibernate/
> ---------- Person.java
> ---------- Person.hbm.xml
> ---------- TestHibernateGenericReadOnlyDao.java
> ---------- TestHibernateGenericDao.java
> ---- resources/
> ----- hibernate.cfg.xml
> ----- hsql.properties
> ----- hsql.script
> ----- log4j.xml
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message