首页 > 解决方案 > Problem: failed to create task or type workspacePreferenceFile

问题描述

I'm quite new with ANT to build an Eclipse (Oxygen) project. I'm using existing build.xml file which previously written in RAD environment.

Here is my workspacePreferenceFile;

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

Here is my ${rad.preferences.filename}

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

And here is the error

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.

Any idea? Thanks!

标签: eclipseant

解决方案


workspacePreferenceFile is only available in IBM RAD, it is not in standard Eclipse.

Eclipse preferences files use the normal Java property file format so you may be able to use the standard Ant property task.


推荐阅读