gpt4 book ai didi

java - 使用 eclipse 在已安装的 Glassfish 上调试 Maven Web 应用程序

转载 作者:行者123 更新时间:2023-11-29 04:00:21 27 4
gpt4 key购买 nike

我的问题是关于使用 eclipse 在已安装的 glassfish 上调试 Web 应用程序。

如果我使用 eclipse 创建一个 web 项目,那么 eclipse 将允许在已安装的 glassfish 应用程序服务器上部署和调试应用程序。但是,如果我使用 Maven 原型(prototype)创建了一个 Web 项目,则 Eclipse 不允许我调试该应用程序。

我可以使用 maven 的 jetty 或 tomcat 插件调试应用程序,但我需要在已安装的 glassfish 上调试应用程序。基本上我有以下内容 1) 使用 maven 原型(prototype)创建的 Web 应用程序 2) eclipse 集成开发环境 3) Glassfish 已经安装在 Eclipse IDE 之外

我遇到了 maven 的 glassfish 插件,但据我所知,它不是用于调试应用程序的。

请告诉我您的建议。

谢谢

最佳答案

If I create a web project using eclipse then eclipse will let be deploy and debug application on an already installed glassfish application server. However, if I have created a web project using maven archetype, eclipse does not let me debug the application.

这不是真的。您是否使用Maven Eclipse Plugin (提供 WTP support ) m2eclipse(从 m2eclipse Extras 安装了可选的 Maven Integration for WTP),您可以将在 Eclipse 外部创建的项目部署到现有的“服务器”(您可以在调试模式下启动),只要您正确导入它(导入... > 现有项目到工作区 如果你使用前者,Import... > Maven Projects 如果你使用后者)。

Basically I have followings 1) Web application created using maven archetype 2) Eclipse IDE 3) Glassfish which is already installed outside of Eclipse IDE

我对多个项目使用相同的设置,没有任何问题(并且可以在我本地安装的 GlassFish 服务器上调试它们)。

I came across maven's glassfish plugin but as far as I understood it is not for debugging the application.

不需要额外的 Maven 插件,如果您遵循正确的步骤,您可以只依赖您的 IDE。

关于java - 使用 eclipse 在已安装的 Glassfish 上调试 Maven Web 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3967203/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com