I have jar files for my web application. I need to have those dependency jars in my local maven repository so that I can use them in my applications. It would be nice to run the local maven repo as a container in my development machine.
Build private maven repo using Docker
3.5k Views Asked by Santhosh Tpixler At
2
There are 2 best solutions below
0

I know this an old post, but we've been maintaining an easy-to-use Apache Archiva image for quite some time now. You should try it out if you're looking for something with a very small footprint that is easy to get running.
Archiva certainly isn't the most feature-rich maven repo out there, but it's dead simple, free, and you can run it in k8s quite easily.
That said, I agree with @fırat-kÜÇÜk. Unless you need to self host your maven repo, you really should just use a cloud hosted product. There's nothing easier than a subscription service.
The usual approach (at least for companies) is:
settings.xml
that points to that Nexus.The local repository is then only a cache for your Nexus, no need to run any containers.