Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
2.0.4
-
None
-
None
Description
When I run my tests, the classpath includes all my provided-scope dependencies. The docs online don't say they should be there, but I guess it makes sense, right? Provided scope means I need them to run, but they'll be available after I deploy. Therefore maven needs to provide them when I'm just running tests. So far so good.
The problem is that if my project relies on library A with a test scope, and A relies on B with a provided scope, I don't have B in my classpath when my project runs its tests.
Here is the setup:
Project depends on A with test scope.
A depends on B with provided scope.
When I run A's tests, I have B in my classpath.
When I run Project's tests, I don't have B in my classpath.
I see there were other bugs opened about how provided scope should be transitive, but they are closed. It looks like it is still not transitive through a test-scoped dependency.
Attachments
Issue Links
- duplicates
-
MNG-2205 "provided" scope dependencies must be transitive
- Closed