Micho Rizo Micho Rizo - 1 year ago 139
Java Question

Maven build doesn't include hibernate cfg.xml or hbm.xml files

I'm building and executable-jar but the jar doesn't include the cfg or hbm hibernate files. My pom file contains the following:



I'm using the following to build it:

mvn clean package shade:shade

I get errors that my hibernate cfg and hbm files cannot be found.

Any ideas? I've burned many BTUs on this already. Thanks in advance.

Answer Source

put those files in src/main/resources maven takes everything in package from resources

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download