This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes  WAR error - Unexpected element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark " WAR error - Unexpected element "{}war"" Watch " WAR error - Unexpected element "{}war"" New topic

WAR error - Unexpected element "{}war"

sue sen

Joined: Jun 23, 2006
Posts: 3
Hi all,

I'm using Apache Ant version 1.6.5 and I get the error Unexpected element "{}war".

My code is as follows -

<war destfile="myapp.war" webxml="../Webroot/WEB-INF/web.xml">
<fileset dir="../Webroot"/>
<fileset dir="../Webroot/admin"/>
<fileset dir="../Webroot/conf"/>
<fileset dir="../Webroot/css"/>
<fileset dir="../Webroot/images"/>
<fileset dir="../Webroot/resources"/>
<fileset dir="../Webroot/scripts"/>
<lib dir="../WebRoot/WEB-INF/lib"/>
<classes dir="../WebRoot/WEB-INF/classes"/>

My build.xml exists in the root directory in a folder called buid

Any help will be appreciated. Hurry please

sue sen

Joined: Jun 23, 2006
Posts: 3
All this fixed. Thanks to anyone who may have stopped by
I agree. Here's the link:
subject: WAR error - Unexpected element "{}war"
jQuery in Action, 3rd edition