You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Brian Fox (JIRA)" <ji...@codehaus.org> on 2006/02/06 22:52:50 UTC

[jira] Created: (MNG-2045) Maven can't compile against sibling test-jar dependency in multiproject (Test Attached)

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
        Type: Bug

    Versions: 2.0.2    
 Environment: WinXP
    Reporter: Brian Fox
    Priority: Critical
 Attachments: 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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-2045) Maven can't compile against sibling test-jar dependency in multiproject (Test Attached)

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2045?page=comments#action_57986 ] 

Carlos Sanchez commented on MNG-2045:
-------------------------------------

Brian, it works if you use test-jar in a test scope, which is the usual case. Your main classes shuldn't depend on test classes from other modules

> 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
>         Type: Bug

>     Versions: 2.0.2
>  Environment: WinXP
>     Reporter: Brian Fox
>     Priority: Critical
>  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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-2045) Maven can't compile against sibling test-jar dependency in multiproject (Test Attached)

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2045?page=all ]

Carlos Sanchez updated MNG-2045:
--------------------------------

    Priority: Major  (was: Critical)

> 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
>         Type: Bug

>     Versions: 2.0.2
>  Environment: WinXP
>     Reporter: Brian Fox
>  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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-2045) Maven can't compile against sibling test-jar dependency in multiproject (Test Attached)

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2045?page=comments#action_59740 ] 

Brian Fox commented on MNG-2045:
--------------------------------

I believe this is related to MWAR-7 and MOJO-286

> 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
>         Type: Bug

>     Versions: 2.0.2
>  Environment: WinXP
>     Reporter: Brian Fox
>  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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-2045) Maven can't compile against sibling test-jar dependency in multiproject (Test Attached)

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2045?page=all ]

Carlos Sanchez updated MNG-2045:
--------------------------------

    Attachment: it1021.tar.gz

> 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
>         Type: Bug

>     Versions: 2.0.2
>  Environment: WinXP
>     Reporter: Brian Fox
>     Priority: Critical
>  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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-2045) Maven can't compile against sibling test-jar dependency in multiproject (Test Attached)

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2045?page=comments#action_57987 ] 

Brian Fox commented on MNG-2045:
--------------------------------

Yes, I realize this is an unusual case. The code is something we are working to fix, but it was working until I moved it into a common parent in preparation for some other stuff. It seems by extension this would be a problem for other dependencies that use classifiers.

> 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
>         Type: Bug

>     Versions: 2.0.2
>  Environment: WinXP
>     Reporter: Brian Fox
>  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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org