Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] ArtifactTransferException in M2Eclipse, but not through Command Line

Hello!

First time poster, long time user.

I'm having some trouble when invoking Maven > Update Project > Force update of snapshots/releases in Eclipse.

It seems that when I do this, I get different behaviors when comparing with command line execution of Maven. I'm using a remote Artifactory repo with user authentication *required*. The user is a local (non-LDAP) Artifactory user with a static password. It seems that when using an HTTP keep-alive connection, the authenticator is used during the first request, but not by subsequent ones. On the other hand, when using Maven through the CLI, it seems that it always tries to request the artifact anonymously, and when that fails, it tries again but using the authenticator. I'm sure that there's a reasonable explanation for this, but I do like that the CLI-Maven at least tries once more.

While tracing the network interaction when using M2Eclipse, I get (same TCP stream):

GET /artifactory/repo/X/Y/Z-SNAPSHOT/maven-metadata.xml HTTP/1.1
Host: <artifactory>:8081
Pragma: no-cache
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Accept-Encoding: gzip
Authorization: Basic <my authenticator>
Connection: keep-alive
User-Agent: m2e/3.9.1.v20130814-1242/1.4.0.20130601-0317/1.6.0_45

HTTP/1.1 200 OK
Server: Artifactory/3.0.0
X-Artifactory-Id: 2e45165fddc22336:706b578:142be0db83d:-8000
Last-Modified: Tue, 28 Jan 2014 08:40:46 GMT
ETag: 8093a75e79db378f4be4113a233a1550f1549be3
X-Checksum-Sha1: 8093a75e79db378f4be4113a233a1550f1549be3
X-Checksum-Md5: 67ad1022175cabca693e6a6c9a481858
Content-Disposition: attachment; filename=maven-metadata.xml
X-Artifactory-Filename: maven-metadata.xml
Content-Type: application/xml
Content-Length: 1201
Date: Tue, 28 Jan 2014 09:10:03 GMT

<data>

GET /artifactory/repo/X/Y/Z-SNAPSHOT/maven-metadata.xml.sha1 HTTP/1.1
Host: <artifactory>:8081
Accept-Encoding: gzip
Connection: keep-alive
Accept: */*
User-Agent: m2e/3.9.1.v20130814-1242/1.4.0.20130601-0317/1.6.0_45

HTTP/1.1 401 Unauthorized
Server: Artifactory/3.0.0
X-Artifactory-Id: 2e45165fddc22336:706b578:142be0db83d:-8000
WWW-Authenticate: Basic realm="Artifactory Realm"
Content-Type: text/html;charset=utf-8
Content-Length: 1005
Date: Tue, 28 Jan 2014 09:10:03 GMT

<error msg from Tomcat and consequently an ArtifactTranferException in M2Eclipse for
maven-metadata.xml, NOT maven-metadata.xml.sha1>

But when using the CLI, I get:

GET /artifactory/repo/A/B/C-SNAPSHOT/maven-metadata.xml HTTP/1.1
Cache-control: no-cache
Cache-store: no-store
Pragma: no-cache
Expires: 0
Accept-Encoding: gzip
User-Agent: Apache-Maven/3.1.1 (Java 1.6.0_45; Windows 7 6.1)
Host: <artifactory>:8081
Connection: Keep-Alive

HTTP/1.1 401 Unauthorized
Server: Artifactory/3.0.0
X-Artifactory-Id: 2e45165fddc22336:706b578:142be0db83d:-8000
WWW-Authenticate: Basic realm="Artifactory Realm"
Content-Type: text/html;charset=utf-8
Content-Length: 1005
Date: Tue, 28 Jan 2014 09:47:17 GMT

<error msg from Tomcat>

GET /artifactory/repo/A/B/C-SNAPSHOT/maven-metadata.xml HTTP/1.1
Cache-control: no-cache
Cache-store: no-store
Pragma: no-cache
Expires: 0
Accept-Encoding: gzip
User-Agent: Apache-Maven/3.1.1 (Java 1.6.0_45; Windows 7 6.1)
Host: <artifactory>:8081
Connection: Keep-Alive
Authorization: Basic <my authenticator>

HTTP/1.1 200 OK
Server: Artifactory/3.0.0
X-Artifactory-Id: 2e45165fddc22336:706b578:142be0db83d:-8000
Last-Modified: Tue, 28 Jan 2014 08:40:31 GMT
ETag: 710b8dfda56a10eae158d9a803004274013845b3
X-Checksum-Sha1: 710b8dfda56a10eae158d9a803004274013845b3
X-Checksum-Md5: 2584f65bdc2b489a810494e1245d459e
Content-Disposition: attachment; filename=maven-metadata.xml
X-Artifactory-Filename: maven-metadata.xml
Content-Type: application/xml
Content-Length: 1425
Date: Tue, 28 Jan 2014 09:47:17 GMT

<data>

Has anyone seen this before? The developers (and myself included) are getting quite annoyed by this...


Thanks,
Danny.

Back to the top