是否可以设置 Eclipse WTP 来部署 WAR,而不是复制目标目录?
我在 Tomcat 上运行的核心应用程序正在部署 webapps 本身。它从部署位置获取战争,进行一些处理并将其扩展到 webapps 目录中,tomcat 完成其余的工作...
我只需要 eclipse WTP 来用于 JVM 的 hotswap / jdwp ...所以我决定尝试一下。但我不知道该怎么做。 WTP 只需将目标目录复制到 webapps 中即可。
编辑:这是一个 Maven 项目,具有 m2eclipse wtp 支持
my core application running on Tomcat is deploying webapps itself. It gets the war from deploy location, does some processing and expands it into webapps directory and tomcat does the rest...
I need eclipse WTP only for JVM's hotswap / jdwp ... So I decided to try that out. But I can't figure out how to do that. WTP just copy over the target directory into webapps.
EDIT: It's a maven project, with m2eclipse wtp support
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定我是否完全理解您的问题,但如果您希望 tomcat 不要扩展
context.xml
中的 war juat 设置unpackWAR=false
I am not sure that i totally understand your question but if you want tomcat not to expand the war juat set
unpackWAR=false
in thecontext.xml
jdwp 或热代码替换无论如何都可以工作。它可以在 WTP 中工作,也可以在远程调试设置中工作 - “catalina.sh jpda run”并连接到它。
我认为这是不可能的。
您也可以这样做:
您可能还注意到我包含了 tomcat 的 juli 日志管理器,以便所有正常的 Web 应用程序配置都能按预期工作并在 Eclipse 控制台中工作,这也非常好。
在工作目录字段中选择“其他”并输入 /bundles/tomcat-6.0.x/bin。
在“类路径”选项卡上,删除“用户条目”下的所有条目,然后选择“添加外部 JAR...”。
选择位于 /bundles/tomcat-6.0.x/bin 中的 3 个 jar。
在“源”选项卡上,确保列表中既有“默认”也有您的项目。
您可以选择在此处添加您正在处理的任何插件项目,以及添加 jsp java 类的路径(通常
为 /bundles/tomcat-6.0.x/work/Catalina/localhost/_)。至少在“在收藏夹菜单中显示”下进行调试和运行。
jdwp or Hot Code Replacement is working no matter what. It works in WTP and also in the remote debugging setting - "catalina.sh jpda run" and connecting to it.
I don't think it is possible out of the box.
Also you can do something like this:
You may also notice that I included tomcat's juli log manager so that all the normal web app configurations work as expected and in the Eclipse console, which is also very nice.
In the Working directory field choose "Other" and enter /bundles/tomcat-6.0.x/bin.
On the Classpath tab, remove any entries under User Entries and then choose "Add External JARs...".
Select the 3 jars located in /bundles/tomcat-6.0.x/bin.
On the Source tab make sure that you have both Default, as well as your project in the list.
Optionally here you can add any plugin projects that you are working on, as well as adding the path to the jsp java classes (typically /bundles/tomcat-6.0.x/work/Catalina/localhost/_)
On the Common tag choose at least Debug and Run under "Display in favorites menu".