You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Je...@Alcatel.fr on 2005/11/23 17:35:26 UTC
[m2] hibernate unit test
Hello all,
I used to put hibernate.cfg.xml in target\test-classes with maven1
before running my unit tests.
With maven2 my unit tests are not working any more even if I put this
configuration file in target\test-classes.
Does anybody have an idea where to put this file when you run mvn test ?
Thank you
Re: [m2] hibernate unit test
Posted by Je...@Alcatel.fr.
Thanks for the info,
In fact I am trying to convert a working m1 project to m2, not easy !!
The mysql-connector was not downloaded properly to my local repository
and it was the problem.
Now, hibernate is running in my unit test, but I still have a problem to
use my dataset xml files for dbunit.
I always have an exception I didn't had with Maven1 :
org.xml.sax.SAXNotSupportedException: not supported setting property
http://xml.org/sax/properties/lexical-handler
Jean-Yves
Richard Wallace wrote:
> If you follow the best practices and have you directory structure like
>
> project/pom.xml
> project/src/main/java
> project/src/main/resources
> project/src/test/java
> project/src/test/resources
>
> Then just put it in project/src/test/resources and maven will copy the
> file to the test-classes directory before running any of the tests.
>
> Rich
>
> Jean-Yves.Lebleu@Alcatel.fr wrote:
>> Hello all,
>>
>> I used to put hibernate.cfg.xml in target\test-classes with maven1
>> before running my unit tests.
>>
>> With maven2 my unit tests are not working any more even if I put this
>> configuration file in target\test-classes.
>>
>> Does anybody have an idea where to put this file when you run mvn test ?
>>
>> Thank you
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> 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
>
>
Re: [m2] hibernate unit test
Posted by Richard Wallace <rw...@thewallacepack.net>.
If you follow the best practices and have you directory structure like
project/pom.xml
project/src/main/java
project/src/main/resources
project/src/test/java
project/src/test/resources
Then just put it in project/src/test/resources and maven will copy the
file to the test-classes directory before running any of the tests.
Rich
Jean-Yves.Lebleu@Alcatel.fr wrote:
> Hello all,
>
> I used to put hibernate.cfg.xml in target\test-classes with maven1
> before running my unit tests.
>
> With maven2 my unit tests are not working any more even if I put this
> configuration file in target\test-classes.
>
> Does anybody have an idea where to put this file when you run mvn test ?
>
> Thank you
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> 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