Question

I'm running the maven repository manager Nexus on Tomcat. When I setup my pom file, my repository URLs all look something like http://myhost/nexus/repo-name. I'd like to get the word "nexus" out of the URL. We're currently transitioning from an older repository manager and now we need to update all of the URLs. However, if we had a generic repository URL like http://myhost/maven-repo/repo-name, then the URL would be independent of the repository manager.

How can I set something like this up on Tomcat? Would I need to setup host name aliases? Or is there an easier way to do this?

Thanks, Jeff

Was it helpful?

Solution

I would use a frontal Apache server (only httpd, not Tomcat) to do that, configured as a reverse proxy.

Apache url rewriting and reverse proxy are easy to configure. With this Apache frontal proxy, you are independant from Nexus, but also from the Tomcat server.

With the same Apache URL, you can move to Archiva on a Glassfish server (for example) transparently for the projects.

OTHER TIPS

Deploy your application in the root folder of Tomcat.

I hope you don't put repository locations into your pom's? You should use settings.xml file instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top