Create an instance of java.net.URL, add user name and password as
described in [1], call setMethod("PUT") on the URLconnection, set
doOutput to true and write the file to the output stream.

1) 
http://www.avajava.com/tutorials/lessons/how-do-i-connect-to-a-url-using-basic-authentication.html


On Wed, Apr 20, 2011 at 1:11 PM, kgiannou <kgian...@iti.gr> wrote:
> Hi again :)
>
> I have seen this post
> http://maven.40175.n5.nabble.com/Re-Looking-for-help-on-interacting-with-Nexus-programmatically-upload-files-tt132165.html
>
> but I dont know how to add authentication headers and how to add the jar
> file to be uploaded to the request.
>
> Do you have any concrete example?
>
> thank you very much
>
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315497.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
I Am What I Am And That's All What I Yam (Popeye)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to