一些澄清有关如何蚂蚁拷贝一些文件放到一个文件夹? [英] Some clarification about how ant copy some files into a folder?

查看:271
本文介绍了一些澄清有关如何蚂蚁拷贝一些文件放到一个文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是pretty新的蚂蚁(我从来到的Maven和Ant对我来说是一场噩梦!)

I am pretty new to ant (I came from Maven and Ant is a nightmare for me !!!)

我有这样的目标:

<target name="linuxdriver"
    description="Linux Driver">
    <copy file="${deps.linuxdriver.dir}/${deps.linuxdriver.name}" tofile="${project.datadir}/${deps.linuxdriver.name}"/>
    <copy file="${deps.linuxdriver.dir}/${deps.linuxdriver.name}" tofile="${project.deploy}/data/${deps.linuxdriver.name}"/>
    <chmod perm="+x" file="${project.datadir}/${deps.linuxdriver.name}"/>
    <chmod perm="+x" file="${project.deploy}/data/${deps.linuxdriver.name}"/>
</target>

和我也有一个属性文件,其中有definied的变量(?命名变量)在previous蚂蚁code使用的,特别是我有:

and I have also a property file in which there is definied the "variable" (are named variable?) used in the previous ant code, specifically I have:

project.datadir = $ {BASEDIR} /数据

project.deploy.dir =发布

project.deploy = $ {BASEDIR} {/../$} project.deploy.dir

现在我有些疑惑:

1)什么重新presents的 $ {} BASEDIR ?一个特定的目录?什么?

1) What represents ${basedir}? A specific directory? What?

2)使用previous信息究竟是什么将这些文件复制(使用两个目标文件夹复制文件......到文件标签)?

2) Using the previous information what exactly are the two destination folder in which the files are copied (using the "copy file...to file" tag)?

推荐答案

BASEDIR的这个概念在Ant手册中有描述:

That concept of basedir is described in the ANT manual:

  • Built-in properties
  • Writing a simple Buildfile

它通常设置为从运行构建(可覆盖)的目录。

It's normally set to be the directory from where you run the build (can be overridden).

如果您需要查看的属性是如何解决的,考虑调试模式

If you need to see how properties are resolved, consider running your build in debug mode

这篇关于一些澄清有关如何蚂蚁拷贝一些文件放到一个文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆