• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: https://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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic