erosten
erosten

Reputation: 107

Eclipse Validation Outside of /src folder

This is my first post on stackoverflow, so I apologize if I do anything incorrectly!

I have a project I've been working on in eclipse 4.6.2 ee neon2. In this workspace folder, I have several other folders such as one that includes my database files, and another called "lib" that includes open source libraries such as joda-time and eclipselink. I'll usually export zip files straight into this "lib" folder, and import the relevant external libraries into eclipselink from this "lib" folder. However, just tonight - I'm not sure how it happened, but eclipse generated some 500 warnings/errors on html/xml files from various open source libraries in the "lib" folder - including readme.html's and so on. I've been unable to find the reason for why they all suddenly appeared. I've tried to disable validation extensively which removes nearly all the errors but I feel that that's a patch up job.

Also note that my program seems to run completely fine, and passes all tests I've written for it. There are no new errors in the src folder, all in that one folder "lib".

My question is what I possibly could have done to make these 500+ errors appear out of thin air? Should eclipse even be generating errors on files outside of the /src folder that is contained in my project directory?

Please let me know where I'm unclear or what I can provide to help things be more clear as I've not had much traditional programming experience and can have trouble phrasing things in the correct way.

Thank you!

-As per the request here are some of the errors it's generating. Note that all the files the errors originate in have not been created by me, they're from open source packages.Total ErrorsHtml ProblemsXML Schema ProblemsXML Problems

If these didn't show the proper information, let me know!

Double Edit - I do realize if I remove the "lib" folder altogether, and import the external jar's, this entire problem would be resolved. However I'd like to know whether the error detection outside of /src is the intended behavior of eclipse. Thanks again!

Edit many days later - SOLUTION: I had found the solution myself, which was identical to Exclude directories & subdirectories from validation in Eclipse. I had to clean my project to get the exclude rules to apply!

Upvotes: 4

Views: 866

Answers (1)

erosten
erosten

Reputation: 107

When I posted this question, my solution was to recreate the project and add back all the external libraries.

I then stumbled upon this problem, months later, attempting to put my external libraries in a folder called /lib/ in the same directory as my project in eclipse. This triggered a similar flood of warnings in the screenshots in the post.

The proper solution, to avoid the errors while keeping your external libraries in the same folder, was identical to the solution I found here: Exclude directories & subdirectories from validation in Eclipse. I had to clean my project to get the exclude rules to apply, but after that worked like a charm, and all the errors cleared up.

Upvotes: 1

Related Questions