Bamboo and Nexus

Does anyone know how to upload builded jar to nexus in deployment project?

Just add a mvn builder and do mvn deploy - you need to distribute the settings.xml to the agents or have everything in the pom.xml itself.

So that’s the only option? I have a build plan where i got my jar builded, but then i need to call mvn deploy in deploy project which itself will produce artifact, so that’s 2 builds, isn’t it?

If you want to deploy to nexus using a deployment project on Bamboo and reuse the artefact you can use Apache Maven Deploy Plugin – deploy:deploy-file
Otherwise you are right, you can just call mvn deploy in the first place, no need to have a deployment project for that.
The idea of the deployment project is more along the lines of deploying a piece of software to a runtime environment, like a tomcat server, an AWS instance etc…

1 Like

Oh, i see, that’s a good clarification on deployment projects. Thanks a lot though! :slight_smile:
One last question if you don’t mind, what if i use mvn deploy in build plan, would it be available as builded artifact for deployment project to actually deploy it?

That is your choice. All shared artefacts are available to deploy projects, you just have to define the shared artefact for that jar. The jar will normally be there sitting in the target folder (well with mvn you can of course tweak the build in a way so that this statement is not true, but generally speaking).

1 Like