覆盖 WAR 类目录 [英] Overriding WAR classes directory

查看:28
本文介绍了覆盖 WAR 类目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您使用 Ant 通过 war 任务创建 WAR,则(如 here) 它将自动在 WAR 中创建一个 WEB_INF/classes/ 目录.我想将此生成的 classes/ 目录的名称更改为 classpath/ 并且无法弄清楚如何.

If you use the Ant to create your WAR via the war task, then (as explained here) it will automatically create a WEB_INF/classes/ directory in the WAR. I would like to change the name of this generated classes/ directory to, say, classpath/ and can't figure out how.

如果可能的话,有人会提供代码示例以及说明如何执行此操作的文档的参考(我很好奇!).谢谢!

If this is possible, would someone provide a code example as well as a reference to the documentation that shows how to do this (I'm curious!). Thanks!

推荐答案

您不应将 classes 的名称更改为其他名称.

You shouldn't change the name of the classes to something else.

WAR 文件的目录结构是标准的,它为应用程序的所有 .class 文件定义了一个 WEB-INF\classes

The directory structure of a WAR file is standard and defines a WEB-INF\classes for all the .class files of your application

这篇关于覆盖 WAR 类目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆