Does it make sense to deploy a WAR with a webapp to Maven central repository?

☆樱花仙子☆ 提交于 2019-12-06 06:12:36

I deploy .war files to our internal Archiva Maven repository so that I can pull them down to assembly things like RPMS without having to hand copy files around, same with building assemblies. It also is useful when the .war is something like a service that is generic and may be included in multiple other web app compliations.

That said, Central is probably NOT the place to be deploying .war files to.

Imo, the central repository should contain libraries not applications. It's just for resolving dependencies and maven plugins.

Central is not the right place for this, you should be deploying applications to a local respository. Nexus is fairly easy to setup and is a good place to start: http://nexus.sonatype.org/

There are other alternatives such as Artifacotry http://www.jfrog.com/products.php

Jetty is a great way to make sure things are up and running but during development Tomcat with your IDE's server plugin is just as lightweight.

We have used it once, for a very special case though. We deploy one of our servlet as part of a third-party web application delivered as a .war file. The third-party war in this case is deployed to the central repository. We use it as dependency in our servlet project, download it during the build process, replace the existing WEB-INF/web.xml with our own customized version (that has our servlet declaration), add the servlet class to the war and ship it. Jackrabbit Standalone is an example of an web-app within Jetty. Yes, jetty is lightweight. The source code for Jettification of the standalone can be downloaded from the Jackrabbit's public repository if you want to give it a try. Its mavenized and they build it as bundle so that you can just run the web-app within jetty out of the box.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!