Automatic Proxy Configuration on Windows
----------------------------------------

                 Key: MNG-5116
                 URL: http://jira.codehaus.org/browse/MNG-5116
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Artifacts and Repositories
    Affects Versions: 2.2.1
         Environment: Windows XP
            Reporter: Jase
            Priority: Minor


In trying to develop a SpringRoo application with maven, I experience a problem 
connecting to the internet through the proxy we have at work.  The proxy is 
setup on an "Automatic Proxy Configuration" script and only requires a URL for 
configuration.

Alternative means were used to execute the retrieval of the error in question 
by issuing a command line exeuction as follows (with the following results):

C:\springsource\maven-2.2.1.RELEASE\bin>mvn install:install-file -DgroupId=org.a
spectj -DartifactId=aspectjtools -Dversion=1.2 -Dpackaging=jar -Dfile=c:\aspectj
-maven-plugin-1.2.jar
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'install'.
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-instal
l-plugin/2.2/maven-install-plugin-2.2.pom
[INFO] Unable to find resource 'org.apache.maven.plugins:maven-install-plugin:po
m:2.2' in repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-instal
l-plugin/2.2/maven-install-plugin-2.2.pom
[INFO] Unable to find resource 'org.apache.maven.plugins:maven-install-plugin:po
m:2.2' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: org.apache.maven.plugins
ArtifactId: maven-install-plugin
Version: 2.2

Reason: Unable to download the artifact from any repository

  org.apache.maven.plugins:maven-install-plugin:pom:2.2

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)



[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Jun 13 11:27:50 CDT 2011
[INFO] Final Memory: 1M/3M
[INFO] ------------------------------------------------------------------------



After this effort, I used MS Network Monitor to inspect the packet retrievals 
and discovered that a 404 error was being returned.

In order to narrow the issue, I used cygwin with "http-proxy" set for 
interfacing with our proxy and retrieving the same URL as maven was trying to 
do with the User Agent set to "Apache-Maven/2.2 (Java 1.5.0_09; Windows XP 5.1) 
maven-artifact/2.2.1".  The following result in debug mode was returned 
(PROXYCOMPANY and PROXYCOMPANYIP were use to protect identify of my company):

$ wget -d -U "Apache-Maven/2.2 (Java 1.5.0_09; Windows XP 5.1) 
maven-artifact/2.2.1" 
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.pom
Setting --user-agent (useragent) to Apache-Maven/2.2 (Java 1.5.0_09; Windows XP 
5.1) maven-artifact/2.2.1
DEBUG output created by Wget 1.12 on cygwin.

URI encoding = `UTF-8'
URI encoding = `UTF-8'
--2011-06-13 11:41:17--  
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.pom
Resolving PROXYCOMPANY (PROXYCOMPANY)... PROXYCOMPANYIP
Caching proxy.compassbnk.com => PROXYCOMPANYIP
Connecting to PROXYCOMPANY (PROXYCOMPANY)|PROXYCOMPANYIP|:8080... connected.
Created socket 3.
Releasing 0x004e9178 (new refcount 1).

---request begin---
GET 
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.pom
 HTTP/1.0
User-Agent: Apache-Maven/2.2 (Java 1.5.0_09; Windows XP 5.1) 
maven-artifact/2.2.1
Accept: */*
Host: repo1.maven.org

---request end---
Proxy request sent, awaiting response... 
---response begin---
HTTP/1.1 404 Not Found
Content-Length: 1635
Content-Type: text/html
Server: Microsoft-IIS/6.0
Date: Mon, 13 Jun 2011 16:40:12 GMT
Connection: close

---response end---
404 Not Found
Closed fd 3
2011-06-13 11:41:17 ERROR 404: Not Found.



This clearly shows that there is something wrong with the handshaking of the 
server, but I have no idea where the issues is.

Please advise if this is a bug in maven or my configuration setup.

thanks


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to