Uploading artifacts without maven or Nexus UI

View: New views
5 Messages — Rating Filter:   Alert me  

Uploading artifacts without maven or Nexus UI

by Deimos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

HI all, I'd like to use Nexus to store artifacts not produced by a Maven build (so without using the deploy-file goal). Do you know if there is any way to upload in a programmatic manner (i.e. through a script) an artifact to a Nexus repository? Many thanks

Re: Uploading artifacts without maven or Nexus UI

by Damian Bradicich :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We do this in our Integration tests using java and httpclient, see the deployUsingGavWithRest and deployUsingPomWithRestReturnResult methods here
 
 
Of course you can check out the whole nexus-test-harness-launcher to see the other classes used, where this functionality is used, etc.
 
Hope this helps
 
Damian
On Wed, Nov 4, 2009 at 12:20 PM, Deimos <fasano.andrea@...> wrote:
HI all, I'd like to use Nexus to store artifacts not produced by a Maven build (so without using the deploy-file goal). Do you know if there is any way to upload in a programmatic manner (i.e. through a script) an artifact to a Nexus repository? Many thanks

View this message in context: Uploading artifacts without maven or Nexus UI
Sent from the Nexus Maven Repository Manager Users List mailing list archive at Nabble.com.


Re: Uploading artifacts without maven or Nexus UI

by Anders Hammar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Why can't you use the deploy-file goal and maven from a script?
From http://maven.apache.org/plugins/maven-deploy-plugin/usage.html (see "The deploy:deploy-file Mojo") I quote:
"The deploy:deploy-file mojo is used primarily for deploying artifacts to which were not built by Maven."

mvn deploy:deploy-file -Dfile=... etc.

/Anders

On Wed, Nov 4, 2009 at 18:20, Deimos <fasano.andrea@...> wrote:
HI all, I'd like to use Nexus to store artifacts not produced by a Maven build (so without using the deploy-file goal). Do you know if there is any way to upload in a programmatic manner (i.e. through a script) an artifact to a Nexus repository? Many thanks

View this message in context: Uploading artifacts without maven or Nexus UI
Sent from the Nexus Maven Repository Manager Users List mailing list archive at Nabble.com.


Re: Uploading artifacts without maven or Nexus UI

by Deimos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thank you very much Damian, it seems to be exactly what I was looking for.

Damian Bradicich wrote:
We do this in our Integration tests using java and httpclient, see the
deployUsingGavWithRest and deployUsingPomWithRestReturnResult methods here

http://svn.sonatype.org/nexus/trunk/nexus/nexus-test-harness/nexus-test-harness-launcher/src/main/java/org/sonatype/nexus/test/utils/DeployUtils.java

Of course you can check out the whole nexus-test-harness-launcher to see the
other classes used, where this functionality is used, etc.

Hope this helps

Damian
On Wed, Nov 4, 2009 at 12:20 PM, Deimos <fasano.andrea@gmail.com> wrote:

> HI all, I'd like to use Nexus to store artifacts not produced by a Maven
> build (so without using the deploy-file goal). Do you know if there is any
> way to upload in a programmatic manner (i.e. through a script) an artifact
> to a Nexus repository? Many thanks
> ------------------------------
> View this message in context: Uploading artifacts without maven or Nexus
> UI<http://old.nabble.com/Uploading-artifacts-without-maven-or-Nexus-UI-tp26200577p26200577.html>
> Sent from the Nexus Maven Repository Manager Users List mailing list
> archive<http://old.nabble.com/Nexus-Maven-Repository-Manager-Users-List-f34835.html>at Nabble.com.
>

Re: Uploading artifacts without maven or Nexus UI

by Deimos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, I have same scenarios were the artifact is not deployed using maven, nor maven is present on the machine.

Anders Hammar wrote:
Why can't you use the deploy-file goal and maven from a script?
From http://maven.apache.org/plugins/maven-deploy-plugin/usage.html (see
"The deploy:deploy-file Mojo") I quote:
"The deploy:deploy-file mojo is used primarily for deploying artifacts to
which were not built by Maven."

mvn deploy:deploy-file -Dfile=... etc.

/Anders

On Wed, Nov 4, 2009 at 18:20, Deimos <fasano.andrea@gmail.com> wrote:

> HI all, I'd like to use Nexus to store artifacts not produced by a Maven
> build (so without using the deploy-file goal). Do you know if there is any
> way to upload in a programmatic manner (i.e. through a script) an artifact
> to a Nexus repository? Many thanks
> ------------------------------
> View this message in context: Uploading artifacts without maven or Nexus
> UI<http://old.nabble.com/Uploading-artifacts-without-maven-or-Nexus-UI-tp26200577p26200577.html>
> Sent from the Nexus Maven Repository Manager Users List mailing list
> archive<http://old.nabble.com/Nexus-Maven-Repository-Manager-Users-List-f34835.html>at Nabble.com.
>