之前一直是好的,今天执行JOB时候突然报错:

war:

BUILD FAILED
/ncl/jenkins/jobs/Release_P10_P100103客户分析/workspace/evlt/build.xml:7: The following error occurred while executing this line:
jar:file:/ncl/ci_tools/apache-ant-1.9.2/lib/ant.jar!/org/apache/tools/ant/antlib.xml:37: Problem: failed to create task or type componentdef
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.


Total time: 0 seconds
Build step 'Invoke Ant' marked build as failure
Archiving artifacts
Finished: FAILURE

而在SHELL下直接执行ant是可以成功的。

分析:
[evlt] $ /ncl/ci_tools/apache-ant-1.9.2/bin/ant -file build.xml
Buildfile: build.xml
获取不到实际的BUILD路径,才想和CLASSPATH有关系,将JENKINS 系统设置中的CLASSPATH变量删除,重新测试,OK,一切恢复正常。

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐