Monday, August 3, 2009

Eclipse doesn't include Hibernate XML HBM files in JAR

Recently we had a problem at work where the JARs created by Eclpise didn't contain the *.hbm.xml files that are required for mapping. After some investigation one of the developers found a setting within Eclipse by doing the following:

1) Click on Window --> Preferences
2) Click on the plus sign next to Java
3) Click on the plus sign next to the compiler option
4) Click on the "Building" option
5) Under the "Output Folder" option there are a list of "Filtered Resources." Take *.xml out of that list.