问题:无法创建任务或键入workspacePreferenceFile

时间:2019-02-04 03:58:46

标签: eclipse ant

我对于使用ANT构建Eclipse(Oxygen)项目非常陌生。我正在使用以前在RAD环境中编写的现有build.xml文件。

这是我的workspacePreferenceFile;

<workspacePreferenceFile
  preferenceFileName="${rad.preferences.filename}"
  useEclipsePrefs="true"
  overwrite="true" />

这是我的${rad.preferences.filename}

compiler.problem.unusedImport=ignore
compiler.compliance=1.8
compiler.source=1.8

这是错误

BUILD FAILED
Problem: failed to create task or type workspacePreferenceFile
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

有什么主意吗?谢谢!

1 个答案:

答案 0 :(得分:1)

workspacePreferenceFile仅在IBM RAD中可用,在标准Eclipse中不可用。

Eclipse首选项文件使用普通的Java属性文件格式,因此您可以使用标准的Ant property任务。