deploy artifacts to the nexus OSS repository

744 views
Skip to first unread message

niristotle okram

unread,
Mar 31, 2015, 6:17:00 PM3/31/15
to nexus...@glists.sonatype.com
can someone point me to a good doc that describes on how to set up for deploying the artifacts to Nexus repositories (SNAPSHOT & RELEASES)? We have a nexus server and 2 other projects are designed to deploy its .WAR files into the snapshot and release folders after they are build by the jenkins. 

I am trying to configure/set-up the third project to do the same under a separate folder of its own. 
  

--
Regards

Manfred Moser

unread,
Mar 31, 2015, 7:14:46 PM3/31/15
to niristotle okram, nexus...@glists.sonatype.com
You can look at the Nexus eval chapter in the docuementation and the related git repo for simple example projects and related setup.



--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/CAPzcO4g6z3gFJTzMQSawtrwyz-1reMpCqgTdRn-yPe0Q9Q%3DTSw%40mail.gmail.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

Ron Wheeler

unread,
Mar 31, 2015, 11:51:58 PM3/31/15
to nexus...@glists.sonatype.com
There are manuals and books on this.

Dozens or hundreds of war file and Jar files are deployed every day to Nexus.

What exactly are your concerns that you need to discuss?

Are you doing anything that thousands of companies and developers have not done already with Nexus?

Ron
--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/CAPzcO4g6z3gFJTzMQSawtrwyz-1reMpCqgTdRn-yPe0Q9Q%3DTSw%40mail.gmail.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwhe...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102

niristotle okram

unread,
Apr 1, 2015, 12:41:05 AM4/1/15
to nexus...@glists.sonatype.com
hey Ron:
i am the +1 th candidate out of the existing 1000s of developers/devops, trying to figure out deploying a .war (or any artifact) into a sonatype nexus oss repository. I have the nexus server setup on my test lab. And i have a project. What i am looking for is the "how to" on making the jenkins upload my .war files to the nexus server's (snapshot / releases) repos. I am guessing the repository details is defined in the maven's settings.xml as well as the projects POM files. 

I have gone seen the article from a red hat guy (can't remember the name) last weekend. but i felt that the details were not very precises for a non developer to understand. Below is what i was following 




As Manfred suggested, i am going to go through the urls again and try me hands again. 









--
Regards
nirish okram

Nikola Milutinovic

unread,
Apr 1, 2015, 3:27:29 AM4/1/15
to nexus...@glists.sonatype.com

Hi Niristotle.

 

If you have never worked with Nexus, then reading the Sonatype book is a must. It is really well explained.

 

In short, this is what you need to do:

 

1.      Create releases repository for your project, choose ID wisely, it will be in the URL

2.      Create snapshots repository for your project, same story on ID

3.      Optional: create a site repository for your project, again, ID matters

4.      Suggested: create a group to map your releases and anything else needed for clients

5.      Create privileges for the repositories and the group

6.      Create role(s) to allow authenticated users to deploy or read repos / groups

7.      Either use LDAP to connect to your ADS or create a nexus local user with one of the desired roles

 

That’s basically it.

 

Nix.

Ron Wheeler

unread,
Apr 1, 2015, 10:34:04 AM4/1/15
to nexus...@glists.sonatype.com

Repo details only go in the settings.xml

Ron

David Hladky

unread,
Apr 2, 2015, 4:38:36 AM4/2/15
to niristotle okram, nexus...@glists.sonatype.com
Hi,

an article, that may be helpful to you: https://developer.jboss.org/docs/DOC-52892 . It explains how to deploy and release for WildFly, but your tasks will be similar.

David Hladky

Ron Wheeler

unread,
Apr 2, 2015, 10:03:46 AM4/2/15
to nexus...@glists.sonatype.com
http://www.baeldung.com/maven-release-nexus
sounds like it might help.
" Overview
In the previous article of this series, we set up a deployment process with Maven to Nexus. In this article, we’ll configure the Release Process with Maven – both in the pom of the project as well as in a Jenkins job."

Ron


On 02/04/2015 4:38 AM, David Hladky wrote:
Hi, 

an article, that may be helpful to you: https://developer.jboss.org/docs/DOC-52892 . It explains how to deploy and release for WildFly, but your tasks will be similar. 

David Hladky



----- Original Message -----
From: "niristotle okram" <nirish...@gmail.com>
To: nexus...@glists.sonatype.com
Sent: Wednesday, 1 April, 2015 12:16:58 AM
Subject: deploy artifacts to the nexus OSS repository

can someone point me to a good doc that describes on how to set up for
deploying the artifacts to Nexus repositories (SNAPSHOT & RELEASES)? We
have a nexus server and 2 other projects are designed to deploy its .WAR
files into the snapshot and release folders after they are build by the
jenkins.

I am trying to configure/set-up the third project to do the same under a
separate folder of its own.




-- 
Ron Wheeler
President
Artifact Software Inc
email: rwhe...@artifact-software.com

niristotle okram

unread,
Apr 6, 2015, 8:02:15 PM4/6/15
to nexus...@glists.sonatype.com

Thanks guys. I still need a little bit of hand holding on the nexus. I have been reading some of the suggested links. i have the maven-3.2.5 installed on the jenkins server. And the 'maven-3.2.5/conf/settings.xml' have the stuff like:

servers,
localRepositories
proxies
mirrors
profiles
repository
pluginRepositories

The entries/parameters on this file are all specific to the nexus server and have nothing specific to the projects (i have 2 projects uploading their artifacts to the same nexus server successfully. I am working to make a 3rd project upload to the same nexus server).


 

So, i see these in the project's pom files which are already uploading/deploying the artifacts to the sonatype nexus OSS server. 

<groupId>com.ab.cdf.ghi</groupId>
<artifactId>123-parent</artifactId>
<version>12.06.3-SNAPSHOT</version>
<name>123.abc.com</name>
<packaging>pom</packaging>
<modelVersion>4.0.0</modelVersion>

The "com.ab.cdf.ghi" (groupId) corresponds to a directory structure inside the RELEASES & SNAPSHOTS folder. Then i see the folder "123-parent" (artifactId) inside the path of the 'groupID'. 

Q: For a new project with a different "groupId" and "artifactId", do i need to manually create the folder structure or the maven deploy will create itself on the nexus server?




Regards, 



--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.



--
Regards
nirish okram

Ron Wheeler

unread,
Apr 7, 2015, 2:30:16 AM4/7/15
to nexus...@glists.sonatype.com
Once you have your settings.xml setup to properly deploy one project to Nexus, you can deploy anything to your Nexus.

You don't have to do anything to Nexus to start a new project. It will look at the GAV of the incoming deployment and put it in the right place.
It is detects a SNAPSHOT coming in it will put it in the SNAPSHOT repo otherwise it goes in with the releases.

Ron


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwhe...@artifact-software.com
Reply all
Reply to author
Forward
0 new messages