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

Maven not downloading jars behind proxy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Not A Problem
    • 3.5.3
    • None
    • Dependencies, POM, Settings
    • Windows 10 (Behind Corporate Proxy)
    • Important

    Description

      Maven (3.5.3) is unable to download jars behind corporate proxy. 

      settings.xml

      <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
       <proxies>
        <proxy>
       <id>skm--http-proxy</id>
       <active>true</active>
        <protocol>http</protocol>
       <host>my.proxy.ip.here</host>
        <port>8080</port>
       <username>faizanmubasher</username>
        <password>*****</password>
       </proxy>
       <proxy>
      <id>skm--https-proxy</id>
       <active>true</active>
       <protocol>https</protocol>
       <host>my.proxy.ip.here</host>
       <port>8080</port>
       {<username>faizanmubasher</username>
       <password>*****</password>
       </proxy>
       </proxies>
       </settings>
      

      Also tried this command:

      set MAVEN_OPTS="-DhttpProxyHost=xxx.xx.xx.xx -DsocksProxyPort=8080"

      After that, running 

      mvn clean install -U

       results Not authorized by proxy , ReasonPhrase:Proxy Authorization Required. However, it does download other files (like javadocs etc) except jars, an actual library.

      The other Stackoverflow links:

      https://stackoverflow.com/questions/50943317/maven-not-downloading-jars-behind-proxy

      https://stackoverflow.com/questions/10033286/maven-proxy-settings-not-working 

       

      Failure to transfer org.apache.maven:maven-archiver:pom:3.1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven:maven-archiver:pom:3.1.1 from/to central (https://repo.maven.apache.org/maven2): Malformed reply from SOCKS server

      Attachments

        Activity

          People

            rfscholte Robert Scholte
            faizanmubasher Faizan Mubasher
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: