我们通过 Maven 进行了复杂的设置,其中不同的项目被打包为 war,然后相互叠加。
今天我观看了创建可以直接在 GlassFish 中运行的动态 Web 项目的教程。您编辑文件并按“保存”,所做的更改就会在 GlassFish 中看到。
由于我们的设置很复杂,我目前必须运行一些构建脚本来将文件复制到本地安装的 Tomcat。有没有办法直接在应用程序服务器上运行我的源文件(位于几个不同的 /src 文件夹中)?这样我就可以编辑文件并直接在应用程序服务器中查看它们的更改。
We have a complicated setup via Maven, where different projects are packaged as wars then overlayed on each other.
Today I watched a tutorial of creating a Dynamic Web Project that can run directly within GlassFish. You edit the files press save, and the changes are seen in GlassFish.
Since our setup is complicated, I currently have to run some build scripts to copy files to a locally installed Tomcat. Is there some way to run my source files (that are in several different /src folders) directly on an application server? So that I can edit files and see their change directly in the Application server.
发布评论
评论(2)
将相关 Web 应用程序的
元素的reloadable
属性设置为true
。另请参阅 Tomcat 6.0 配置参考 - 上下文容器然而,它不像 Glassfish 那样快速高效,但也足够了。
Set the
reloadable
attribute of the<Context>
element of the webapplication in question totrue
. See also the Tomcat 6.0 Configuration Reference - The Context ContainerIt's however not as blazing fast and efficient as Glassfish does, but it may suffice.
由于 Maven 是将项目粘合在一起的粘合剂,这是不可能的。我正在手动部署战争,然后编写许多脚本来推送文件以更新我正在处理的文件。
Due to maven being the glue holding the project together, this was not possible. I am manually deploying a war then writing many scripts to push files in to update files I'm working on.