'copyfiles'是一项标准的蚂蚁任务吗?

Yuv*_*dam 2 ant netbeans

我有一个NetBeans项目,我试图从命令行手动编译ant.在安装了NetBeans的同一台机器上运行时,它可以完美运行.

但是,如果我ant在中央持续集成服务器上运行(未安装NetBeans),则它会在<copyfiles>任务上失败:

BUILD FAILED
/var/lib/jenkins/workspace/project_name/nbproject/build-impl.xml:697: Problem: failed to create task or type copyfiles
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.
Run Code Online (Sandbox Code Playgroud)

目标是自动生成的build-impl.xml,看起来像这样:

<target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
    <copyfiles files="${file.reference.some_dependency.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
</target>
Run Code Online (Sandbox Code Playgroud)

当我查看蚂蚁手册时,copyfiles甚至不是一个合适的蚂蚁任务.那么这是什么一回事?

如何在没有安装NetBeans的计算机上运行此操作?

Yuv*_*dam 6

根据这个建议,我验证了依赖项,实际上lib/CopyLibs目录没有在我们的源代码控制仓库中进行版本控制.这就是我的本地环境能够编译的原因,但CI服务器却没有.

将依赖项添加到类路径后 - org-netbeans-modules-java-j2seproject-copylibstask.jar特别是 - ant构建成功.

从个人角度来说,我发现NetBeans需要一个外部依赖来完成一项任务 - 这很简单 - 作为标准ant任务存在,这是荒谬的.