• 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

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

 
Ranch Hand
Posts: 51
Hibernate Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Gene Hilpert
Ranch Hand
Posts: 51
Hibernate Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks - I will do that
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic