You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ittay Dror (JIRA)" <ji...@codehaus.org> on 2010/05/03 15:20:12 UTC

[jira] Created: (MNG-4655) 'mvn test' tries to locate tests jar of other module in repository

'mvn test' tries to locate tests jar of other module in repository
------------------------------------------------------------------

                 Key: MNG-4655
                 URL: http://jira.codehaus.org/browse/MNG-4655
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Artifacts and Repositories
    Affects Versions: 2.2.1
            Reporter: Ittay Dror


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.

-- 
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

        

[jira] Closed: (MNG-4655) 'mvn test' tries to locate tests jar of other module in repository

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4655.
----------------------------------

    Resolution: Duplicate
      Assignee: Benjamin Bentmann

> 'mvn test' tries to locate tests jar of other module in repository
> ------------------------------------------------------------------
>
>                 Key: MNG-4655
>                 URL: http://jira.codehaus.org/browse/MNG-4655
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>            Reporter: Ittay Dror
>            Assignee: Benjamin Bentmann
>
> 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.

-- 
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