archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Lamy <ol...@apache.org>
Subject Re: Uploading artifacts using the REST API of Archiva 1.4
Date Wed, 29 May 2013 04:32:06 GMT
2013/5/29 Lothar Werzinger <lothar@tradescape.biz>

> On Tue, May 28, 2013 at 7:02 PM, Olivier Lamy <olamy@apache.org> wrote:
>
>> Hi,
>> Deploying mean only using PUT to the correct uri.
>> No need of rest api :-).
>>
>
> That's not what I can observe:
>
> Archiva (1.4) *Upload Artifact* page does multiple REST calls as defined
> in
> http://localhost:8080/#rest-docs-archiva-ui/resource_FileUploadService.html(see attached
wireshark screen shot).
> [image: Inline image 2]
>
> It is my understanding that it uses a
> *POST* call to */restServices/archivaUiServices/fileUploadService* call
> for each uploaded file
> and a
> *GET* call to */restServices/archivaUiServices/fileUploadService/save*
> /internal/test/bbb/0.1-SNAPSHOT/jar
> to actually store the uploaded artifacts with the metadata presented in
> the *save* call
>

Yes I know a bit this part :-)

But the upload screen have different use case !!!!
It's a ui with the features of adding more than one file. So once the file
is added to the ui it is added and saved in the user session for be really
saved in archiva when the user will confirm the full upload.

So don't use this as a sample if you want upload files to Archiva
programmatically.

Just use PUT to the uri as simply as maven do when deploying that will save
your time.


>
> As I wrote earlier the call to *save *does not return any valuable data.
> Not even a failure indication if one tries to save a SNAPSHOT artifact to a
> repository that has not been configured for snapshots. Actually if one uses
> the upload page of a freshly unzipped Archiva 1.4 one can upload an
> artifact with a SNAPSHOT version to the internal repository (as seen in the
> screen shot) and after doing that when one browses the repository get's an
> error message (on the top of the page) that reads  *managed repo is
> configured for release only* After that the repository is unusable as I
> have found no way to get rid of the erroneously stored snapshot artifact.
>
> IMHO Archiva should prevent this save action and return an error
> indication why it could not save it.
>

Agree. If you have a bit of time please create an issue for this.


>
> Thanks
> --
>
> Lothar Werzinger
>
> Principal Architect
>
> Tradescape, Inc. - Enabling Efficient Digital Marketplaces
>
> +1-650-931-6719 (direct)
>
> +1-800-697-6068 (main) Ext. 116
>
> lothar@tradescape.biz
>
> http://www.tradescape.biz
>
>
>
>
> This message and any attachment (the "message") is intended solely for the
> addressees and is confidential. If you receive this message by mistake,
> please delete it and notify the sender immediately. Any use not
> in accordance with its purpose, any out-spread or disclosure, either as a
> whole or partially, is prohibited except with formal approval. Internet
> cannot guarantee the integrity of this message, therefore Tradescape will
> not be liable for the message if modified.
>
> -
>



-- 
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message