使用 Eclipse、Tomcat 和 Jetspeed 热部署开发变更

发布于 2024-08-12 11:19:42 字数 217 浏览 3 评论 0原文

我正在开发一个在 Tomcat 上运行的 Jetspeed 门户应用程序,使用带有 Sysdeo Tomcat 启动器插件的 Eclipse IDE 来调试在 Tomcat/Jetspeed 中运行的应用程序。

我想知道如何为此环境启用开发更改的热部署?有谁知道如何配置 Jetspeed 门户 Web 应用程序以从 Eclipse 进行热部署?在网上确实找不到任何有关 Jetspeed 热部署的信息。

I am developing a Jetspeed portal application running on Tomcat, using the Eclipse IDE with the Sysdeo Tomcat launcher plugin to enable debugging of the application running in Tomcat/Jetspeed.

I was wondering how to enable hot deploy of development changes for this environment? Does anyone know how to configure a Jetspeed portal web application to be hot-deployed from Eclipse? Can't really find any information on the net for Jetspeed hot deployment.

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

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

发布评论

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

评论(5

☆獨立☆ 2024-08-19 11:19:42

我通常创建一个 ant 构建文件,松散地基于:

http: //tomcat.apache.org/tomcat-6.0-doc/appdev/build.xml.txt

并使用“安装”/“删除”目标部署到远程 tomcat

类似问题:
从 Eclipse 远程部署 Tomcat webapp

如果您谈论的是仅在您的本地机器 - 你不需要外部插件来 eclipse,
它内置了对 Tomcat 和热重新部署的支持。

I usually create an ant build file, loosely based on:

http://tomcat.apache.org/tomcat-6.0-doc/appdev/build.xml.txt

and use the 'install'/'remove' targets to deploy to a remote tomcat

Similar question here:
Remote deploy Tomcat webapp from Eclipse

If you're talking about only developing on your local machine- you don't need an external plugin to eclipse,
it has built in support for Tomcat and hot redeployment.

情何以堪。 2024-08-19 11:19:42

您可能想看看 jrebel。我一直想自己看一下 - 根据我的理解,jrebel 可以更改源代码,然后能够立即在实时环境(例如 tomcat)中看到结果,而无需重新部署和/或重新启动服务。

You might want to take a look at jrebel. I've been meaning to take a look myself - From my understanding, jrebel makes it possible to make source code changes and then be able to immediately see the results in a live environment (such as tomcat) without redeploying and/or restarting services.

枉心 2024-08-19 11:19:42

从您的问题来看,尚不完全清楚您是否想要部署 Jetspeed Portal 项目或 portlet 应用程序。第一个实际上是常规 Web 应用程序,理论上可以使用 Eclipse WTP 插件进行热部署。
如果您正在开发 portlet 应用程序,则情况会更复杂,因为它们不是直接部署到 Tomcat,而是部署到 Tomcat 中运行的 Jetspeed 部署(实际 /webapps/jetspeed-portal/WEB-INF/deploy )。

我使用的一个技巧是使用 Maven 构建脚本来部署应用程序。之后,您可以将 tomcat 对 portlet 的 web.xml 所做的修改复制到您的 web.xml 中并直接从 Eclipse 进行部署。

From your question it is not entirely clear if you want to deploy your Jetspeed Portal project or a portlet application. The first is in fact a regular web application and theoretically can be hot-deployed using the Eclipse WTP plugin.
If you are developing portlet applications, it is more complicated because they are not deployed to Tomcat directly, but to the Jetspeed deployement running in Tomcat (actual /webapps/jetspeed-portal/WEB-INF/deploy ).

A trick I used is deploying your application using your Maven build script. After that, you can copy the modifications made by tomcat to your web.xml of your portlet into your web.xml and deploy directly from Eclipse.

假装不在乎 2024-08-19 11:19:42

您可以使用内置(在 Java EE 版本中)服务器插件:

  1. 转到 Windows >首选项>服务器>运行时环境并添加您的 tomcat
  2. 尝试使用 publishing,或使用 FileSync插件。在那里,您可以知道项目中的哪些文件夹应该复制(实时)到计算机上的哪个目录(tomcat/webapps/yourapp)。如果您想将项目签入其他人将使用它的存储库,只需多一点努力,文件同步配置就可以独立于机器(仅使用一个参数作为 TOMCAT_ROOT)。
  3. 在调试模式下启动 Tomcat,您就可以对保存的所有内容进行热部署。

我知道使用 FileSync 插件并未被普遍接受,而发布是最常见的选项,但 FileSync 为您提供了重新安排类和资源的额外自由。

You can use the bult-in (in the Java EE version) Servers plugin:

  1. Go to Windows > Preferences > Server > Runtime environments and add your tomcat
  2. Either try using publishing, or use the FileSync plugin. There you can tell which folders from your project should be copied (live) to what directory on your machine (the tomcat/webapps/yourapp). With a little more effort the filesync configuration can be made machine independent (only using one parameter as TOMCAT_ROOT), in case you want to check-in the project to a repository where others will use it.
  3. Start your tomcat in debug mode and you have hot-deploy of everything you save.

I'm aware that using the FileSync plugin is not generally accepted, and publishing is the most common option, but FileSync gives you additional freedom to rearrange your classes and resources.

剪不断理还乱 2024-08-19 11:19:42

显然,它不是所有情况的解决方案,但简单的符号链接可以在许多情况下完成工作,即使在现在允许创建符号链接的 Windows XP 或 Windows 7 中也是如此。

我的解决方案描述于此处

Obviously it is not the solution for all the cases, but a simple symbolic link will do the job for many cases, even in windows xp or windows 7, that now permit the creation of symbolic links.

My solution is depicted here

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