Maven 2 & 3
  1. Maven 2 & 3
  2. MNG-4802

Maven should by default use the environment defined proxy settings

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: Settings
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      For people that constantly change places of work it's very annoying having to edit the settings.xml files every time.
      It would be great if the environment proxy settings were used when no proxy settings were defined in settings.xml.

        Activity

        Hide
        Benjamin Bentmann added a comment -

        What exactly are "environment proxy settings" here, native OS settings? Also, the settings.xml are user/machine specific so why is there a need to "edit the settings.xml files every time."?

        Show
        Benjamin Bentmann added a comment - What exactly are "environment proxy settings" here, native OS settings? Also, the settings.xml are user/machine specific so why is there a need to "edit the settings.xml files every time."?
        Hide
        Hugo Palma added a comment -

        By "environment proxy settings" i mean the native OS settings. It's very much possible and easy to get those in a Java application.

        Answering your second question, i'm sure a lot of people have a laptop and use it both at work and at home. At work you have to use a proxy, at home you don't.
        Is there any way i can use maven following this pattern without having to edit the settings.xml file twice a day ?

        Show
        Hugo Palma added a comment - By "environment proxy settings" i mean the native OS settings. It's very much possible and easy to get those in a Java application. Answering your second question, i'm sure a lot of people have a laptop and use it both at work and at home. At work you have to use a proxy, at home you don't. Is there any way i can use maven following this pattern without having to edit the settings.xml file twice a day ?
        Hide
        Jason van Zyl added a comment -

        @Hugo I'm glad this is so easy to do this, we eagerly await your patches

        Show
        Jason van Zyl added a comment - @Hugo I'm glad this is so easy to do this, we eagerly await your patches
        Hide
        Hugo Palma added a comment -

        As it turns out, i didn't find any java lib that did this. So, i started coding one: http://code.google.com/p/javaproxydiscoverer
        When i get a functional release out i'll update here and maybe you can use it in Maven.

        Show
        Hugo Palma added a comment - As it turns out, i didn't find any java lib that did this. So, i started coding one: http://code.google.com/p/javaproxydiscoverer When i get a functional release out i'll update here and maybe you can use it in Maven.
        Hide
        Gabriele added a comment -

        I'm working under windows (7), maven is a Java app, on windows users can set prosy with specific settings on Java settings under controlo panel.
        These settings can refer to "system" proxy or to specific proxy, if these settings would be used on maven would be easier to distribute m2 on different developing PC.
        Don't know if it's similar under other OS.

        Show
        Gabriele added a comment - I'm working under windows (7), maven is a Java app, on windows users can set prosy with specific settings on Java settings under controlo panel. These settings can refer to "system" proxy or to specific proxy, if these settings would be used on maven would be easier to distribute m2 on different developing PC. Don't know if it's similar under other OS.
        Hide
        Christian Schulte added a comment -

        There is this section in the $

        {java.home}

        /jre/lib/net.properties file since JDK 1.5:

        # Whether or not the DefaultProxySelector will default to System Proxy
        # settings when they do exist.
        # Set it to 'true' to enable this feature and check for platform
        # specific proxy settings
        # Note that the system properties that do explicitely set proxies
        # (like http.proxyHost) do take precedence over the system settings
        # even if java.net.useSystemProxies is set to true.
        
        java.net.useSystemProxies=false
        

        Setting this property to true should do exactly this.

        Show
        Christian Schulte added a comment - There is this section in the $ {java.home} /jre/lib/net.properties file since JDK 1.5: # Whether or not the DefaultProxySelector will default to System Proxy # settings when they do exist. # Set it to 'true' to enable this feature and check for platform # specific proxy settings # Note that the system properties that do explicitely set proxies # (like http.proxyHost) do take precedence over the system settings # even if java.net.useSystemProxies is set to true. java.net.useSystemProxies=false Setting this property to true should do exactly this.
        Show
        Jason van Zyl added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014
        Hide
        Jason van Zyl added a comment -

        Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

        Show
        Jason van Zyl added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.
        Jason van Zyl made changes -
        Field Original Value New Value
        Resolution Incomplete [ 4 ]
        Status Open [ 1 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Hugo Palma
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: