Discussion:
404 error when attempting to query artifact
Thad Humphries
2015-06-16 20:55:00 UTC
Permalink
I have a ZIP file stored on my Archiva 2.2 server. Anyone here can reach it
through a browser at
http://hamlet:8080/#artifact-details-download-content/my-demos/JavaDemos/8.1
and download it without being logged in by clicking the removable media
icon.

I'd like to download this file from a script, so I try the wget described
at:

http://archiva.apache.org/docs/2.2.0/userguide/querying-artifacts.html


but I get a 404 error:

$ wget "
http://hamlet:8080/archiva/restServices/archivaServices/searchService/artifact?g=my-demos&a=JavaDemos&v=LATEST
"

--2015-06-16 16:42:33--
http://hamlet:8080/archiva/restServices/archivaServices/searchService/artifact?g=my-demos&a=JavaDemos&v=LATEST

Resolving hamlet (hamlet)... 10.1.2.1

Connecting to hamlet (hamlet)|10.1.2.1|:8080... connected.

HTTP request sent, awaiting response... 404 Not Found

2015-06-16 16:42:33 ERROR 404: Not Found.


What is the problem and how do I correct it?
--
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v. 121-24)
Olivier Lamy
2015-06-17 00:40:25 UTC
Permalink
Hi,
I think documentation is wrong as now Archiva is per default on / so use

wget "
http://hamlet:8080/restServices/archivaServices/searchService/artifact?g=my-demos&a=JavaDemos&v=LATEST
<http://hamlet:8080/archiva/restServices/archivaServices/searchService/artifact?g=my-demos&a=JavaDemos&v=LATEST>
"
Please note for this url you will have a redirect to download the artifact.

Olivier
Post by Thad Humphries
I have a ZIP file stored on my Archiva 2.2 server. Anyone here can reach it
through a browser at
http://hamlet:8080/#artifact-details-download-content/my-demos/JavaDemos/8.1
and download it without being logged in by clicking the removable media
icon.
I'd like to download this file from a script, so I try the wget described
http://archiva.apache.org/docs/2.2.0/userguide/querying-artifacts.html
$ wget "
http://hamlet:8080/archiva/restServices/archivaServices/searchService/artifact?g=my-demos&a=JavaDemos&v=LATEST
"
--2015-06-16 16:42:33--
http://hamlet:8080/archiva/restServices/archivaServices/searchService/artifact?g=my-demos&a=JavaDemos&v=LATEST
Resolving hamlet (hamlet)... 10.1.2.1
Connecting to hamlet (hamlet)|10.1.2.1|:8080... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-06-16 16:42:33 ERROR 404: Not Found.
What is the problem and how do I correct it?
--
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v. 121-24)
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
John Cooper
2015-06-17 10:43:15 UTC
Permalink
You will probably need to add " &p=zip" at end as defaults to jar.
 
Direct:  
-----Original Message-----
From: Olivier Lamy [mailto:***@apache.org]
Sent: 17 June 2015 01:40
To: ***@archiva.apache.org
Subject: Re: 404 error when attempting to query artifact

Hi,
I think documentation is wrong as now Archiva is per default on / so use

wget "
http://hamlet:8080/restServices/archivaServices/searchService/artifact?g=my-demos&a=JavaDemos&v=LATEST
<http://hamlet:8080/archiva/restServices/archivaServices/searchService/artifact?g=my-demos&a=JavaDemos&v=LATEST>
"
Please note for this url you will have a redirect to download the artifact.

Olivier
Post by Thad Humphries
I have a ZIP file stored on my Archiva 2.2 server. Anyone here can
reach it through a browser at
http://hamlet:8080/#artifact-details-download-content/my-demos/JavaDem
os/8.1 and download it without being logged in by clicking the
removable media icon.
I'd like to download this file from a script, so I try the wget described
http://archiva.apache.org/docs/2.2.0/userguide/querying-artifacts.html
$ wget "
http://hamlet:8080/archiva/restServices/archivaServices/searchService/
artifact?g=my-demos&a=JavaDemos&v=LATEST
"
--2015-06-16 16:42:33--
http://hamlet:8080/archiva/restServices/archivaServices/searchService/
artifact?g=my-demos&a=JavaDemos&v=LATEST
Resolving hamlet (hamlet)... 10.1.2.1
Connecting to hamlet (hamlet)|10.1.2.1|:8080... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-06-16 16:42:33 ERROR 404: Not Found.
What is the problem and how do I correct it?
--
"Hell hath no limits, nor is circumscrib'd In one self-place; but
where we are is hell, And where hell is, there must we ever be"
--Christopher Marlowe, *Doctor Faustus* (v. 121-24)
--
Olivier Lamy
http://twitter.com/olamy | http:
Thad Humphries
2015-06-17 13:33:47 UTC
Permalink
Thanks. Both changes are needed to make it work--remove "archiva/" *and* add
"&p=zip" (because it's a ZIP file; I guess that Archiva defaults to JAR if
not told otherwise). The working URL looks like

http://hamlet:8080/restServices/archivaServices/searchService/artifact?g=my-demos&a=JavaDemos&v=LATEST&p=zip
Post by John Cooper
You will probably need to add " &p=zip" at end as defaults to jar.
-----Original Message-----
Sent: 17 June 2015 01:40
Subject: Re: 404 error when attempting to query artifact
Hi,
I think documentation is wrong as now Archiva is per default on / so use
wget "
http://hamlet:8080/restServices/archivaServices/searchService/artifact?g=my-demos&a=JavaDemos&v=LATEST
<
http://hamlet:8080/archiva/restServices/archivaServices/searchService/artifact?g=my-demos&a=JavaDemos&v=LATEST
"
Please note for this url you will have a redirect to download the artifact.
Olivier
Post by Thad Humphries
I have a ZIP file stored on my Archiva 2.2 server. Anyone here can
reach it through a browser at
http://hamlet:8080/#artifact-details-download-content/my-demos/JavaDem
os/8.1 and download it without being logged in by clicking the
removable media icon.
I'd like to download this file from a script, so I try the wget described
http://archiva.apache.org/docs/2.2.0/userguide/querying-artifacts.html
$ wget "
http://hamlet:8080/archiva/restServices/archivaServices/searchService/
artifact?g=my-demos&a=JavaDemos&v=LATEST
"
--2015-06-16 16:42:33--
http://hamlet:8080/archiva/restServices/archivaServices/searchService/
artifact?g=my-demos&a=JavaDemos&v=LATEST
Resolving hamlet (hamlet)... 10.1.2.1
Connecting to hamlet (hamlet)|10.1.2.1|:8080... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-06-16 16:42:33 ERROR 404: Not Found.
What is the problem and how do I correct it?
--
"Hell hath no limits, nor is circumscrib'd In one self-place; but
where we are is hell, And where hell is, there must we ever be"
--Christopher Marlowe, *Doctor Faustus* (v. 121-24)
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
--
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v. 121-24)
Loading...