Hi,

I try to use m2 and I have some trouble with proxy settings.

In the settings.xml in %USER_HOME%/.m2, I have defined my proxy
   <proxy>
     <id>optional</id>
     <active>true</active>
     <username/>
     <password/>
     <protocol>http</protocol>
     <host>my-proxy</host>
     <port>8888</port>
     <nonProxyHosts>localhost</nonProxyHosts>
   </proxy>

It works well when maven try to download plug-ins and artifacts.
But if maven try to (only) download a file like
http://www.apache.org/licenses/LICENSE-2.0.txt
it fails stating :
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Can't read the url [http://www.apache.org/licenses/LICENSE-2.0.txt] :
Connection timed out: connect
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.util.MissingResourceException: Can't read the url [
http://www.apache.org/licenses/LICENSE-2.0.txt] : Connection timed out:
connect
       at
org.apache.maven.report.projectinfo.LicenseReport$LicenseRenderer.renderBody
(LicenseReport.java:248)
       at org.apache.maven.reporting.AbstractMavenReportRenderer.render(
AbstractMavenReportRenderer.java:65)
       ...

If Maven try to download a plug-in or artifact and a file like
http://www.apache.org/licenses/LICENSE-2.0.txt
it works well. It seems that maven use the proxy settings only if it try to
download a plug-in or artifact.
I have the same behavior with mvn cargo:start and the file
http://internap.dl.sourceforge.net/sourceforge/jboss/jboss-4.0.2.zip

It is a bug or I missed something ?
Thanks,

Rémy

Reply via email to