maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikko Koponen (JIRA)" <j...@codehaus.org>
Subject [jira] Issue Comment Edited: (MNG-2045) Maven can't compile against sibling test-jar dependency in multiproject (Test Attached)
Date Mon, 17 Sep 2007 12:26:11 GMT

    [ http://jira.codehaus.org/browse/MNG-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107556
] 

Mikko Koponen edited comment on MNG-2045 at 9/17/07 7:24 AM:
-------------------------------------------------------------

We're also running into this problem, which is that:
* We have project A with common test classes in src/main/test
* Project A creates a test jar
* Project B depends on project A's test jar in *compile* scope
* Project B builds fine if built on it's own, but fails when in a reactor build with project
A.

I know we shouldn't have a dependency from the main code of B to a test artifact of project
A, but it would make my job considerably easier if this "just worked", or even if it also
failed when only building project B.


 was:
We're also running into this problem, which is that:
* We have project A with common test classes in src/main/test
* Project A creates a test jar
* Project B depends on project A's test jar in *compile* scope
* Project B builds fine if built on it's own, but fails when in a reactor build with project
A.

I know we shouldn't have a dependency from a test artifact to main code, but it would make
my job considerably easier if this "just worked", or even if it also failed when only building
project B.

> Maven can't compile against sibling test-jar dependency in multiproject (Test Attached)
> ---------------------------------------------------------------------------------------
>
>                 Key: MNG-2045
>                 URL: http://jira.codehaus.org/browse/MNG-2045
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.2
>         Environment: WinXP
>            Reporter: Brian Fox
>            Assignee: Brian Fox
>             Fix For: 2.0.6
>
>         Attachments: it1021.tar.gz, sample.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message