its now ok I found the problems in my code..
One last question...Except from uploading the jar file, shouldn't I upload
the corresponding .pom file to the same directory?
Thank you very much for your effort!
--
View this message in context:
http://maven.40175.n5.nabble.com/Deploy-artifact-progr
I still can not upload using the following code...any help would be valuable
String webPage = "http://myServer.com";;
String name = "admin";
String password = "admin";
Yes, as I said, that's what URLConnection.getOutputStream() is for.
And don't forget to invoke URLconnection.setDoOutput(true) in advance.
On Wed, Apr 20, 2011 at 2:44 PM, kgiannou wrote:
> ok done with the authentication..
>
> Shouldn't I somehow put the contents of the jar file to be uploaded t
ok done with the authentication..
Shouldn't I somehow put the contents of the jar file to be uploaded to my
request?
--
View this message in context:
http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315695.html
Sent from the Maven - Users mailing list archive at Nabbl
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
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 examp
Thank you both for your quick and informative answers! I will try it and let
you know
--
View this message in context:
http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315178.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---
I believe you should have a look at Aether, which is the repository API.
Or, depending on the repo manager you're using you could use some
proprietary interface. If you're using Nexus, it has a REST API.
/Anders
On Wed, Apr 20, 2011 at 09:43, kgiannou wrote:
> As a separate step, but no with c
Question is, whether you really want to use Maven in that case.
Using Maven is the proper thing to do, if you want to be able to
deploy to multiple targets by just specifying a different URL, as in
scp://... or https://
If you have a fixed target (like a Nexus repository), it is much more
lik
As a separate step, but no with command line but with Java code if possible
:)
--
View this message in context:
http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315136.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---
As part of the build process or as a separate step?
As a separate step you could use deploy:deploy-file.
/Anders
On Wed, Apr 20, 2011 at 09:29, kgiannou wrote:
> Hi,
>
> I want to upload an artifact with Java code but without having the
> distributionmanagement tag in the settings.xml or in pom
11 matches
Mail list logo