fruitJuice
fruitJuice

Reputation: 1241

convert maven local repository to remote repository

I have a repository directory under .m2 that I want to use as a remote repository (-Dmaven.repo.remote=http://remotehostname/repo) to other hosts. I tried just to expose the directory .m2/repository/ under Apache as http://remotehostname/repo, the directory is fully visible via HTTP, but Maven doesn't seem to be reading from the exposed repo. For various reasons, I do not want to add this new remote repo to settings.xml; limit it to -Dmaven.repo.remote

What do I need to do to convert a local repo under .m2 as a remote repo?

Upvotes: 7

Views: 1422

Answers (2)

Raghuram
Raghuram

Reputation: 52645

Further to @Perception's answer, you can look at Nexus Command Line tool, which can help convert your local repo to nexus repo

Upvotes: 2

Perception
Perception

Reputation: 80603

I haven't heard of any maven repository manager that can simply mirror your .m2 folder (which is just a local repository). You need to install and configure repository management software ... there are many free, open source ones, I recommend Artifactory or Nexus.

Nexus does fit very closely with your requirements since it uses a file based repository, and the file layout matches with the local repo layout.

Upvotes: 1

Related Questions