Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.
×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
Hey @Derektar,
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.