I've tried searching around the web and these forums for a solution to my problem, but nothing is working out.
I have a seemingly not uncommon problem - my tests run successfully in Eclipse using "Run As > JUnit Test", but "maven clean test" produces failures and errors.
First, some setup info:
in my pom.xml dependenciesCode:Eclipse 3.6.2 Maven 2.2.1 Java 1.6.0_24
and my surefire config (the one that is closest to working, as measured by number of failures and errors)Code:<dependency> <groupId>org.junit</groupId> <artifactId>com.springsource.org.junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency>
and test classes are annotated thus:Code:<plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> <junitArtifactName>org.junit:com.springsource.org.junit</junitArtifactName> <testFailureIgnore>false</testFailureIgnore> </configuration> </plugin>
I've been trying for 2 days to figure out what's going on. Anyone have any ideas on what I can try? There's no extra versions of Spring or JUnit when I run "mvn dependency:tree", everything compiles fine, and I see logging output from the SpringJUnit4ClassRunner class, so it's being invoked (I have a log4j.properties in src/test/resources that sends all logging output to target/test.log).Code:@RunWith(SpringJUnit4ClassRunner.class) //ApplicationContext will be loaded from "classpath:/services/spring/sdk/service/TestServiceAspect-context.xml" @ContextConfiguration


Reply With Quote
