maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tournié Jean-Michel <jean-michel.tour...@dlconsultant.fr>
Subject [m2] JUnit test using files, with multiple modules
Date Wed, 15 Jun 2005 09:11:38 GMT
Hello all,

 

I have a problem using m2, when I execute a JUnit test who loads a
configuration file, in a multiple modules project.

 

My project structure is :

 

my-app

  +- pom.xml

  +- my-module1

     +- pom.xml

     +- src

     +- config-test

         +- my-file.txt -----> This file is load by test classes, by name
“config-test/my-file.txt”

 

 

When I run the command “m2 test” from “my-module1” directory, tests are OK.

When I run the command “m2 test” from “my-app” directory, tests FAILED
because test classes don’t found “config-test/my-file.txt”. The base dir is
“my-app”, not “my-app/my-module1”.

 

How can I solve my problem?

 

 

Thanks,

Jean-Michel 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message