Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.2
-
Fix Version/s: 2.0.8
-
Component/s: None
-
Labels:None
-
Environment:WinXP
-
Complexity:Intermediate
-
Testcase included:yes
-
Number of attachments :
Description
I have 2 projects under a parent like so:
--Parent
— sample-jar
— sample-jar-user
sample-jar builds and installs a test-jar along with the normal jar. sample-jar-user depends on the test-jar at compile time. When I build from the parent folder, the build fails because it can't find the class. When I go to sample-jar-user and build, it works fine.
In the attached test case, to reproduce:
from the root folder, run mvn clean install - See it fail.
cd sample-jar-user; mvn clean install - see it succeed.
I remember reading somewhere that in multiprojects, maven attempts to locate the sibling classes in the source tree instead of using the jars from the repository. I'm guessing the problem is here that it's not looking in ../sample-jar/target/test-classes for this code, but really one should expect this to come from the repository.
Attachments
Issue Links
| This issue is duplicated by: | ||||
| MSITE-432 | Incorrect classpath is used when site plugin/phase launches javadoc command |
|
|
|
| This issue relates to: | ||||
| MJAR-68 | multi module release fails because of test-jar |
|
|
|
| MWAR-7 | Referenced projects' artifacts naming scheme behaves differently when ran from reactor |
|
|
|
| MNG-3043 | Allow 'mvn test' to work with test-jar dependencies in a reactor |
|
|
|
| MNG-4032 | Test jar dependency not available for for main classes in multi module builds |
|
|
|
| MNG-4056 | Relax resolution of active project artifacts from the reactor with regard to artifact type |
|
|
|
| This issue is related to: | ||||
| MNG-3559 | Multi-Module Project: module that depends on sibling test jar cannot execute test-compile without install of sibling first |
|
|
|
| MNG-2877 | unable to resolve attached artifacts from reactor that are not in repo. (patch applied in svn and IT tests added) |
|
|
|
| MNG-2871 | Subartifact (ejb-client, test-jar etc.) are not reselved as active project artifacts in build phases prior to package |
|
|
|
| MNG-2720 | Multiproject dependencies not accurate for project.compileClasspathElements when run from root project |
|
|
|
| This issue is superceded by: | ||||
| MNG-4248 | CLONE -Maven can't compile against sibling test-jar dependency in multiproject (Test Attached) |
|
|
|
| This issue depends upon: | ||||
| MJAR-75 | [PATCH] Wrong artifact type attached to the project by the test-jar goal |
|
|
|
Integration test.
If classes are moved to test folder and dependency set as test scope it works fine, using the jar from repo
If trying to use in compile scope it references ../child1/target/classes twice in the compiler classpath