0

I have a pom.xml that works on AWS, but behind the proxy at work it does not. I have tried everything in this post Maven proxy settings not working but nothing worked.

Here is the error using mvn help:effective-settings

...
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
Downloading:https://repo.maven.apache.org/maven2/org/codehaus/mojo/mavenmetadata.xml
Downloading:https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xmlfrom/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xmlfrom 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 metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml fromhttps://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 updatesare forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org
...
[ERROR] No plugin found for prefix 'help' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\David.Wynter\.m2\repository),central(https://repo.maven.apache.org/maven2)] -> [Help 1]

Here is the relevant part of my settings.xml

<proxies>
   <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <host>10.***.0.60</host>
      <port>8080</port>
      <username>dmgp\david.blow</username>
      <password>*******</password>
      <nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
    </proxy>
</proxies>

The settings for the host etc. come from a pac file that works for the browsers. Any ideas?

I also tried adding this

    <extensions>
        <extension>
            <!-- this extension is required by wagon in order to pass the proxy -->
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http-lightweight</artifactId>
            <version>2.2</version>
        </extension>
    </extensions>

To my pom.xml and added that jar to my maven install lib directory, but got this

[ERROR]     Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-http-lightweight:2.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.wagon:wagon-http-lightweight:jar:2.2: Could not transfer artifact org.apache.maven.wagon:wagon-http-lightweight:pom:2.2 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 2]
Community
  • 1
  • 1
hclDave
  • 33
  • 5
  • what maven version do you have? – David Herrero Sep 18 '15 at 08:53
  • Are not you supposed to add that jar to your repo ? , like if your repo is at c:\users\\.m2\repository\org\apache\maven\wagon\2.2\wagon-http-lightweight.jar – Abhiram mishra Sep 18 '15 at 08:56
  • Use "mvn -X" to check if you are using right settings file. Once you would execute the command you would see a lot of information including if you are using the right file like below. [DEBUG] Reading global settings from /usr/java/apache-maven-3.0.3/conf/settings.xml [DEBUG] Reading user settings from /home/myhome/.m2/settings.xml – Abhiram mishra Sep 18 '15 at 09:04

1 Answers1

1

You have configured to use an http proxy whereas the output from Maven tells you it is using https.

Daniel
  • 4,033
  • 4
  • 24
  • 33
  • This is not correct. The final download URL is `https` which doesn't tell you anything about the protocol the PROXY itself is to be connected to. – Enrice Aug 03 '22 at 15:16