在liferay eclipse tomcat中控制catalina_home

发布于 2024-10-14 04:40:41 字数 423 浏览 6 评论 0原文

我有一个开发系统(linux-Liferay6-tomcat6-Eclipse Helios),我在SVN中对其进行版本控制。当我为新开发人员推出相当于全新安装的内容时,tomcat 服务器的路径是错误的,因为它们被写在不同的地方作为反映我的桌面的绝对路径。

在我看来,我可以修改catalina.sh或startup.sh来解决这个问题,或者可能是它的一部分,但我宁愿有一个让Tomcat不受干扰的修复。我还可以要求开发人员设置 CATALINA_HOME,但这会破坏他们可能拥有的任何其他 tomcat 安装(事实上是我自己的情况)。

例如,也许有一个自定义 Ant 脚本可以计算出路径并仅为运行此特定 Tomcat 的 shell 设置 CATALINA_HOME?有没有办法在 Eclipse IDE 中执行此操作,我看过但不太明白?

有想法吗?

约翰·费舍尔

I have a development system ( linux-Liferay6-tomcat6-Eclipse Helios) that I have version-controlled in SVN. When I roll it out for a new developer in what amounts to a fresh installation, the paths for the tomcat server are wrong because they were written in various places as absolute paths reflecting my desktop.

It looks to me that I could modify catalina.sh or startup.sh to fix this problem, or part of it maybe, but I'd rather have a fix that leaves Tomcat unmolested. I could also require developers to set CATALINA_HOME, but that would break any other tomcat installations they might have ( my own situation in fact).

For instance, maybe a custom Ant script that figures out the path and sets CATALINA_HOME just for the shell thats running this particular Tomcat? Is there a way to do this in the Eclipse IDE, I looked but don't quite see it?

Ideas?

John Fisher

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

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

发布评论

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

评论(1

-黛色若梦 2024-10-21 04:40:41

如果您使用 ant 和 liferay 插件 sdk,则应该在插件 sdk 的根文件夹中创建一个 build.${username}.properties 文件。 (将 ${username} 替换为您登录操作系统的名称)。在此,您覆盖应用程序服务器的位置,例如 tomcat。看一下 build.properties。尽管您不应该更改此文件,但您可以复制一行有趣的行(注意:它是为 tomcat 预先配置的)并将其用于适当的设置。

这样您就可以为每个用户设置所需的值。

服务器(如果您需要在 Eclipse 中启动它)将在每个 Eclipse 实例中创建,彼此独立。用于 eclipse 的 Liferay IDE 插件可以帮助您进行设置。

由于我预计服务器会被每个人频繁修改,因此我从不在版本控制中共享服务器“项目”,而是严格将其保留在本地。如果丢失也很容易重新创建。

If you're using ant and the liferay plugins sdk, you're supposed to create a build.${username}.properties file in the root folder of the plugins sdk. (substitute ${username} with the name you log in to your OS). In this you override the location of your appserver, e.g. tomcat. Take a look at build.properties. Though you're not supposed to change this file, you can copy the one interesting line (note: it's preconfigured for tomcat) and use it for the appropriate settings.

This way you'll have a per-user setting for the required value.

The server (if you require to start it in eclipse) is to be created in each eclipse instance, independent of each other. The Liferay IDE plugins for eclipse can help you with setting this up.

As I expect the server to be modified by everybody on a frequent basis, I never share the server "project" in version control, but keep it strictly local. It's easily recreated if lost.

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