How to use maven local repositories?

Hey there!

I am pretty new to Drone, and I’ve got a question: How can I add maven local repositories to Drone? For context, I have a Java application which uses a maven repository that is only available in maven local. When I run the build.gradle file on my machine, it works, obviously. My problem is, that I want drone to build every push on a branch and gradle build now failes, as Drone cannot find this certain repository in maven local.

How can I add it?

Hello @zFlxw

Can you please clarify, you are running a local maven instance on your laptop? You would like this maven instance available to your Drone runner? Where is your Drone runner running?


right, there is a local maven repository (~/.m2) on my machine. The original problem was, that I had a repository, which was only present in this maven local repository and not on maven central or something.

I kind of found a workaround and just pushed the repository on a private nexus repository manager, so I have access to it, even without that repository being publicly available.

Ah I see.

Yes you would have to make the repository available to the runner somehow, a private nexus repository makes sense.