ant中有无逻辑判断的task,以便可以根据不同情况执行不同的task? 定一系列比如 <target name="init" .... <target name="complie".. <target name="deploy"...等等ant initant complieant delpoy加不同执行参数。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 一般是利用property进行的,我写的例子: <!-- 定义一个测试路进是否存在的task,结果输出为 src.present 属性 --> <target name="detect.src.present" > <condition property="src.present" > <and> <available file="${local_src_root}/src" type="dir" /> <available file="${local_src_root}/lib" type="dir" /> <available file="${local_src_root}/conf" type="dir" /> <available file="${local_src_root}/mibs" type="dir" /> <available file="${local_src_root}/data" type="dir" /> <available file="${local_src_root}/sound" type="dir" /> </and> </condition> </target> <!-- 先执行上面的测试,再根据 src.present 属性是否定义,决定是否执行编译 --> <target name="compilesrc" if="src.present" depends="detect.src.present"> <javac ………………> </target> 怎么用httpClient实现和socket一样的数据传递? java 鼠标移动的音效 怎么设置播放次数 这个类 不通过工具执行, 你能想出输出什么内容吗? 说说你的看法! 高手指点一下 关于String的创建 新手问java怎么和sql server连接?通过jdbc-odbc桥 想看书的进来 只限杭州地区 我是新手!!最所的JB是8还是6 在那里有下的 谢谢了 Thinking in Java java运行时出错,向各“同志”求救! 两段小代码连接数据库性能的比较 求教:如何用ClassLoader加载.jar文件中编译好的类
<!-- 定义一个测试路进是否存在的task,结果输出为 src.present 属性 -->
<target name="detect.src.present" >
<condition property="src.present" >
<and>
<available file="${local_src_root}/src" type="dir" />
<available file="${local_src_root}/lib" type="dir" />
<available file="${local_src_root}/conf" type="dir" />
<available file="${local_src_root}/mibs" type="dir" />
<available file="${local_src_root}/data" type="dir" />
<available file="${local_src_root}/sound" type="dir" />
</and>
</condition>
</target> <!-- 先执行上面的测试,再根据 src.present 属性是否定义,决定是否执行编译 -->
<target name="compilesrc" if="src.present"
depends="detect.src.present">
<javac ………………>
</target>