spotter
spotter

Reputation: 1216

prevent eclipse from cleaning up generated files

so I've seen this

How to prevent Eclipse from cleaning the bin folder for every build?

but I have a different problem. (i.e. if it was just resources, I could use that ability to copy them into place each time).

I'm generating files (ala sqlite databases) and they are getting cleaned up. I could move them around (and probably will eventually), but for now I want them within this structure for developing purposes.

is there no way to prevent eclipse from deleting these files (it doesn't seem to happen all the time, perhaps just on build error?), as I really need them to persist.

Upvotes: 1

Views: 1086

Answers (2)

kostja
kostja

Reputation: 61538

This is a solution for a different problem, but I think it would help here ;)

When generating resource files, (including DB files) do not put them into the /bin folder, especially if they are not going to change with every build, put them in a subfolder of your /src folder.

I have done so for webservice stubs, version numbers and other resources and regard it as the best practice.

If, however, you should decide to stick to your practice, take a look at the eclipse-generated build.xml file and modify it, making ant remove only the files you don't want.

Upvotes: 1

spotter
spotter

Reputation: 1216

I think the answer is in preferences

Java->Compiler-Building->Scrub output folders when cleaning project (i.e. not set, will hopefully find out soon).

Upvotes: 0

Related Questions