【问题标题】:Refresh eclipse projects via command line通过命令行刷新eclipse项目
【发布时间】:2012-04-15 11:05:19
【问题描述】:

如何通过命令行刷新eclipse项目?

(相当于包视图中的右键单击 > 刷新)
在 Maven 夜间构建之后,我需要从一批中刷新 Eclipse。

【问题讨论】:

  • 检查这个问题:stackoverflow.com/a/6049245/207764 从命令行刷新,你的意思是当你启动 Eclipse 时?或者如果你已经打开了 Eclipse?
  • @Fredrik:我的意思是当我已经打开了一个 Eclipse,但我对两者都感兴趣。
  • @Fredrik:问题 stackoverflow.com/a/6049245/207764 不是来自命令行。

标签: eclipse command-line batch-file


【解决方案1】:

我知道有 ant 任务可以做到这一点:

<eclipse.convertPath fileSystemPath="/workspace/org.example.project"
                     property="resourcePath"/>
<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>

至于从命令行运行这个,作为最坏的情况,你可以把它粘在一个ant脚本中调用eclipse antrunner应用程序:

eclipse -nosplash -application org.eclipse.ant.core.antRunner -f 刷新.xml

【讨论】:

  • 我有一个错误:BUILD FAILED C:\...\refresh.xml:2: Unexpected element "{}eclipse.convertPath" {antlib:org.apache.tools.ant} eclipse.convertPath
  • 我也收到了,怎么解决?顺便说一句,如果这很重要,我在 linux 中
猜你喜欢
  • 2015-08-11
  • 1970-01-01
  • 1970-01-01
  • 2011-08-19
  • 1970-01-01
  • 1970-01-01
  • 2019-04-27
  • 1970-01-01
  • 2020-03-27
相关资源
最近更新 更多