Author | Message |
---|---|
tonyg
Posts: 11
|
Posted 23:41 Feb 16, 2015 |
Has anyone received an error while compiling: org.springframework.test.context does not exist...cannot find symbol: class ContextConfiguration The error is thrown, but the classes are compiled anyway and the application runs. |
cysun
Posts: 2935
|
Posted 08:51 Feb 17, 2015 |
@ContextConfiguration is in the dependency spring-test. In your pom.xml the scope of spring-test is "test", which means this dependency is only used to compile and run test code. If you import anything from a test scope dependency in src/main, Maven build will fail as test scope dependencies are not included when compiling code under src/main. Eclipse doesn't have the notion of dependency scope so it'll compile everything. |