比如,如果property selectTask1的值为true时执行task1,当selectTask1的值为false时执行task2,
不知道ant是否支持这样的功能,感谢各位高人指点:)
不知道ant是否支持这样的功能,感谢各位高人指点:)
解决方案 »
- 生成帮助文档时出项的错误,有哪位大侠可以支招???
- 今天打开MyEclips 剪贴和粘贴就报很异常的错误。
- 发起讨论,项目中建立数据库是否需要建立主外键关系
- 网上浏览报错net.jforum.exceptions.DatabaseStartupException: Error while trying to star
- database driver driver class not found求解决办法
- 急!!!!!!如何在TOMCAT中增加二个service?
- 怎么解决?ClassNotFoundError : com.microsoft.jdbc.sqlserver.SQLServerDriver
- jbuilder7+weblogic7+sqlserver2000如何实现动态查询
- 请问怎样可以将用jdom从xml文件中读取出来的数据转换为中文(gb2312)
- java, 继承与依赖ReentrantLock, 在使用方法上的区别?
- [☆★☆★☆★☆★]互斥机制方案[☆★☆★☆★☆★]
- 现在公司做手机oa,比较闲,想搞点j2ee的兼职,有美工,哪里接业务?
<!--就是如果你在CMD里面直接打ant 就执行task-all --> <target name="task-all">
<antcall target="task1"/>
<antcall target="task2"/>
</target> <target name="task1">
<property name="xxxxx" value="xxxxxxxx"/>
<property name="xxxxxx" value="xxxxxxxxx"/>
<antcall target="build"/> <!--比如你task1任务需要完成build -->
<antcall target="configure"/> <!--比如你task1任务需要完成configure-->
</target><target name="task2">
<property name="xxxxx" value="xxxxxxxx"/>
<property name="xxxxxx" value="xxxxxxxxx"/>
<antcall target="build"/> <!--比如你task1任务需要完成build -->
<antcall target="configure"/> <!--比如你task1任务需要完成configure-->
</target> <target name="build">
<!-- 这里写build里面需要做点什么东西 -->
</target> <target name="configure">
<!-- 这里写configure里面需要做点什么东西 -->
</target>
</project>如果你需要执行task1 and task2 就这样 ant 或者 ant task-all
如果要执行task1 执行ant task1
如果要执行task2 执行ant task2
<target name="xxx">
<if>
<equals arg1="${xx.xx}" arg2="true">
<then>
<ant target="xxx">
</then>
<else>
<ant target="xxx">
</else>
</if>
</target>
好像是这么写,忘光了
用 ant的 判断标签,值用一个.peoperties保存你的选项。
<property name="xxxxx" value="xxxxxxxx"/>
<property name="xxxxxx" value="xxxxxxxxx"/>
<antcall target="build"/> <!--比如你task1任务需要完成build -->
<antcall target="configure"/> <!--比如你task1任务需要完成configure-->
</target>把antcall加到target里面