Currently, the deployBundle and deployContrib(bundle, contrib) methods find the bundle by looking at urls on the classpath. This works well for the whole of nuxeo-ep because the name of directories hosting osgi bundles are fixed in the svn repository. But this doesn't work well for, e.g, the sample project, because the checkouts will have different names (sample, Sample, nuxeo-project-sample etc.).
The bundle symbolic name, as declared in MANIFEST.MF is a much better info to rely on. It must already be unique anyway. That, and it solves the problem of loading without ambiguity resources for src/test/resources: simply make the src/test hierarchy a valid osgi bundle by putting META-INF/MANIFEST.MF in it.