Ant 蚂蚁条件导入
如果设置了属性,是否可以在ant的build.xml中导入文件,如果没有,则不导入 除了使用ant contrib if任务,还有其他方法吗 谢谢是的,你可以。 例如:Ant 蚂蚁条件导入,ant,Ant,如果设置了属性,是否可以在ant的build.xml中导入文件,如果没有,则不导入 除了使用ant contrib if任务,还有其他方法吗 谢谢是的,你可以。 例如: <target name="importFile" depends="myProperty.check" if="myPropertyIsSet"> <echo>Import my file here</echo> </target> <target name="m
<target name="importFile" depends="myProperty.check" if="myPropertyIsSet">
<echo>Import my file here</echo>
</target>
<target name="myTarget.check">
<condition property="myPropertyIsSet">
<and>
<!-- Conditions to check if my property is set. -->
</and>
</condition>
</target>
在这里导入我的文件
.这不起作用。从ant 1.7开始,您不能在目标内部使用导入。这一定是最高级别的任务哎哟,我的错。另外,导入任务的可选属性对您来说还不够吗?