Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5929

Allow mirrors to be set through settings.xml profiles

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Settings
    • None

    Description

      Currently I am working for 3 customers with all three their own internal repository. This means that they use the following mirror settings:

      <mirror>
      <id>mirror</id>
      <url>mirrorUrl</url>
      <mirrorOf>*</mirrorOf>
      </mirror>

      I have now made three profiles for each company, allowing me to use one settings file.

      I made a bash script where I can set MAVEN_OPTS=-DsettingsProfile=customerName and then use this variable for the activation of the profiles.

      The only pitfall is that I can't do the same for the mirror, seeing as this is not an allowed element inside the profiles. So it would be very nice if this could be improved to allow the mirror element in the profiles section.

      (Another solution would be to return the -Dapache.user_settings=settingsfile, but this is sadly dropped from maven 3. Using the -s is not an option seeing as this won't be used in spawned maven processes from the main maven proces.)

      Attachments

        Issue Links

          Activity

            People

              jvanzyl Jason van Zyl
              royteeuwen Roy Teeuwen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: