Deploying binaries from Bamboo to Nexus repository
Asked Answered
N

1

7

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!!!

Needle answered 26/8, 2014 at 21:47 Comment(1)
advice: when asking a question try to make it short and clear. people don't like reading "walls of text".....Skill
T
1

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.

Transistor answered 27/8, 2014 at 13:4 Comment(1)
Thanks very much for your help in this. If I do the bundle using a bash script task instead of the maven assembly Plugin (To avoid making changes to POM), then will mvn Deploy work? Again thanks a ton for your quick response.Needle

© 2022 - 2024 — McMap. All rights reserved.