Hello all,

Recently I've encountered a problem with a Spring TestNG integration test,
it would successfully run from TestNG plugin, while it would fail when run
in maven. I've 
wrote<http://mail-archives.apache.org/mod_mbox/maven-users/200809.mbox/[EMAIL 
PROTECTED]>about
this to maven users list, but later I've found myself where the
problem was - test was referencing a resource (spring context) as classpath
resource which on the other hand was present but among test resources of
another module, of the same multimodule project. Module where the
integration test is, has dependency defined on that other module with
context file, but as the context file is in test resources of the referenced
module, it should not be in the classpath of the referencing module. So, my
conclusion is that m2eclipse plugin has a bug (wrongly added dependant
module test resources to the classpath to the depending module) which made
that resource available as classpath resource to the test when it is run
from the TestNG eclipse plugin. Other, in my opinion, less likely
possibility is that the TestNG eclipse plugin (or maybe even Spring
context/resource loader) has a bug so it is able to access non classpath
resources as classpath resources.

I'd appreciate if someone from m2eclipse development team can check this
out, and if it is a bug, please fix it.

Regards,
Stevo.

Reply via email to