aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes When using Maven, why do I need ejb-jar.xml, web.xml and application.xml? 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 "When using Maven, why do I need ejb-jar.xml, web.xml and application.xml?" Watch "When using Maven, why do I need ejb-jar.xml, web.xml and application.xml?" New topic
Author

When using Maven, why do I need ejb-jar.xml, web.xml and application.xml?

Iarla O'Riada
Ranch Hand

Joined: Oct 06, 2012
Posts: 83

From what I'm reading, these deployment descriptors define where classes and dependencies go. Maven manages dependencies too though. Does Maven have scope at this level? It doesn't make sense to me that it's not enough to just define your packages at the top of each class and then let Maven do the rest.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

Those descriptors are used at runtime by the container, and Maven is not running at that time (Maven runs at build time). That is why there are needed (though in more recent versions of Java EE they are optional - the container can easily learn the necessary information by scanning the classes).


JBoss In Action
Iarla O'Riada
Ranch Hand

Joined: Oct 06, 2012
Posts: 83

Thanks Peter Johnson, that helps a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: When using Maven, why do I need ejb-jar.xml, web.xml and application.xml?