Provided Library Dependency In Integration Tests

Ok, this is a little strange.  I have a JUnit integration test that load the Spring context before doing its test. One of the Spring beans uses a lass that has a dependency to javax.servlet.Filter.

I'm running IDEA 10.0.2 Ultimate on my desktop workstation and notebook. On both machines, the web module has a dependency to the Tomcat 6 server librray marked as Provided.

On the desktop, the integration test runs fine.  On the notebook, the test errors out with a Spring context loading error indicating javax.servlet.Filter class cannot be found. Changing the Tomcat 6 dependency to "Runtime" allows the test to run.

Would anyone have a suggestion about why these tests would behave differently on the two different machines?


Please sign in to leave a comment.