有没有办法让 WTP + M2Eclipse 与“war:inplace like”一起工作。配置?

发布于 2024-08-20 10:49:34 字数 658 浏览 5 评论 0原文

我尝试使用 M2Eclipse、WTP 和 Tomcat 5.5 服务器配置。 如果您的 web 应用程序包含许多文件,那么在 wtp.deploy 目录中发布类 + Web 资源会非常耗时。此外,发布操作很容易出错,因为我有许多 Maven 模块作为依赖项。我试图找到一种有偏见但更快的方法来使用 WTP。

中的 Java 源

  • 使用src/main/java
  • src/main/resources

以及默认的 maven 输出目录

  • target/classes

中的 Web 资源,

  • 以及src/main/webapp

我想让 WTP 以这种方式与 Tomcat 服务器一起工作:

  1. M2Eclipse 负责 构建(无事可做)
  2. 无发布阶段:
    • WTP 指向 Maven 类构建输出(不知道如何执行此操作?)
    • WTP 直接指向网络资源(可能会调整文档库)
  3. WTP 考虑我对类或 Web 资源所做的任何更改(不确定是否可以在不重新启动 tomcat 的情况下进行类?)

是否可能或应该转移到 maven jetty 插件? 感谢任何帮助:)

I try to work with M2Eclipse, WTP and a Tomcat 5.5 server configuration.
Publication of classes + web resources in wtp.deploy directory seams very time consuming if your webapp contains many files. Furthermore publishing operation can be prone to error as I have many maven modules as dependencies. I try to find a biaised-but-faster way to use WTP.

With Java sources in

  • src/main/java
  • src/main/resources

with default maven output directory

  • target/classes

And web resources in

  • src/main/webapp

I want to make WTP work with a Tomcat server this way :

  1. M2Eclipse is responsible of the
    build (nothing to do)
  2. No publication phase :
    • WTP points to maven classes build output (don't know how to do this ?)
    • WTP points directly to the web resources (possible tweaking the docbase)
  3. WTP take into account any change I do either on classes or web resources (not sure it's possible for classes without restarting tomcat ?)

Is it possible or should I move to maven jetty plugin ?
Any help is apreciated :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

人间不值得 2024-08-27 10:49:34

您想要的可能是“服务模块而不发布”设置,以允许 tomcat 直接访问 eclipse 生成的资源。

在服务器视图中,双击服务器名称,例如“Tomcat v6.0 ...”,设置位于“服务器选项”标题下。

在调试模式下启动 tomcat 可以启用热代码替换。

来源: http://www.eclipse.org/ forums/index.php?&t=msg&goto=523599

What you want is probably the "Serve modules without publishing" setting to let allow tomcat straight access to the eclipse-generated resources.

In the servers view, double click the server name, e.g. "Tomcat v6.0 ...", the setting is under the "Server Options" heading.

Starting tomcat in debug mode enables hot code replace.

Source: http://www.eclipse.org/forums/index.php?&t=msg&goto=523599

執念 2024-08-27 10:49:34

我认为 WTP 不可能以这种方式运作。 WTP 与 Tomcat 一起工作的方式是在工作区中创建一个与您的项目同步的暂存目录/项目(我相信它是增量的)。因此,WTP 负责复制文件并跟踪修改的资源和类。

如果你想避免这种情况,那么使用 WTP 就没有多大意义,你可以坚持使用 Jetty runner。

I don't think it is possible to make WTP work that way. The way WTP work with Tomcat is it creates a staging directory/project in workspace that it synchronizes with your project (I believe it is incremental). So, the WTP does all the copying files around and tracking modified resources and classes.

If you want to avoid this, there isn't much sense to use WTP and you can just stick to Jetty runner.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文