Just to give some background:
Apache Ant is a Java-based build tool. For more information on Apache Ant, you can visit Apache Ant. The recent version is Apache Ant is Ant 1.71 and can be downloaded from here.
We can add a else attribute in the conditionTask for making a choice.
Coming back to the error that you have encountered:
Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the "else" attribute.
This can happen if you have Apache ant with a version less than 1.65
So, Make sure to update your ant to a version more than 1.65. Recent version, as I mentioned is, 1.71.
Does this fix the problem that you encountered with ant?
If yes, Great.
No, then continue reading. We have other fix available for Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the "else" attribute.
If you get this error even though you have the ant 1.65 or more, then the following information may be helpful.
-> Check whether the file is marked executable.
You can check the permissions of the file using "ls -l
->when you don't have execute permissions, mark the file as executable for you/your group.
->Then continue to run. It should run now.
you can mark the file as executable by executing the command,