【发布时间】:2012-04-12 03:10:52
【问题描述】:
我有一个看似正确但复制不正确的 Ant 复制任务(在 Jenkins 构建调用的 Maven 脚本中定义)。任务定义为
<copy todir="./Virgo/config" overwrite="true" verbose="true">
<fileset dir="${config.folder}">
<include name="*.properties, *.xml" />
</fileset>
</copy>
当我运行任务时,我可以看到指定了正确的目录,但是复制任务没有选择任何文件。源目录和目标目录都存在,我没有收到任何错误。我看到的是
14:52:40 [INFO] Executing tasks
14:52:40 [DEBUG] getProperty(ns=null, name=ant.reuse.loader, user=false)
14:52:40 [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
14:52:40 [echo] Copying files from ../com.x.y.z.container.build/config...
14:52:40 fileset: Setup scanner in dir C:\Jenkins\workspace\container-build\com.x.y.z.container.build\config with patternSet{ includes: [*.properties, *.xml] excludes: [] }
14:52:40 [INFO] Executed tasks
我尝试将文件添加到源目录,使源文件比目标目录中的文件更新,甚至删除目标目录中的文件。困扰我的是,fileset 似乎没有匹配任何文件,即使路径是正确的。有没有人见过这种行为?
【问题讨论】: