Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Build and deploy maven project from bitbucket into nexus repository oss?

Dennis Schmidt May 6, 2018

Hello,

I am an experienced software developer but pretty new to the process of administrating my own development environment.

I want to know if it is possible to build and deploy my maven projects from my bitbucket repositories into my own nexus repository oss?
My main goal is to use some of my projects (private repositories at the moment) as maven dependencies in other projects, so I dont have to keep everything in one big project.

Is there a way to do this? If so -> how can I do it?

Kind regards

1 answer

0 votes
Jeroen De Raedt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 16, 2018

Hey  @Dennis Schmidt,

This is certainly possible. You basically have to configure to which maven repositories your Pipelines builds have access to. 

In order to achieve that, you have to configure the maven servers you want to access: https://maven.apache.org/settings.html#Servers

There are a couple of different ways to accomplish this.

You canbuild a <private> docker image, based on the Docker image that you want to use that has this configuration included in it. I don't recommend this, because this configuration will also include your username/password for your Nexus repo.

Or (recommended) create a script that runs as the first command of your step, which will configure the repositories for you. I have an example of such a script that I used before: https://bitbucket.org/snippets/jeroendr/aeG5yA 

You will have to update the script to configure your own nexus repositories, and configure $NEXUS_USER and $NEXUS_PASS as secured environment variables. 

Let me know if this helps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events