Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.2.1
-
None
-
None
Description
Normally when running 'compile' or 'test' phases, Maven uses the path to the build directory ('target/classes') of modules in the dependency list.
However, if the dependency list contains a dependency with classifier 'tests' (that was created with test-jar goal of the jar plugin), then it is searched in the local repository.
I imagine the issue is because the dependency is on something that is created in the package stage and therefore doesn't exist in the 'test' phase. However, I think there should be a way to get to target/test-classes (similarly to getting target/classes in compile)
Note: In my case extracting the dependency test code to a separate module is not an option since the module has tests that rely on it and it relies on the core code of the module, creating a cyclic dependency.
Attachments
Issue Links
- duplicates
-
MNG-3043 Allow 'mvn test' to work with test-jar dependencies in a reactor
- Closed