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

[jira] Created: (MNG-4709) Separate local repository for each remote repository

Separate local repository for each remote repository
----------------------------------------------------

                 Key: MNG-4709
                 URL: http://jira.codehaus.org/browse/MNG-4709
             Project: Maven 2 & 3
          Issue Type: New Feature
          Components: Artifacts and Repositories
            Reporter: Paul Gier


It would be good if Maven used a separate local repository directory for each remote repository that was used.  This would avoid the problem of two repositories using the same GAV for a different artifact.  This would also allow the user to easily see where an artifact in the local repository was downloaded from.

-- 
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-4709) Separate local repository for each remote repository

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

Brett Porter closed MNG-4709.
-----------------------------

    Resolution: Duplicate
      Assignee: Brett Porter

covered the use case of the subject in http://docs.codehaus.org/display/MAVEN/Local+repository+separation, waiting for after 3.0 and further discussion to consider working on it.

That said, I don't think having the same artifact in multiple different repositories is something that we want to encourage and an implementation would probably want a way to check for that.

> Separate local repository for each remote repository
> ----------------------------------------------------
>
>                 Key: MNG-4709
>                 URL: http://jira.codehaus.org/browse/MNG-4709
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Artifacts and Repositories
>            Reporter: Paul Gier
>            Assignee: Brett Porter
>
> It would be good if Maven used a separate local repository directory for each remote repository that was used.  This would avoid the problem of two repositories using the same GAV for a different artifact.  This would also allow the user to easily see where an artifact in the local repository was downloaded from.
> In addition the local repository used for "mvn install" could also be separated, so that it would not conflict with artifacts downloaded from remote repositories.

-- 
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] Commented: (MNG-4709) Separate local repository for each remote repository

Posted by "Dan Allen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=225409#action_225409 ] 

Dan Allen commented on MNG-4709:
--------------------------------

It's more than just good. It's essential.

Currently, there is one local repository, but let's refer to it a cache. If I build project 1, which depends on repository A and repository B, my cache will be populated with the required dependencies fetch from either of those two repositories. If I then build project 2, which depends on repository C, it will consult my local cache for artifacts and may find artifacts that were pulled from repository A or B, even if they are not in repository C. What we have is an inconsistent truth. There is no way that project 2 should ever see the artifacts from A and B. Absolutely not.

In fact, this whole concept of "nuking your local repository" should have been a huge red flag that something is seriously wrong. A cache should never be a superset of what it is caching. Yet, that's what is happening. In fact, Maven is creating a local repository that is completely unique from any other repository in the world (and not just a subset of a known repository).

If it's true that repository artifacts are never removed remotely (which is a fairly reliable truth), you should definitely never have to nuke your local repository.

What needs to happen is that there needs to be a local repository for each remote repository.

~/.m2/repository/A
~/.m2/repository/B
~/.m2/repository/C

Only if I add repository B to project 2 should it find artifacts that where fetched by building project 1...and then only those from repository B, not A.

To cite a precedence, this is how apt and yum work.

> Separate local repository for each remote repository
> ----------------------------------------------------
>
>                 Key: MNG-4709
>                 URL: http://jira.codehaus.org/browse/MNG-4709
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Artifacts and Repositories
>            Reporter: Paul Gier
>            Assignee: Brett Porter
>
> It would be good if Maven used a separate local repository directory for each remote repository that was used.  This would avoid the problem of two repositories using the same GAV for a different artifact.  This would also allow the user to easily see where an artifact in the local repository was downloaded from.
> In addition the local repository used for "mvn install" could also be separated, so that it would not conflict with artifacts downloaded from remote repositories.

-- 
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] Updated: (MNG-4709) Separate local repository for each remote repository

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

Paul Gier updated MNG-4709:
---------------------------

    Description: 
It would be good if Maven used a separate local repository directory for each remote repository that was used.  This would avoid the problem of two repositories using the same GAV for a different artifact.  This would also allow the user to easily see where an artifact in the local repository was downloaded from.

In addition the local repository used for "mvn install" could also be separated, so that it would not conflict with artifacts downloaded from remote repositories.

  was:It would be good if Maven used a separate local repository directory for each remote repository that was used.  This would avoid the problem of two repositories using the same GAV for a different artifact.  This would also allow the user to easily see where an artifact in the local repository was downloaded from.


> Separate local repository for each remote repository
> ----------------------------------------------------
>
>                 Key: MNG-4709
>                 URL: http://jira.codehaus.org/browse/MNG-4709
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Artifacts and Repositories
>            Reporter: Paul Gier
>
> It would be good if Maven used a separate local repository directory for each remote repository that was used.  This would avoid the problem of two repositories using the same GAV for a different artifact.  This would also allow the user to easily see where an artifact in the local repository was downloaded from.
> In addition the local repository used for "mvn install" could also be separated, so that it would not conflict with artifacts downloaded from remote repositories.

-- 
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] Commented: (MNG-4709) Separate local repository for each remote repository

Posted by "Dan Allen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=225410#action_225410 ] 

Dan Allen commented on MNG-4709:
--------------------------------

Gradle is now looking into this as well: http://jira.codehaus.org/browse/GRADLE-981

> Separate local repository for each remote repository
> ----------------------------------------------------
>
>                 Key: MNG-4709
>                 URL: http://jira.codehaus.org/browse/MNG-4709
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Artifacts and Repositories
>            Reporter: Paul Gier
>            Assignee: Brett Porter
>
> It would be good if Maven used a separate local repository directory for each remote repository that was used.  This would avoid the problem of two repositories using the same GAV for a different artifact.  This would also allow the user to easily see where an artifact in the local repository was downloaded from.
> In addition the local repository used for "mvn install" could also be separated, so that it would not conflict with artifacts downloaded from remote repositories.

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