简体   繁体   English

如何在Eclipse中使用glassfish适配器进行热部署

[英]How can I hot deploy using the glassfish adapter in Eclipse

Has anyone gotten the glassfish v3 adapter to work with Eclipse without restarting every time there's a code change? 有没有人得到glassfish v3适配器与Eclipse一起工作,而不是每次代码更改都重新启动? I tried to set this up but the adapter "republishes" every time I change any file, which is very annoying. 我尝试设置它,但每次更改任何文件时适配器“重新发布”,这非常烦人。 It takes up to 3 minutes and locks up my machine for a second. 它需要3分钟,并锁定我的机器一秒钟。

I must remember to constantly stop the adapter before making any changes. 我必须记住在进行任何更改之前不断停止适配器。 I'd settle for just disabling this "feature", but even if I uncheck "publish change immediately" this behavior still happens. 我决心只是禁用这个“功能”,但即使我取消选中“立即发布更改”,这种行为仍然会发生。

I'm using the latest version of the glassfish adapter and tried with eclipse 3.5 and the 3.6 milestone builds.... 我正在使用最新版本的glassfish适配器并尝试使用eclipse 3.5和3.6里程碑版本....

What setup is everyone using if you have glassfish v3 as your server? 如果您将glassfish v3作为服务器,那么每个人都在使用什么设置? Is there any way to actually get the hot deploy feature to work correctly? 有没有办法真正让热部署功能正常工作?

I just did a test and configuring the adapter to Never publish automatically works as expected: 我刚做了一个测试并将适配器配置为Never never自动按预期工作:

替代文字

With this setup, I have to publish changes manually. 通过此设置,我必须手动发布更改。

I'm using Eclipse 3.5 with the latest version of the GlassFish v3 adapter. 我正在使用Eclipse 3.5和最新版本的GlassFish v3适配器。 It just works. 它只是有效。

There is 'hack' that I use and works fine with maven, eclipse & GF4 hot deployment. 我使用'hack'并且可以正常使用maven,eclipse和GF4热部署。 Navigate inside your workspace where you have you xhtml project. 在您拥有xhtml项目的工作区内导航。 open .project file edit 打开.project文件编辑

<buildCommand>
   <name>org.eclipse.m2e.core.maven2Builder</name>
   <arguments></arguments>
</buildCommand>

Modify to: 修改为:

<buildCommand>
   <name>org.eclipse.m2e.core.maven2Builder</name>
   <triggers>incremental,</triggers>
   <arguments></arguments>
</buildCommand>

It works just fine for, but it might cause weird build issues (haven't tried for a long time so can't really say so use with case.) 它可以正常工作,但它可能会导致奇怪的构建问题(很长一段时间都没有尝试过,所以不能真的说这样用。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM