maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Babak Vahdat (JIRA)" <j...@codehaus.org>
Subject [jira] (MNG-5237) Cannot download maven dependencies through proxy
Date Mon, 12 Mar 2012 10:26:02 GMT

    [ https://jira.codehaus.org/browse/MNG-5237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=293847#comment-293847
] 

Babak Vahdat edited comment on MNG-5237 at 3/12/12 5:25 AM:
------------------------------------------------------------

Being behind a HTTP Proxy I'm suffering from the same behavior (upgrading Maven 3.0.3 =>
3.0.4)

I followed the new 1.1.0 schema (http://maven.apache.org/xsd/settings-1.1.0.xsd) however with
no success.

And actually the Proxy I'm behind of does *not* require my personal credentials at all (username/password)
but just checks only the IP of the box I'm connecting from, that's all! That was also why
I didn't have to provide correct username/password while using 3.0.3. However now even using
correct credentials under 3.0.4 it blows up with:

{code}
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact
descriptor for org.iso_relax.verifier.jaxp.validation:isorelax-jaxp-bridge:jar:1.0
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
        at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:412)
        at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240)
        ... 25 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer
artifact org.iso_relax.verifier.jaxp.validation:isorelax-jaxp-bridge:pom:1.0 from/to smx.repo
(http://svn.apache.org/repos/asf/servicemix/m2-repo/): Not authorized by proxy, ReasonPhrase:Proxy
Authentication Required.
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
        ... 28 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact
org.iso_relax.verifier.jaxp.validation:isorelax-jaxp-bridge:pom:1.0 from/to smx.repo (http://svn.apache.org/repos/asf/servicemix/m2-repo/):
Not authorized by proxy, ReasonPhrase:Proxy Authentication Required.
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
        at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Not authorized by
proxy, ReasonPhrase:Proxy Authentication Required.
        at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:843)
        at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
        at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
        at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:601)
        ... 4 more
{code} 

To prove that using the same box I can successfuly access the Internet, following couple of
lines of code which *does* deliver me the content of http://www.google.ch 

{code}
    public static void main(String[] args) throws Exception {
        InetSocketAddress address = new InetSocketAddress("proxy.domain.name", proxy.port.number);
        Proxy proxy = new Proxy(Proxy.Type.HTTP, address);
        URL url = new URL("http://www.google.ch");
        URLConnection connection = url.openConnection(proxy);
        InputStream is = connection.getInputStream();

        int c;
        while ((c = is.read()) != -1) {
            System.out.print((char) c);
        }
    }
{code}
                
      was (Author: bvahdat):
    Being behind a HTTP Proxy I'm suffering from the same behavior (upgrading Maven 3.0.3
=> 3.0.4)

I followed the new 1.1.0 schema (http://maven.apache.org/xsd/settings-1.1.0.xsd) however with
no success.

And actually the Proxy I'm behind of does *not* require my personal credentials of me (username/password)
but just checks the IP, that's all! That was also why I didn't have to provide correct username/password
while using 3.0.3. However now even using correct credentials under 3.0.4 it blows up with:

{code}
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact
descriptor for org.iso_relax.verifier.jaxp.validation:isorelax-jaxp-bridge:jar:1.0
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
        at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:412)
        at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240)
        ... 25 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer
artifact org.iso_relax.verifier.jaxp.validation:isorelax-jaxp-bridge:pom:1.0 from/to smx.repo
(http://svn.apache.org/repos/asf/servicemix/m2-repo/): Not authorized by proxy, ReasonPhrase:Proxy
Authentication Required.
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
        ... 28 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact
org.iso_relax.verifier.jaxp.validation:isorelax-jaxp-bridge:pom:1.0 from/to smx.repo (http://svn.apache.org/repos/asf/servicemix/m2-repo/):
Not authorized by proxy, ReasonPhrase:Proxy Authentication Required.
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
        at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Not authorized by
proxy, ReasonPhrase:Proxy Authentication Required.
        at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:843)
        at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
        at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
        at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:601)
        ... 4 more
{code} 

To prove that using the same box I can successfuly access the Internet, following couple of
lines of code which *does* deliver me the content of http://www.google.ch 

{code}
    public static void main(String[] args) throws Exception {
        InetSocketAddress address = new InetSocketAddress("proxy.domain.name", proxy.port.number);
        Proxy proxy = new Proxy(Proxy.Type.HTTP, address);
        URL url = new URL("http://www.google.ch");
        URLConnection connection = url.openConnection(proxy);
        InputStream is = connection.getInputStream();

        int c;
        while ((c = is.read()) != -1) {
            System.out.print((char) c);
        }
    }
{code}
                  
> Cannot download maven dependencies through proxy
> ------------------------------------------------
>
>                 Key: MNG-5237
>                 URL: https://jira.codehaus.org/browse/MNG-5237
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0.4
>         Environment: windows xp64 using cygwin
>            Reporter: Niels Mordt-Ostergaard
>
> Using proxy in settings.xml, I was able to download maven dependencies in 3.0.3, but
this seems to be broken with 3.0.4:
> Proxy definition in settings.xml (hidden ip adress below, but correct proxy ip on my
system):
>   <proxies>
>    <proxy>
>       <id>optional</id>
>       <active>true</active>
>       <protocol>http</protocol>
>       <username></username>
>       <password></password>
>       <host>xxx.xx.xx.xx</host>
>       <port>8080</port>
>       <nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
>     </proxy>
>   </proxies>
> Output from 3.0.3:
> $ mvn -V clean
> Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
> Maven home: C:\Program Files\apache-maven-3.0.3
> Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
> Java home: C:\Program Files\Java\jdk1.6.0_24\jre
> Default locale: no_NO, platform encoding: Cp1252
> OS name: "windows xp", version: "5.2", arch: "amd64", family: "windows"
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building <xxx hidden xxx>
> [INFO] ------------------------------------------------------------------------
> Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
> Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
(5 KB at 4.9 KB/sec)
> ..... and so on...
> Output from 3.0.4:
> $ mvn -V clean
> Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
> Maven home: C:\Program Files\apache-maven-3.0.4
> Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
> Java home: C:\Program Files\Java\jdk1.6.0_24\jre
> Default locale: no_NO, platform encoding: Cp1252
> OS name: "windows xp", version: "5.2", arch: "amd64", family: "windows"
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building <xxx hidden xxx>
> [INFO] ------------------------------------------------------------------------
> Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 0.390s
> [INFO] Finished at: Fri Feb 03 13:14:35 CET 2012
> [INFO] Final Memory: 5M/490M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies
could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1:
Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to
central (http://repo.maven.apache.org/maven2): Access denied to: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom,
ReasonPhrase:Forbidden. -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the
following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message