当前位置:网站首页>Ant Usage Summary (II): description of related commands
Ant Usage Summary (II): description of related commands
2022-06-23 06:00:00 【linchaolong】
stay ant Installation directory manual Directory is ant Description document , open index.xml, Click on Using Apache ant There are instructions .
Related command description
Specify profile
project
target
property
import
condition
<property name="a" value="aaa" />
<!--
<property name="b" value="bbb" />
-->
<!-- If the property is set b Then the value is ${b}, Otherwise, it's worth ${a}-->
<condition property="val" value="${b}" else="${a}">
<!-- Determine whether the specified attribute is set -->
<isset property="b" />
</condition>propertyfile
<propertyfile file="auto.prop">
<!-- preservation auto.umeng.channel=${a} To the file -->
<entry key="auto.umeng.channel" value="${a}" />
</propertyfile>copy
delete
move
javac
java
<classpath>
<pathelement location="xxx.jar" />
<pathelement path="classpath" />
</classpath>
</java>
jar
if
<!-- If the condition holds , Call print -->
<if>
<!-- Judge whether the specified attribute value is true -->
<!--
<istrue value="${a}" />
-->
<!-- Determine whether the specified attribute is set -->
<!--
<isset property="prop"/>
-->
<!-- Determine if two values are equal -->
<equals arg1="${channel}" arg2="2" />
<then>
<antcall target="print" />
</then>
</if>script
<script language="javascript">
<![CDATA[
project.setProperty("time",Math.floor((new Date()).getTime()/1000));
]]>
</script>Time stamp
<tstamp>
<format property="time"
pattern="yy.M.d.HHmm" />
</tstamp>Add custom jar To ant Of classpath
<!-- add to ant-contrib-1.0b3.jar To classpath -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${env.ANT_ROOT}\lib\ant-contrib-1.0b3.jar" />
</classpath>
</taskdef>ant Implementing iterations in
download ant-contrib, And will ant-contrib-1.0b3.jar Copy the document to ANT The installation directory .
Download address :
channel = ${channel}

Replace the specified string
| < | < | Less than no. |
| > | > | More than no. |
| & | & | and |
| ' | ' | Single quotation marks |
| " | " | Double quotes |
边栏推荐
猜你喜欢

Real MySQL interview questions (XXVI) -- didi 2020 written examination questions

jvm-05. garbage collection

True MySQL interview question (21) - Finance - overdue loan

金融科技之高效办公(一):自动生成信托计划说明书

Redis cache penetration solution - bloom filter

ant使用总结(一):使用ant自动打包apk

HierarchyViewer工具找不到 HierarchyViewer位置

jvm-01.指令重排

Three most advanced certifications, two innovative technologies and two outstanding cases, Alibaba cloud appeared at the cloud native industry conference

jvm-03.jvm内存模型
随机推荐
Excel sheet column number for leetcode topic resolution
The official artifact of station B has cracked itself!
SQL表名与函数名相同导致SQL语句错误。
Pat class B 1023 minimum decimals
Activity启动模式和生命周期实测结果
使用链表实现两个多项式相加和相乘
MySQL面试真题(二十一)——金融-贷款逾期
jvm-04.对象的内存布局
【数据库备份】通过定时任务完成MySQL数据库的备份
iNFTnews | 加密之家从宇宙寄来的明信片,你会收到哪一张?
vant weapp日历组件性能优化 Calendar 日历添加min-date最小日期页面加载缓慢
jvm-03.jvm内存模型
jvm-05. garbage collection
【Cocos2d-x】自定义环形菜单
Use of visdom
PAT 乙等 1021 个位数统计
Pyinstaller 打包pyttsx3 出错
ant使用总结(二):相关命令说明
Pat class B 1009 C language
PAT 乙等 1022 D进制的A+B