自动化Tomcat添加到Eclipse

时间:2011-09-12 13:14:20

标签: eclipse perl tomcat

我正在尝试编写一个脚本(Perl),它将自动为Eclipse下的Java项目添加Tomcat服务器。

项目通过SVN签出,我希望,一旦通过SVN下载项目,就可以运行一个脚本,自动配置项目的剩余部分。在这种情况下,我需要找到如何编辑哪些Eclipse的配置文件以自动添加Tomcat服务器。实际上脚本也会修改其他配置文件,但是我很难找到要编辑的文件以及如何添加Tomcat。

欢迎提出任何见解,谢谢。

2 个答案:

答案 0 :(得分:2)

有一个名为Escripts的eclipse插件。您可以创建类似脚本的xml来自动执行向导操作等操作。我试图检查文档,但Escripts的主页为我提供了http 500(http://escripts.sf.net)。我已经给作者写了一封邮件,如果他回答,我会告诉你的。更新站点看起来像工作(取消选中按组分类以查看未分类的插件):http://escripts.sf.net/updates

您可以在http://escripts.svn.sourceforge.net/viewvc/escripts/trunk/net.sf.escripts.tests/src/net/sf/escripts/tests/

找到一些示例

您应该在脚本中输入的是一个id为org.eclipse.wst.server.ui.new.server的向导。包含它的插件是org.eclipse.wst.server.ui。看一下该插件中的plugin.xml。没有文档,这是我记得的。

答案 1 :(得分:0)

您是否在Eclipse工作区中尝试了以下文件?

.metadata.plugins \ org.eclipse.core.runtime.settings \ org.eclipse.jdt.core.prefs .metadata.plugins \ org.eclipse.core.runtime.settings \ org.eclipse.jdt.launching.prefs .metadata.plugins \ org.eclipse.core.runtime.settings \ org.eclipse.wst.server.core.prefs .metadata.plugins \ org.eclipse.core.runtime.settings \ org.eclipse.jst.server.tomcat.core.prefs

我将以下文件放入eclipse的新实例中,并在Server-> Runtime Environment下创建了Tomcat服务器。

http://dl.dropbox.com/u/9591144/StackOverflow/org.eclipse.jdt.core.prefs http://dl.dropbox.com/u/9591144/StackOverflow/org.eclipse.jdt.launching.prefs http://dl.dropbox.com/u/9591144/StackOverflow/org.eclipse.jst.server.tomcat.core.prefs http://dl.dropbox.com/u/9591144/StackOverflow/org.eclipse.wst.server.core.prefs