Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ant 蚂蚁合并结构_Ant - Fatal编程技术网

Ant 蚂蚁合并结构

Ant 蚂蚁合并结构,ant,Ant,includes=“***.js”/在下面的合并代码中是什么意思形成一个Ant文件 <target name="merge grid"> <echo>${grid.file}</echo> <concat destfile="${grid.file}" fixlastline="yes" append="no"> <fileset dir="${js.src.dir}/dvr/components/grid/" inc

includes=“***.js”/
在下面的合并代码中是什么意思形成一个Ant文件

<target name="merge grid">
    <echo>${grid.file}</echo>
    <concat destfile="${grid.file}" fixlastline="yes" append="no">
    <fileset dir="${js.src.dir}/dvr/components/grid/" includes="**/*.js"/>
    </concat>
</target>

${grid.file}
这一部分又意味着什么:

<target name="merge" depends="merge grid, merge solids"/> 

文件集中的

**/*.js
匹配文件系统中的文件。
**
部分表示“在任何目录中”(在
dir
属性中提到的目录下)。
*.js
匹配任何以
.js
结尾的文件。总的来说,该文件集递归地包含在
${js.src.dir}/dvr/components/grid/
子目录中找到的任何
.js
文件。看见(后面的
/
不是includes模式的一部分,它是XML中fileset元素的结束部分:

<fileset ... attributes ... />

因此,
合并网格
目标将所有
.js
文件连接到一个在属性
网格.file
中定义名称的目标文件中


target
是Ant目标定义的开始,Ant目标是一系列Ant任务,组成构建中的一个独特步骤。
dependens
属性列出了其他必须执行的目标(在本例中为
合并网格
合并实体
)在
合并
目标本身之前。请参阅。

*/.js这是否意味着它将包括网格文件夹中的所有js文件,然后是组件文件夹中的所有js文件,然后是dvr文件夹中的所有js文件。或者它只是指所有js文件,包括网格文件夹内的任何子文件夹,但不包括网格文件夹外的任何js文件。@Chapsterj-
**
表示它是一种递归搜索,将在网格目录下的每个子目录中包含匹配文件。但它不会通过组件和dvr目录递归备份树。