Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML files are not packaged in war

 
John Eric Hamacher
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:

I have a project in which XML configuration files are found together with java files in various packages, just like you would if you were using Hibernate or Struts 2.

When I package my project into a war file using mvn package or mvn install, the resulting war does not contain my configuration files. Why not? How can I tell Maven to transfer these files to the corresponding package in WEB-INF\classes?

Thanks
Eric
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try placing the files into src/main/resources. They should then be placed into WEB-INF/classes.
 
John Eric Hamacher
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I have found if I recreate my package structure in resources, these configuration files will merge with my class files in WEB-INF/classes.

Thanks again

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic