I have a library located in TOMCAT_HOME/shared/lib/mylib.jar. This is a common library for all my applications and there should be only one copy of it (that’s why it is in shared/lib). When I run my web application using Tomcat this works fine. But when I’m running the unit tests locally, the library cannot be found unless I add it to project’s Java Build Path -> Libraries.
The problem is that when the library is included in build path, MyEclipse’s Deployment Wizard copies it to application’s WEB-INF/lib directory. So after the deployment there are two copies of mylib.jar, one in shared/lib and one in myapp/WEB-INF/lib.
How can I either forbit MyEclipse to copy mylib.jar or make it available without adding it to build path?