Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven-built WAR file not containing .hbm.xml files

 
Pieter Bosman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,

I'm a bit new to Maven so I wanted to ask a question.
As described in the topic, I'm in need of creating a war that contains a bunch of .hbm.xml files (for my Hibernate DAO layer). On top of that I'm still using Maven for all my dependencies etc.

I would love to be able to use "mvn package" or some other maven command to create my war.
So far the war I create does not contain the .hbm.xml files.

Is there anyone who can point me in the right direction as to how to solve this issue?

Do I need to create a seperate Ant-build.xml file (as described in this topic: http://www.coderanch.com/t/453789/Ant-Maven-Other-Build-Tools/unable-create-War-using-Ant )
If yes, how to link to it from within my maven project?
If no, is there another way to do this?

regards,
Pieter
 
Pieter Bosman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got a solution which turned out to be very easy.

I needed to move my .hbm.xml files into the src.main.resources folder instead of my src.main.java folder.

sorry for disturbing your thoughts

regards,
Pieter
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pieter, welcome to Java Ranch!
And thank you for posting the solution that you found.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic