Reputation: 2359
My need is to check two conditions in my ANT Target. If either of them is true the ant target must execute.
<target name="generateArtifacts" if="${generateABC}" or if="${generatePQR}">
...
/>
The above syntax in WRONG. How to make it correct?
Upvotes: 3
Views: 3010
Reputation: 691625
Maybe there's something simpler, but the following would do, I think:
<condition property="artifactsMustBeGenerated">
<or>
<isTrue value="${generateABC}"/>
<isTrue value="${generatePQR}"/>
</or>
</condition>
<target name="generateArtifacts" if="${artifactsMustBeGenerated}">
...
/>
Upvotes: 2