*
The moose likes Ant, Maven and Other Build Tools and the fly likes ANT <jar>: How NOT to include META-INF folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ANT <jar>: How NOT to include META-INF folder" Watch "ANT <jar>: How NOT to include META-INF folder" New topic
Author

ANT <jar>: How NOT to include META-INF folder

K Mansoor
Ranch Hand

Joined: Jan 10, 2006
Posts: 52
Hi all- I have been trying to make something (Spring 3 + JPA + Tomcat 7) work without luck since yesterday and after trial and (much) error found that the placement of META-INF was wrong in my war file. I had META-INF (and WEB-INF) at the root:

+mywar
---WEB-INF
---META-INF

apparently it should be :

+mywar
---WEB-INF
-------classes
-------META-INF

My question is how can I make Ant NOT to include a META-INF folder in the root of the war? i tried the options for controlling META-INF behavior, but there is just no way to shut it off, can somebody please help?
Thank you.
Kevin Marcus
Greenhorn

Joined: Jun 27, 2010
Posts: 11
a
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Don't specific any META-INF information to the <war> task. Instead, <copy> your desired information a META-INF directory where your classes are located and then the <war> task will copy the classes ans META-INF to WEB-INF/classes. (I could be more specific if I knew your directory layout and if you would have posted the <war> task you are using.)


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ANT <jar>: How NOT to include META-INF folder