Skip to main content

Ant - Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the "else" attribute.

This post is all about this error and on how to resolve this error.

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 /ant"
->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,
"chmod 777 \ant" - "rwxrwxrwx" - universal writable.
or
"chmod 775 \ant" - "rwxrwxr-x" - only owner and the group can write.

Comments

  1. I tried both the solutions: 1. Ant version is 1.7.1 and 2. Executable
    But i am still getting the same error

    ReplyDelete

Post a Comment

Popular posts from this blog

Nokia E51 WLAN Settings

Nokia E51 is a smart phone with almost all the features available in it. It looks really slim and comes in three colors. It has loads of features and highlight of them all is the connection through the Internet through WLAN. You can get a Internet connection from the service provider and ask for the wi-fi router. With the wi-fi router, you can connect to the Internet through various other devices like Laptop, Nokia E51 etc., You will be provided with the password for the WLAN connection and only if you enter the password correctly you will be connected to the Internet through that WLAN. As you may expect, this password will be asked only when you connect to Internet through this WLAN for the very first time. In Laptop/Computer, you have Network settings to identify and modify the settings if wrongly entered. But this is somewhat tricky in case of Nokia E51! In Nokia E51, You have the option of Browse WLAN right at the home page for you. If you have customized for something different, u

Internet not working on laptop - what should you do?

 When the internet is not working, consider looking at the available networks and see if you can switch to any other internet that would work Further, troubleshoot by restarting the modem and the laptop once to make sure there are no issues with either of them. If none of those works, consider contacting your interest service provider to help troubleshoot.

Treasury bonds Vs high yield savings

 You have some additional cash and are looking for the best place to park to get more money from it? If you answered yes, couple of options that you might be considering could be 1. Treasury bonds 2. High yield savings with bank fixed deposits This is especially in United States.  First let’s look at the commonalities: 1. Both are absolutely safe and assured 2. The capital preservation is assured Now, let’s look at when we should look for which one 1. If you could need this money anytime soon (within the next six months to a year or lesser), great option is to choose high yield savings. One option to consider is PayPal savings (which offer 4%+ APY these days.  2. If you don’t need it immediately and consider ways to get the maximum amount in an assured way, you can consider 15 month fixed deposit in certain banks, which offer over 4.65% APY for 15 months. 3. If you think the inflation is going to remain high and want to save with the government, you can choose the treasury bonds as an