문제

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

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top