• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Error while running "war" task (Resolved)

 
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am using "war" task to build a WAR file as below


While I am running this build.xml from one of the Eclipse Ganymede dynamic web project, I am getting the following error -
source\build.xml:64: No WEB-INF/web.xml file was added.
If this is your intent, set needxml='false'


I have another web project in the same workspace where the same build.xml file works without any problem.
I am using Ant version 1.7.1.
Any help is highly appreciated.

Thanks,
Amit
 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I have resolved the issue by adding a "mkdir" task inside the "target" mentioned in the earlier post.
The wrong error message is shown by Ant 1.7.1 when "dist" folder was not present in the directory structure. I created the directory manually and then the task ran fine.
Hence I added the "mkdir" in the target so that every time if directory is not present , ant will create the directory.

Regards,
Amit
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to be a bit picky, why you are excluding the WEB-INF and META-INF directory when you copy WebContent



and then you add them from manually

 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I think I did that because I did not want the other content in WEB-INF and META-INF to be copied in final WAR.

regds,
Amit
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic