Hi,
i have the following constellation: I have a class Feature.java and a
class MapData.java in my folder src/main/java. The Feature contains
some work to do, and the MapData is contains a HashMap which is
populated with data from a database and their methods are called in
Feature. Now i want to write unit tests for my class Feature, but i
don't want to start a database connection if the MapData is called. So
i thought about creating a class MapData in my folder src/test/java,
which contains all methods like my real MapData, but with test data in
it.
If i call "mvn test", i get some strange errors, like
NoSuchMethodErrors etc. If i exclude the src/main/java/MapData in my
Eclipse Build Path, then the tests run fine.

I have now 2 questions:
1. Why does Maven consider my Eclipse build path? I thought, if i run
maven from my command line, only the pom.xml applies.
2. How can i solve my problem? Is there a possibility to exclude my
src/main/java/MapData in my pom, with the surefire plugin?

Thank you for your suggestions,

Manuel

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

Reply via email to