我正在使用cruisecontrol框架进行夜间构建。
目前我试图将一些文件夹设置为readonly =“false”
2011-05-18 11:40:17,089 [Thread-23] WARN ScriptRunner - C:\builds\nightly_build.xml:30: Problem: failed to create task or type attrib
2011-05-18 11:40:17,089 [Thread-23] WARN ScriptRunner - Cause: the class org.apache.tools.ant.taskdefs.optional.windows.Attrib was not found.
2011-05-18 11:40:17,089 [Thread-23] WARN ScriptRunner - This looks like one of Ant's optional components.
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - Action: Check that the appropriate optional JAR exists in
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - -C:\builds\lib
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - -C:\Documents and Settings\admin\.ant\lib
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - -a directory added on the command line with the -lib argument
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner -
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - Do not panic, this is a common problem.
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - The commonest cause is a missing JAR.
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner -
2011-05-18 11:40:17,105 [Thread-23] WARN ScriptRunner - This is not a bug; it is a configuration problem
错误如上所示。
当我使用<attrib>
:
<attrib readonly="false">
<dirset dir="C:/Work/6.70_Extensions/NightlyBuild" />
</attrib>
我该如何解决这个问题?以及如何找到我拥有的ANT版本?
答案 0 :(得分:0)
attrib任务来自Ant 1.6 - 见Ant Manual
使用内置属性ant.version检查您的Ant版本:
<echo>${ant.version}</echo>
答案 1 :(得分:0)
你在$ ANT_HOME / lib中有ant-nodeps.jar吗?这是包含Attrib类的jar,所以它需要在你的Ant类路径上。