Eclipse中的GlassFish(实际)热插拔JSF页面和资源(CSS等) [英] GlassFish (real) hot deployment of JSF pages and resources (CSS etc.) in Eclipse

查看:116
本文介绍了Eclipse中的GlassFish(实际)热插拔JSF页面和资源(CSS等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想知道如何设置 GlassFish 3.1.2 实际热部署,即只是平常的设置

We are wondering how to setup GlassFish 3.1.2 real hot deployment, that is not just the usual setting

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

但是如何使Eclipse GlassFish插件能够静默地推送更改的 XHTML, CSS等文件保存到Eclipse中。

but how to make it possible that the Eclipse GlassFish plugin will silently push changed XHTML, CSS, etc. files to the server as you save the file in Eclipse.

如何正式设置?

再次,我几次测试了这个,热部署刚刚修改的XHTML(/ JSF),保存的CSS文件不起作用。

Again, I tested this several times now, hot-deploying just-changed XHTML(/JSF), CSS files on save just doesn't work.

当设置为不要自动发布保存JSF文件时不会发生任何事情。
设置为资源更改时自动发布 整个webapp重新部署过程被触发(需要30多秒!)。

When setting to Never publish automatically nothing happens when saving a JSF file. When setting to Automatically publish when resources change the whole webapp redeployment process is triggered (taking 30+ seconds!).

Q:

如何在JSF,CSS热部署保存设置使用Eclipse和GlassFish官方的插件指向一个本地的,非内部的 GlassFish 3.1.2

How is JSF, CSS hot deployment on save setup using Eclipse and the official GlassFish plugins pointed to a local, non-internal GlassFish 3.1.2?

你需要在哪里看?进入插件或本地的GF?

Where do you have to look? Into the plugin or the local GF?

什么让整个主题更加令人困惑,有些人让这个工作很容易,请参阅

What makes the whole topic even more confusing is that some people get this to work easily, see http://www.java.net/forum/topic/glassfish/glassfish-plugins/glasfish-plugin#comment-819774

关于非java文件的任何保存将在保存时发布时可见immeditaely活动。

"just about any save of a non-java file will be visible 'immeditaely' when publish on save is active."

不在这里!

这很奇怪,很重要!

推荐答案

我使用的是黑客,使用maven,eclipse和GF4热部署。浏览你的工作区,你有你的xhtml项目。
打开.project文件
编辑

There is 'hack' that I use and works fine with maven, eclipse & GF4 hot deployment. Navigate inside your workspace where you have you xhtml project. open .project file edit

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

修改为:

<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.)

==============我尝试但遇到的另一种解决方法eclipse / maven bug ==========

============== Another workaround that I tried but run into eclipse/maven bugs==========

我设法让这个工作与eclipse。步骤如下:

I managed to get this to work with eclipse. The steps were the following:


  1. 双击glassfish-> expand发布,并确保在资源更改时设置自动发布

  2. 右键单击服务器 - > Glassfish,确保未选中部署的用户Jar Archives

  3. 然后确保已自动取消选择Project-Build

从我可以告诉maven在保存中触摸资源,Glassfish重新启动。
希望它有助于

From what I can tell maven is touching resources on save, so Glassfish restarts. Hope it helps

这篇关于Eclipse中的GlassFish(实际)热插拔JSF页面和资源(CSS等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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