This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring 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
Don't get me started about those stupid light bulbs.
subject: WAR error - Unexpected element "{}war"
It's not a secret anymore!