是“copyfiles”标准ant任务? [英] Is 'copyfiles' a standard ant task?
问题描述
我有我试图从命令行蚂蚁
手工编译NetBeans项目。如果已安装的NetBeans在同一台机器上运行,它完美的作品。
I have a NetBeans project that I'm trying to compile manually from command-line ant
. When running on the same machine that has NetBeans installed, it works flawlessly.
但是,如果我跑蚂蚁
中央持续集成服务器(未安装的NetBeans)没有上一个< copyfiles>
任务:
However, if I run ant
on a central continuous integration server (no NetBeans installed) it fails on a <copyfiles>
task:
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.
目标是在自动生成的 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>
当我看着蚂蚁手动, copyfiles
甚至不是一个正确的ant任务。所以,这是怎么回事?
When I look at the ant manual, copyfiles
isn't even a proper ant task. So what's up?
我怎样才能得到这个没有NetBeans安装的机器上运行?
How can I get this to run on a machine with no NetBeans installation?
推荐答案
建议,我核实了相关性,确实在的lib / CopyLibs
目录是的不的版本在我们的源代码控制回购。这就是为什么我的本地环境是能够编译,但是CI服务器没有。
Per this advice, I verified the dependencies, and indeed the lib/CopyLibs
directory was not versioned in our source control repo. That's why my local environment was able to compile, but the CI server wasn't.
添加依赖到classpath之后 - ORG-的NetBeans模块-java的j2seproject-copylibstask.jar
明确 - 蚂蚁构建成功
After adding the dependency to the classpath - org-netbeans-modules-java-j2seproject-copylibstask.jar
specifically - the ant build succeeded.
就我个人而言,我觉得很荒谬的NetBeans需要为任务的外部依赖 - 平凡 - 存在一个标准蚂蚁
任务
On a personal note, I find it absurd that NetBeans needs an external dependency for a task that - trivially - exists as a standard ant
task.
这篇关于是“copyfiles”标准ant任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!