Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] How to use javax.annotation.Resource from JEE spec?


I would like to use m2e to develop a JEE6 webapp.

My pom.xml contains this dependency as provider for the JEE classes:

One bean uses a javax.annotation.Resource annotation from the JEE6
spec, which has an additional lookup attribute.
Using m2e to perform the eclipse configuration, the JRE System library
is the first used provider for the Resource class.

This results in an eclipse compile error: "The attribute lookup is
undefined for the annotation type Resource"

I can change the order of the eclipse project settings to have the
maven dependencies bevore the JRE, but each time m2e needs to
reconfigure the eclipse settings, the order is reseted and the compile
error is back.

Is there a way to configure the pom.xml that "Update project
configuration..." results in a working configuration?


Back to the top