Maven
  1. Maven
  2. MNG-3461

Enhance Mirror definition syntax

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.8
    • Fix Version/s: 2.0.9
    • Labels:
      None

      Description

      I ran into some issues recently with the IT tests. I use a mirrorof * to redirect everything to a repo manager but this is also redirecting the file based repositories. I can't think of any good reason this should apply to anything other than remote repos. I have two proposals:

      1. Change maven so that file based repos ignore all mirror settings

      2. Change maven so that file based repos ignore the wildcard but
      will respond if the mirror specifically names it.

      I can't think of any reason why a mirror should override a local repo so I suggest we go with #1.

        Issue Links

          Activity

          Brian E. Fox created issue -
          Hide
          Carlos Sanchez added a comment -

          #2 if I explicitly want to mirror a file repo I should be able to

          Show
          Carlos Sanchez added a comment - #2 if I explicitly want to mirror a file repo I should be able to
          Hide
          Brian E. Fox added a comment -

          I guess I can live with that. The reason I was thinking of still skipping the file ones is that you may have a name conflict and you didn't mean the one with the file, but the one with the http.

          Show
          Brian E. Fox added a comment - I guess I can live with that. The reason I was thinking of still skipping the file ones is that you may have a name conflict and you didn't mean the one with the file, but the one with the http.
          Brian Fox made changes -
          Field Original Value New Value
          Fix Version/s 2.0.9 [ 13801 ]
          Hide
          John Casey added a comment -

          IMO it's really unfortunate that we started using regex-like syntax for mirrorOf in the first place. Having reserve words instead, like 'all' or 'external', would be better since it would allow flexibility to expand in precisely this way. I'd be in favor of an 'external:*' syntax to mean anything not on this machine (using file:// or localhost as the host would be "this machine" IMO).

          Maybe we can start introducing these reserved words now?

          Show
          John Casey added a comment - IMO it's really unfortunate that we started using regex-like syntax for mirrorOf in the first place. Having reserve words instead, like 'all' or 'external', would be better since it would allow flexibility to expand in precisely this way. I'd be in favor of an 'external:*' syntax to mean anything not on this machine (using file:// or localhost as the host would be "this machine" IMO). Maybe we can start introducing these reserved words now?
          Show
          John Casey added a comment - Link to proposal: http://docs.codehaus.org/display/MAVEN/Mirror+Settings+and+File+repositories
          Hide
          Brian E. Fox added a comment -

          Patch to implement the proposal. I used the new syntax locally and ran the ITs with no problems. (meaning it didn't interfere with the file repos as intended)

          Show
          Brian E. Fox added a comment - Patch to implement the proposal. I used the new syntax locally and ran the ITs with no problems. (meaning it didn't interfere with the file repos as intended)
          Brian Fox made changes -
          Attachment mng-3461.patch [ 33215 ]
          Hide
          Brian E. Fox added a comment -

          please peer review patch..

          Show
          Brian E. Fox added a comment - please peer review patch..
          Brian Fox made changes -
          Assignee John Casey [ jdcasey ]
          Hide
          Brian E. Fox added a comment -

          uploading new patch, avoided the complete reformatting.

          Show
          Brian E. Fox added a comment - uploading new patch, avoided the complete reformatting.
          Brian Fox made changes -
          Attachment mng-3461.diff [ 33216 ]
          Brian Fox made changes -
          Attachment mng-3461.patch [ 33215 ]
          Hide
          John Casey added a comment -

          I've reviewed the patch, and all looks good with it. I think even UNC paths will work out alright here, since you have to provide a protocol for the repository to work. In UNC cases, this would be 'file://' which would mean that the \\server\path\to\repo UNC path should render 'server' as the host name, which is != localhost, and therefore matches external:*.

          Show
          John Casey added a comment - I've reviewed the patch, and all looks good with it. I think even UNC paths will work out alright here, since you have to provide a protocol for the repository to work. In UNC cases, this would be 'file://' which would mean that the \\server\path\to\repo UNC path should render 'server' as the host name, which is != localhost, and therefore matches external:*.
          Brian Fox made changes -
          Resolution Fixed [ 1 ]
          Assignee John Casey [ jdcasey ] Brian Fox [ brianfox ]
          Status Open [ 1 ] Closed [ 6 ]
          Brian Fox made changes -
          Summary Mirrors should not apply to file:// repositories Enhance Mirror definition syntax
          Benjamin Bentmann made changes -
          Link This issue relates to MNG-3974 [ MNG-3974 ]
          Benjamin Bentmann made changes -
          Link This issue is related to MNG-2865 [ MNG-2865 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MANTTASKS-141 [ MANTTASKS-141 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
          Mark Thomas made changes -
          Link This issue relates to MANTTASKS-141 [ MANTTASKS-141 ]
          Mark Thomas made changes -
          Workflow jira [ 12713883 ] Default workflow, editable Closed status [ 12753649 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
          Mark Thomas made changes -
          Link This issue relates to MANTTASKS-141 [ MANTTASKS-141 ]
          Mark Thomas made changes -
          Workflow jira [ 12952256 ] Default workflow, editable Closed status [ 12989602 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          3d 18h 52m 1 Brian Fox 17/Mar/08 12:15

            People

            • Assignee:
              Brian Fox
              Reporter:
              Brian E. Fox
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development