Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying binaries from Bamboo to Nexus repository

Tags:

nexus

bamboo

Firstly I am new to Nexus. So please bear if it is too noob a question. Let me first explain how our current build/deployment process works.

HOW WE DO IT AT PRESENT:

We have a project that is Maven based. There is a parent POM.xml and two module pom.xmls Each child module POM.xmls create a JAR file each when built. Currently I am doing the build/ deployments manually. I checkout code from SVN to my local machine. I run mvn clean install. I have created a bash script to bundle the 2 Jar files + few other resources (Present just in SVN repo and gets downloaded to local) into a tar.gzip file. Now I SCP this to the app server. Run install scripts that deploys the tar.gzip file.

HOW WE WANT TO DO IT:

We plan to automate the build in Bamboo (Which I have already done). Then the built artifact needs to be uploaded to a Nexus repository (Due to security issues, the SCP task in Bamboo does not work because of establishing SSH connectivity from Bamboo Server to App Server).

MY FIRST HURDLE:

I have created a Bash Script task in Bamboo which does the bundling ( 2 Jars from each child Module POM + resources) to a tar.gzip. This tar.gzip is prersent in a path a/b/c/d on my bamboo machine.

How do I upload this tar.gzip to Nexus Repository?

MY CONFUSION:

I have read about uploading artifacts to Nexus. But I understand it if just 1 jar/ear/war file is created from the build. But we want the bundle. So if I make changes to settings.xml & POM.xml to configure the upload to NEXUS, each JAR file will be uploaded into separate paths in Nexus. And then I have to configure separately to upload the resource files (Not part of build). Is my understanding correct? Please let me know how to proceed with this?

Thanks in advance!!!

like image 925
scm_guy Avatar asked Aug 26 '14 21:08

scm_guy


People also ask

Is Nexus a binary repository?

Binary artifact repository managers are software systems that manage, version, and store binary artifacts. Examples of such repository managers are JFrog Artifactory, and Sonatype Nexus.

How do I push a jar to Nexus repository?

Click on "Browse Repositories," and you'll see a list of repositories. You will want to right click on the "3rd Party" repository and choose "Upload Artifact." You will then see an "Upload Artifact" form. Choose the JAR to upload, then populate the group id, artifact id, version, and other fields.


1 Answers

Use the Maven Assembly Plugin to create an assembly that contains your artifacts and resources, and then your regular maven deploy will deploy it into Nexus.

like image 106
rseddon Avatar answered Sep 25 '22 19:09

rseddon