Ant build.xml需要用户输入,但Eclipse无法打开SWT小部件

时间:2015-01-07 10:32:18

标签: java eclipse ant

我有一个Antbuild脚本,我从Eclipse插件运行,执行以下操作:

<echo message="About to request user input in popup dialog box..." />
<input message="Please enter the production version number.This will determine where the JAR file is published.${line.separator}${line.separator}(For example, if you enter 1.2.3.4 the JAR will be published to [${deploy.prod.path.prefix}1.2.3.4${deploy.prod.path.postfix}])${line.separator}" addproperty="deploy.prod.version"/>
<echo message="You entered version ${deploy.prod.version}" />

以前打开的Eclipse对话框如下(隐式使用SWT,我自己没有明确使用SWT):

enter image description here

但是现在我已升级到Eclipse Luna 4.4.1,输入调用失败,并显示以下内容:

[echo] About to request user input in popup dialog box...

BUILD FAILED
java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Listener

我认为SWT是Eclipse中不可或缺的一部分,所以没有必要单独安装 - 以前有人看过这个吗?

由于

0 个答案:

没有答案