aspose file tools*
The moose likes Object Relational Mapping and the fly likes hibernate.cfg.xml being deleted from bin on clean in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hibernate.cfg.xml being deleted from bin on clean in eclipse" Watch "hibernate.cfg.xml being deleted from bin on clean in eclipse" New topic
Author

hibernate.cfg.xml being deleted from bin on clean in eclipse

Gene Hilpert
Ranch Hand

Joined: May 22, 2002
Posts: 51

When someone answers this I will most likely have a duh moment.

I have been having this problem since I started with eclipse. I use hibernate and have a hibernate.cfg.xml file in the bin directory. Sometimes when I do a compile and every time I do a clean the hibernate.cfg.xml is deleted from the bin so I have to copy it back to get my project to run. My question is how can I stop it from being deleted? There is a log4j.properties file in the same bin directory that does not get deleted, so there must be a way.
Thanks
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3829

Never put those files in the bin directory. Use src/resources directory depend on your build system. If you use Maven build it automatically copy those config files from resources directory to the build directory. For Ant builds you can customize the target to do the same.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Gene Hilpert
Ranch Hand

Joined: May 22, 2002
Posts: 51

Thanks - I will do that
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hibernate.cfg.xml being deleted from bin on clean in eclipse