Hosting a shared Maven repository on a remote server may be accomplished with a simple web server such as Apache HTTP server.
This works because most of the resolution and publishing logic of Maven is implemented in the client. That said, it works
only if you know the groupId
and artifactId
to be published, since appropriate directories must be created by hand.
Do consider using more sophisticated server software such as Artifactory or Sonatype Nexus. Below is the 'bare minimum' alternative.
Caution: this example exposes a writable directory without any authentication, and thus assumes a trusted network.