Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.2
-
None
-
None
-
WinXP
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
Attachments
Issue Links
- depends upon
-
MJAR-75 [PATCH] Wrong artifact type attached to the project by the test-jar goal
- Closed
- is duplicated by
-
MSITE-432 Incorrect classpath is used when site plugin/phase launches javadoc command
- Closed
- is related to
-
MNG-2720 Multiproject dependencies not accurate for project.compileClasspathElements when run from root project
- Closed
-
MNG-2871 Subartifact (ejb-client, test-jar etc.) are not reselved as active project artifacts in build phases prior to package
- Closed
-
MNG-2877 unable to resolve attached artifacts from reactor that are not in repo. (patch applied in svn and IT tests added)
- Closed
-
MNG-3559 Multi-Module Project: module that depends on sibling test jar cannot execute test-compile without install of sibling first
- Closed
- is superceded by
-
MNG-4248 CLONE -Maven can't compile against sibling test-jar dependency in multiproject (Test Attached)
- Closed
- relates to
-
MRELEASE-140 Tests fail during release:perform but work elsewhere
- Closed
-
MJAR-68 multi module release fails because of test-jar
- Closed
-
MNG-3043 Allow 'mvn test' to work with test-jar dependencies in a reactor
- Closed
-
MNG-4032 Test jar dependency not available for for main classes in multi module builds
- Closed
-
MWAR-7 Referenced projects' artifacts naming scheme behaves differently when ran from reactor
- Closed
-
MNG-4056 Relax resolution of active project artifacts from the reactor with regard to artifact type
- Closed