• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Iarla O'Riada
Ranch Hand
Posts: 87
Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Iarla O'Riada
Ranch Hand
Posts: 87
Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter Johnson, that helps a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic