The essential requirements:
1. Have a set of libraries which has to be in the build path but not deployed;
2. the paths of those libraries have to be relative to the workspace or to workspace projects.
Since these essential requirements can’t be realized with the current MyEclipse deployment mechanism (required projects & exported JARs), the solution could be to have Eclipse “User Libraries” with paths to JARs relative to the workspace and the “(N)” checkbox for MyEclipse option “Deploy JARs from User Libraries”.
Summary: Eclipse User Libraries would be deployed only if exported by a required project on build path.
How would this work in the case that e.g. in project P two User Libraries (e.g. LIB_B + LIB_BD) have to be used, both on build path, but only one with deployment (LIB_BD)? Very fine:
* use the deployment settings from my last post;
* add User Library LIB_B (build only) to the project;
* create a new Java project e.g. ‘PU’, add LIB_BD to it, and set the chechmark to export it to ‘dependent’ projects;
* add project PU as a required project to the build path of project P.
Voila, done.
But all this fiddling stands and falls with the availability of Eclipse User Libraries which have JARs with paths relative to workspace/projects-in-workspace. I have proven in https://bugs.eclipse.org/70417 that Eclipse supports already that kind of User Libraries (I hacked a exported User Libraries definition file and reimported it). Now everything left to do is to have someone extend the Eclipse UI (like already available for selection of JavaDoc/Sources for JARs) to allow “the masses” to add relave-path-JARs to User Libraries: https://bugs.eclipse.org/133191.