When I run my Ant build it fails with the following exception:
Unexpected element "{}target" {antlib:org.apache.tools.ant}target
I’m using Eclipse 3.4.2.
Please let me know what I’m missing here.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I can reproduce this problem by putting a
targetoutside theprojectelement that is required in ant build files. The error indicates that there is a fault in your build file – something (atargetelement) in the wrong place.This build throws that error:
Whereas this does not:
In the full error message you should get a line number to guide you to the point in the file needing attention: