In Eclipse, how can I exclude some files (maybe ba

2019-01-31 18:32发布

问题:

I'm developing a Java application using Eclipse. My project has two source directories that are both built and then some files are copied into the output folder. From the output directory I then run my application and all works well.

However, I keep having these warnings:

Snapshot from Problems tab in Eclipse http://www.freeimagehosting.net/uploads/128c1af93f.png

Anyone know how to get rid of these warnings? Maybe by excluding some files, maybe based on the .svn extension or filename, from the build process? If so, how would I go about excluding those?

回答1:

Have you tried to add

**/.svn/

to the Exclusion patterns at the Source preferences of the project's build path settings?



回答2:

You could also try installing the Subversion plugin (Subclipse) for Eclipse.



回答3:

Sure, that easy: at Project Properties -- Java Build Path you can add exclusion filters on every source folder. There, you can add an exclusion pattern as *.svn



回答4:

That sounds like your building process is using versionned directory within your subversion workspace.

Should you not have your 'output' folder and/or your 'tst' folder be made 'private' ? (that is without any .svn, and ignored by subversion)



回答5:

Right click on the source file > Build Path > Exclude.