Discussion:
Search does not return .war artifacts
John Cooper
2015-04-21 16:05:47 UTC
Permalink
Hi, I've successfully deployed my snapshot .war files to Archiva 2.2.0 and I can wget/curl them using the direct http address. When I try to use the API to retrieve the latest version only POMs with packaging=jar are found (version 0.1-SNAPSHOT) and download ok.

curl -i -o s3-util.jar -L -u user:password http://localhost/restServices/archivaServices/searchService/artifact?r=snapshots&g=com.company.backup&a=s3-util&v=LATEST

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 333k 100 333k 0 0 3538k 0 --:--:-- --:--:-- --:--:-- 3538k

Trying the same for a war packaging doesn't find anything

curl -i -o s3-util.jar -L -u user:password "http://localhost/restServices/archivaServices/searchService/artifact?r=snapshots&g=com.company.backup&a=s3-util&v=LATEST"

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

Am I missing something?

Thanks, John.
John Cooper
2015-04-24 11:33:13 UTC
Permalink
Any ideas why packaging type WAR cannot be found and yet can find and download packaging type if set to JAR using the API?

Thanks, John.
 
-----Original Message-----
From: John Cooper
Sent: 21 April 2015 17:06
To: ***@archiva.apache.org
Subject: Search does not return .war artifacts

Hi, I've successfully deployed my snapshot .war files to Archiva 2.2.0 and I can wget/curl them using the direct http address. When I try to use the API to retrieve the latest version only POMs with packaging=jar are found (version 0.1-SNAPSHOT) and download ok.

curl -i -o s3-util.jar -L -u user:password http://localhost/restServices/archivaServices/searchService/artifact?r=snapshots&g=com.company.backup&a=s3-util&v=LATEST

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 333k 100 333k 0 0 3538k 0 --:--:-- --:--:-- --:--:-- 3538k

Trying the same for a war packaging type doesn't find anything

curl -i -o s3-util.war -L -u user:password "http://localhost/restServices/archivaServices/searchService/artifact?r=snapshots&g=com.company.backup&a=s3-util&v=LATEST"

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

Am I missing something?

Thanks, John.
Olivier Lamy
2015-04-24 22:58:38 UTC
Permalink
Hi,
You must force packaging to war (i.e p=war)
Sample:

curl -I "
https://archiva-repository.apache.org/archiva/restServices/archivaServices/searchService/artifact?r=snapshots&g=org.apache.archiva&a=archiva-webapp&v=LATEST&p=war
"

HTTP/1.1 307 Temporary Redirect

Date: Fri, 24 Apr 2015 22:56:24 GMT

Server: Jetty(8.1.14.v20131031)

Expires: Thu, 01 Jan 1970 00:00:00 GMT

Location:
https://archiva-repository.apache.org/archiva/repository/snapshots/org/apache/archiva/archiva-webapp/2.2.1-SNAPSHOT/archiva-webapp-2.2.1-SNAPSHOT.war

Cache-Control: max-age=86401, public

Set-Cookie: JSESSIONID=rbjr03uzr6j11myt9y01wajhx;Path=/

Via: 1.1 archiva-repository.apache.org

Content-Type: text/plain



Note you got a redirect as response so will be easier using wget to
download the file.

HTH
Olivier
Post by John Cooper
Any ideas why packaging type WAR cannot be found and yet can find and
download packaging type if set to JAR using the API?
Thanks, John.
-----Original Message-----
From: John Cooper
Sent: 21 April 2015 17:06
Subject: Search does not return .war artifacts
Hi, I've successfully deployed my snapshot .war files to Archiva 2.2.0
and I can wget/curl them using the direct http address. When I try to use
the API to retrieve the latest version only POMs with packaging=jar are
found (version 0.1-SNAPSHOT) and download ok.
curl -i -o s3-util.jar -L -u user:password
http://localhost/restServices/archivaServices/searchService/artifact?r=snapshots&g=com.company.backup&a=s3-util&v=LATEST
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
100 333k 100 333k 0 0 3538k 0 --:--:-- --:--:-- --:--:-- 3538k
Trying the same for a war packaging type doesn't find anything
curl -i -o s3-util.war -L -u user:password "
http://localhost/restServices/archivaServices/searchService/artifact?r=snapshots&g=com.company.backup&a=s3-util&v=LATEST
"
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
Am I missing something?
Thanks, John.
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
John Cooper
2015-04-28 08:19:27 UTC
Permalink
I didn't see any examples of that and assumed it was defined in the POM!

Thanks, John.

-----Original Message-----
From: Olivier Lamy [mailto:***@apache.org]
Sent: 24 April 2015 23:59
To: ***@archiva.apache.org
Subject: Re: Search does not return .war artifacts

Hi,
You must force packaging to war (i.e p=war)
Sample:

curl -I "
https://archiva-repository.apache.org/archiva/restServices/archivaServices/searchService/artifact?r=snapshots&g=org.apache.archiva&a=archiva-webapp&v=LATEST&p=war
"

HTTP/1.1 307 Temporary Redirect

Date: Fri, 24 Apr 2015 22:56:24 GMT

Server: Jetty(8.1.14.v20131031)

Expires: Thu, 01 Jan 1970 00:00:00 GMT

Location:
https://archiva-repository.apache.org/archiva/repository/snapshots/org/apache/archiva/archiva-webapp/2.2.1-SNAPSHOT/archiva-webapp-2.2.1-SNAPSHOT.war

Cache-Control: max-age=86401, public

Set-Cookie: JSESSIONID=rbjr03uzr6j11myt9y01wajhx;Path=/

Via: 1.1 archiva-repository.apache.org

Content-Type: text/plain



Note you got a redirect as response so will be easier using wget to download the file.

HTH
Olivier
Post by John Cooper
Any ideas why packaging type WAR cannot be found and yet can find and
download packaging type if set to JAR using the API?
Thanks, John.
-----Original Message-----
From: John Cooper
Sent: 21 April 2015 17:06
Subject: Search does not return .war artifacts
Hi, I've successfully deployed my snapshot .war files to Archiva
2.2.0 and I can wget/curl them using the direct http address. When I
try to use the API to retrieve the latest version only POMs with
packaging=jar are found (version 0.1-SNAPSHOT) and download ok.
curl -i -o s3-util.jar -L -u user:password
http://localhost/restServices/archivaServices/searchService/artifact?r
=snapshots&g=com.company.backup&a=s3-util&v=LATEST
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
100 333k 100 333k 0 0 3538k 0 --:--:-- --:--:-- --:--:-- 3538k
Trying the same for a war packaging type doesn't find anything
curl -i -o s3-util.war -L -u user:password "
http://localhost/restServices/archivaServices/searchService/artifact?r
=snapshots&g=com.company.backup&a=s3-util&v=LATEST
"
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
Am I missing something?
Thanks, John.
--
Olivier Lamy
http://twitter.com/olamy | http://
Olivier Lamy
2015-04-29 01:25:00 UTC
Permalink
Hi,
This LATEST redirect is really new (last release I believe)

Olivier
Post by John Cooper
I didn't see any examples of that and assumed it was defined in the POM!
Thanks, John.
-----Original Message-----
Sent: 24 April 2015 23:59
Subject: Re: Search does not return .war artifacts
Hi,
You must force packaging to war (i.e p=war)
curl -I "
https://archiva-repository.apache.org/archiva/restServices/archivaServices/searchService/artifact?r=snapshots&g=org.apache.archiva&a=archiva-webapp&v=LATEST&p=war
"
HTTP/1.1 307 Temporary Redirect
Date: Fri, 24 Apr 2015 22:56:24 GMT
Server: Jetty(8.1.14.v20131031)
Expires: Thu, 01 Jan 1970 00:00:00 GMT
https://archiva-repository.apache.org/archiva/repository/snapshots/org/apache/archiva/archiva-webapp/2.2.1-SNAPSHOT/archiva-webapp-2.2.1-SNAPSHOT.war
Cache-Control: max-age=86401, public
Set-Cookie: JSESSIONID=rbjr03uzr6j11myt9y01wajhx;Path=/
Via: 1.1 archiva-repository.apache.org
Content-Type: text/plain
Note you got a redirect as response so will be easier using wget to download the file.
HTH
Olivier
Post by John Cooper
Any ideas why packaging type WAR cannot be found and yet can find and
download packaging type if set to JAR using the API?
Thanks, John.
-----Original Message-----
From: John Cooper
Sent: 21 April 2015 17:06
Subject: Search does not return .war artifacts
Hi, I've successfully deployed my snapshot .war files to Archiva
2.2.0 and I can wget/curl them using the direct http address. When I
try to use the API to retrieve the latest version only POMs with
packaging=jar are found (version 0.1-SNAPSHOT) and download ok.
curl -i -o s3-util.jar -L -u user:password
http://localhost/restServices/archivaServices/searchService/artifact?r
=snapshots&g=com.company.backup&a=s3-util&v=LATEST
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
100 333k 100 333k 0 0 3538k 0 --:--:-- --:--:-- --:--:-- 3538k
Trying the same for a war packaging type doesn't find anything
curl -i -o s3-util.war -L -u user:password "
http://localhost/restServices/archivaServices/searchService/artifact?r
=snapshots&g=com.company.backup&a=s3-util&v=LATEST
"
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
Am I missing something?
Thanks, John.
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
Loading...