aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven-built WAR file not containing .hbm.xml files 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 "Maven-built WAR file not containing .hbm.xml files" Watch "Maven-built WAR file not containing .hbm.xml files" New topic
Author

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

Pieter Bosman
Greenhorn

Joined: Jun 17, 2009
Posts: 3
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


When all else fails, check for CKI-problems.
Pieter Bosman
Greenhorn

Joined: Jun 17, 2009
Posts: 3
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

Joined: May 14, 2008
Posts: 5845
    
    7

Pieter, welcome to Java Ranch!
And thank you for posting the solution that you found.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven-built WAR file not containing .hbm.xml files