No, it should not. Annotations are just metadata. He expected the bytecode containing annotations to work fine even if the annotation is not in the classpath. Of course, if some library is trying to actually access the annotation, which is not in the classpath, it will not work.
This is explicitly supported to be able, for example
- add annotations used by static bytecode static analysis tools such as FindBugs, which are useless when running code in production
- to be able to use individual JPA clients in the client, even if the server is the only one that actually uses JPA annotations
source share