So marked the EE carefully to the lowest JRE you wish to support.
Similarly, ensure the Java compliance level matches the EE.
For example, assume the EE is set to J2SE-1.4 and the Java compliance to 1.5. Now, if you use annotations, the code would still compile in your workspace. However, when deploying, the plug-in would fail it will tell OSGi that it can run with 1.4 but actually it can not.