[ http://jira.codehaus.org/browse/MSUREFIRE-144?page=comments#action_76994 ] Ronny Naess commented on MSUREFIRE-144: ---------------------------------------
I think this is a bug mentioned in many posts concerning classpath loading when running test. I have the same issues mentioned in a comment in http://jira.codehaus.org/browse/MSUREFIRE-115, possible others are http://jira.codehaus.org/browse/MSUREFIRE-161 and http://jira.codehaus.org/browse/MSUREFIRE-121. Maybe there are more. We have to skip testing in maven and rely on the developers testing in Eclipse before checking in to SCM. Risky buisiness but the tests breakes to often becase test resources only appare randomly in our classpath. > Depencencies get precedence over test sources in classpath > ---------------------------------------------------------- > > Key: MSUREFIRE-144 > URL: http://jira.codehaus.org/browse/MSUREFIRE-144 > Project: Maven 2.x Surefire Plugin > Issue Type: Bug > Affects Versions: 2.2 > Reporter: Gilles Scokart > Fix For: 2.3 > > > Here is a concrete example : > I write a plugin for cruisecontrol. The cruise control jar contains a > log4J.properties. I have placed a log4j.properties in my test ressources > directory (I alsoe tried to place it in the main ressource directory). > When I run the test in eclipse, my log4j.property is used. When I run it > from maven, it is the log4j.properties contained in cruisecontrol.jar that is > used. > When I modify the cruisecontrol jar store in my repositry to remove its > log4j.properties, the log4j.properties of the test ressource directory is > used. > I also made a test with a class instead of a property file. I have > re-written a class defined in my dependency (same name, same package) in my > test source directory. The result is the same. In eclipse my class is used, > in maven, it is the class present in the dependency that is used. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira