Quick Setup

Jetty Distribution

If you are using the jetty distribution, then annotations are enabled by default.
The annotations module and its transitive dependencies are responsible for making annotation processing available.

Note that annotations that relate to JNDI, such as @Resource and @Resources are enabled via the JNDI module, which is a transitive dependency on the annotations module.

Jetty Maven Plugin

Annotations and JNDI are pre-enabled for the Maven plugin.

Embedding

To use annotations in an embedded scenario, you will need to include the jetty-annotations jar and all its dependencies onto your classpath.
You will also need to include the org.eclipse.jetty.annotations.AnnotationConfiguration class into the list of Configuration classes applied to the org.eclipse.jetty.webapp.WebAppContext class representing your webapp.