-1

I have always (for the purposes of vhost configuration in apache and tomcat) deployed my web app into tomcat as follows by extracting a tar.gz file which is built by ant;

tomcat/webapps/myApp/ROOT/<application>

and so this is what production expects.

Having recently moved to maven for the build system for same app, I'm finding it impossible to achieve the above with my war to the point where I'm starting to think I've got the wrong approach. I want my war to explode with a top level ROOT directory such as;

ROOT  
|- META-INF  
|- WEB-INF  
|- other folders

Is it possible to tweak the war builder plugin to accomplish this?

4

1 回答 1

1

.war 文件在内部具有已定义的结构,而您尝试生成的文件不适合该结构。

需要考虑的一些选项:

  1. 像使用它们一样使用war 文件,即您有一个具有顶级WEB-INF目录的文件。
  2. 改用程序集插件并手动生成您的结构
  3. 可能:查看.ear文件,这些文件结合了多种.war和额外的资源。
于 2014-11-06T10:41:02.613 回答